-
Notifications
You must be signed in to change notification settings - Fork 6
Add raml-to-jaxrs article example proj and base #6
base: master
Are you sure you want to change the base?
Conversation
200: | ||
body: | ||
application/json: | ||
type: Rick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not re-sure RicksLib.Rick
here? I understand it has something to do with jsonschema2pojo
but what would happen if it was a RAML type instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a way to showcase that JSON Schema and RAML Data Type can be used alongside. RicksLib.Rick
can be used in all places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know if I should remove JSON Schema and use RicksLib.Rick
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it generate similar java code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like generated files (inside raml-playground/raml-for-jaxrs/example-proj/target/generated-sources/raml-to-jaxrs-maven-plugin/example/jsonschema/
) are identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, let's use only the type Lib.Rick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, I was wrong. On previous test everything work fine, but then I removed generated code folder completely and tried to install the project. And now looks like class Rick
(inside /raml-playground/raml-for-jaxrs/example-proj/target/generated-sources/raml-to-jaxrs-maven-plugin/example/jsonschema/Rick.java
) implementation is not generated when JSON Schema is not used 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both classes had the same name (json and raml). In the pull request I submitted to @postatum, I changed the name from Rick to JsonRick. That said, I'm not convinced in a small example that we should be using JsonSchema: jsonschema is a bit of an outlier in RAML (arrays and such are not handled the same way...). And the project itself has examples of this.
I've also made the project standalone: no parent in the pom.xml, everything explicitly stated.
Fix some conflicts in classnames.
Fix some conflicts in classnames.
Fixes for quick docs.
See https://github.com/postatum/raml-playground/blob/raml-for-jaxrs/raml-for-jaxrs/README.md for full info.