-
Notifications
You must be signed in to change notification settings - Fork 587
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
mpOpenAPI-4.0: implement validation #29687
base: integration
Are you sure you want to change the base?
Conversation
The following files contain a string indicating discriminating content:
|
080a2fd
to
d240017
Compare
So that they can be shared with MP OpenAPI 4.0 Also add a validation result matcher so we get better test failure messages.
Once the app has been deployed, we expect the messages to have been logged, so we don't need to wait for them. This has no effect if the test passes, but makes it run much more quickly if the expected messages are not emitted.
OpenAPI 3.1 is fairly similar to 3.0, so we re-use a lot of the same validation logic. As well as adding the new rules, we needed to: - refactor reference validation, as references need to be validated differently - Change how we select which validator to use so that its based on the OpenAPI version specified in the document rather than on which version of the feature is running (ensuring mpOpenAPI-4.0 can still validate OpenAPI v3.0 documents if the user has requested that) - Make the 3.0 Schema validation code work with the mpOpenAPI-4.0 data model which has breaking API changes. The 3.0 validation needs to work with all versions of the model.
We were testing for each of the problem messages we expect, but we weren't testing for the top message which says "The following errors were found:"
0b57e23
to
ae9f366
Compare
#libby |
#build |
Your personal pipeline request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?uuid=15a75c78-d991-42a3-9ea1-23a141218539 Target locations of links might be accessible only to IBM employees. |
This should now be fixed. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_erroUHdgEe-ZBdXWdK7Miw Target locations of links might be accessible only to IBM employees. |
Copy the existing OpenAPI v3.0 validation FAT tests and adjust them for the new validation rules in v3.1 and run them against OpenAPI v3.1 documents.
ae9f366
to
db07f5b
Compare
The build Azquelt-29687-20240920-1602 For help analyzing your personal build, go to https://libh-proxy1.fyre.ibm.com/cognitive/buildAnalysis.html?uuid=_erroUHdgEe-ZBdXWdK7Miw |
release bug
label if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).Fixes #28860