-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate POJOs from subschemas defined in 'definitions'/'$defs' section #1523
base: master
Are you sure you want to change the base?
Conversation
A fairly naïve implementation inspired by #1124. Not supported: defaulting to using the dialect of the parent schema when figuring out whether to use/prefer Feedback/critique is welcomed. |
It looks like OAS3 would expect to include the schemas for the spec in |
I guess one option could be changing
|
I guess if we make this configurable, we need to ensure that you can specify a path to the schemas rather than just a property name. It sounds like oas3 as the node in |
It should be possible to make custom definitions path configurable via config or extension property if needed (currently not implemented) |
@joelittlejohn what is your vision on having definitions path being configurable ?
Shall that be addressed within given issue ? |
For now I was imagining a configuration property, like definitionsPath (default is as per the JSON schema spec). I think having different definitions paths per document would be a pretty confusing way to do things. Given that the current behaviour has been in place for so long, I also think we need a new config option to turn this on: generateDefinitions, default false. |
Whilst I do agree that it might be confusing, on the other hand it might as well be not that uncommon. May I assume that it would mean there will be no need for fallback logic as the behavior will be straight-forward: |
@joelittlejohn |
Closes #1123
Closes #987