-
Notifications
You must be signed in to change notification settings - Fork 16
Fix MediaType implementation of OpenApi 3.1 #94
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
Conversation
The internal __absolute_uri__ flag is breaking the code that checks if the model is empty
|
Hi @cavallium thanks for finding this bug! Could you also provide a test case to ensure that we don't run into this issue again? |
|
A test can't guarantee this with the current code, since that variable can contain fields that do not exist on the defined specification. |
|
I am convinced that we can write a test that will prevent exactly this problem from occurring again. We can also directly write a test, to ensure that the other two annotations I will not merge a fix without a test, because otherwise nobody will add a test later. And yes, long term we should fix it in vertx-json-schema. |
Should |
|
@pk-work I have fixed the existing test instead of creating a new one, since it was already checking for that behavior, but it wasn't checking for internal json-schema annotations. |
|
Cool! I think we could improve the readability of the code and avoid code duplication, be re-using (copying) the created JsonObjects. Instead of writing multipel times I think this will reduce the code in testGetters() a lot. |
Done, thanks for your suggestion, it's much better now |
|
Thank you very much for your contribution and your patience to add the best possible test! |
The internal
__absolute_uri__flag is breaking the code that checks if the model is emptyMotivation:
OpenAPI 3.1 specifications do not work because vert.x populates the model with its own fields, then checks if the model is empty
Conformance:
You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines