Availability to change $ref in all schema #534
Unanswered
kirillparfenov
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @kirillparfenov, Your description sounds pretty much like the use case the ExternalRefPackageExample was meant to demonstrate. Especially if you're using the Maven plugin to generate the schema files within a given package, you don't even have to split them up into separate files yourself. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! First of all I would like to thank you for your library. And want to ask my question.
I generated next schema:
Next I separate each definition to single file like:
Base.json
Request.json
User.json
And my question is:
Is it possible to set a custom "$ref" value during schema generation?
The ideal naming convention would be: ObjectNode.key + ".json" (e.g., Request.json).
While I could recursively traverse all nested elements to find and replace "$ref" values, I'm wondering if there's a more elegant built-in solution.
Ultimately I would like to see the following picture:
Base.json
Request.json
User.json
I found examples ExternalRefAnnotationExample, ExternalRefPackageExample but they didn't solve my problem.
Beta Was this translation helpful? Give feedback.
All reactions