mulesoft-labs / raml-for-jax-rs

This project is all about two way transformation of JAX-RS-annotated Java code to RAML API description and back.
Other
295 stars 181 forks source link

Support for type: date? #90

Closed giraone closed 9 years ago

giraone commented 9 years ago

I am wondering whether "type" : "date" is supported - it is a valid type in the RAML spec. I get the following error for my RAML file (using -jaxrsVersion "2.0"):

java.lang.IllegalArgumentException: Invalid RAML definition:
        ERROR invalid JSON schema (employeeDetails):
error: "date" is not a valid primitive type (valid values are: [array, boolean, integer, null, number, object, string])
    level: "error"
    domain: "syntax"
    schema: {"loadingURI":"#","pointer":"/properties/employeeSince"}
    keyword: "type"
    found: "date"
    valid: ["array","boolean","integer","null","number","object","string"]

The type "null" seams to be also a bit strange in the list of valid types!

giraone commented 9 years ago

OK. I found my problem. It guess it must be "type":"string", "format":"date-time" within a schema, the type "date" is for parameters only. Am I right?

ddossot commented 9 years ago

Correct.

petrochenko-pavel-a commented 9 years ago

Closing for now , please let me know if you see any options for improvement on our side.

Regards, Pavel

giraone commented 9 years ago

Hi Pavel,

the easiest way to help others on the same issue would be to include a Date field in the included sample and show, how it is handled. 

Hans

-------- Ursprüngliche Nachricht --------
Von: petrochenko-pavel-a notifications@github.com
Datum:08.06.2015 13:46 (GMT+01:00)
An: mulesoft/raml-for-jax-rs raml-for-jax-rs@noreply.github.com
Cc: giraone hans.schuell@giraone.com
Betreff: Re: [raml-for-jax-rs] Support for type: date? (#90)
Closing for now , please let me know if you see any options for improvement on our side. Regards, Pavel — Reply to this email directly or view it on GitHub.