Giter Site home page Giter Site logo

ardielle-java's People

Contributors

ben-tsai avatar boynton avatar havetisyan avatar mujibur avatar sciolizer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ardielle-java's Issues

generated models do not have a hashcode that is consistent with equals

.. which means suffering if someone tried to stick these into sets and map keys.

$ cat x.rdl
type Foo struct {
	String bar;
	String baz;
}
$ rdl -ps generate java-model x.rdl

produces

//
// This file generated by rdl 1.4.13. Do not modify!
//

import com.yahoo.rdl.*;

//
// Foo -
//
public class Foo {
    public String bar;
    public String baz;

    public Foo bar(String bar) {
        this.bar = bar;
        return this;
    }
    public Foo baz(String baz) {
        this.baz = baz;
        return this;
    }

    @Override
    public boolean equals(Object another) {
        if (this != another) {
            if (another == null || another.getClass() != Foo.class) {
                return false;
            }
            Foo a = (Foo) another;
            if (bar == null ? a.bar != null : !bar.equals(a.bar)) {
                return false;
            }
            if (baz == null ? a.baz != null : !baz.equals(a.baz)) {
                return false;
            }
        }
        return true;
    }
}

Validator does not work if entry has Struct fields

I have the following definition:

type Entity Struct {
EntityName name; //name of the entity object
Struct value; //value of the entity
}

    Entity e = new Entity().setName("test.entity").setValue(new Struct().with("key", "test"));
    result = validator.validate(e, "Entity");

I get back failure: Not a valid Struct, com.yahoo.rdl.Struct in data.value expected

Support for consuming multipart_form_data

Hello,

I want to use RDL for writing a java webservice that accepts File input from user via POST call. i.e. support for Consuming MediaType.MULTIPART_FORM_DATA during post call. It seems that RDL currently supports only JSON data consumption. Is there a plan to add this feature?

Thanks,
Milan

Validator does not validate correctly if object has multiple Array fields

If I have the following rdl:

type DomainTemplate Struct {
Array templateNames;
Array params (optional);
}

When validating this object against its schema, it only validates the templateNames array and just ignores params array. Quick look at the code shows that it returns the value of the first array validation rather than only returning if there is a failure and continuing with the other fields.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.