raml-org / raml-java-parser

(deprecated) A RAML parser based on SnakeYAML written in Java
Other
174 stars 121 forks source link

How to get JsonSchema with description of properties (raml v1.0) #397

Open rakeshjain0512 opened 7 years ago

rakeshjain0512 commented 7 years ago

I'm trying to create a POJO from response type of a resource. From method().getBody().get(0), I can get instance of TypeDeclaration, on which when I invoke toJsonSchema() method, I get the json schema as a string of that particular response body object, but that json schema doesn't hold description of properties. Can you pls suggest how can I get the same? Eventually, I want to create POJO from response datatype by including description of properties. Please let me know if there is any other way to do it apart from converting json schema to POJO using jsonschema2pojo plugin.

Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-84

rakeshjain0512 commented 7 years ago

@aamura did you get chance to look into this. Also, would like to know if there is any way to get de-referenced or inline json schema (i.e. replacing "$ref" with actual properties) from raml v1.0 datatypes