-
Notifications
You must be signed in to change notification settings - Fork 592
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
mpOpenAPI-4.0: implement validation #29687
Commits on Sep 20, 2024
-
Move OpenAPI validation unit tests
So that they can be shared with MP OpenAPI 4.0 Also add a validation result matcher so we get better test failure messages.
Configuration menu - View commit details
-
Copy full SHA for e07ca42 - Browse repository at this point
Copy the full SHA e07ca42View commit details -
Make existing OpenAPI validation FATs fail faster
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.
Configuration menu - View commit details
-
Copy full SHA for 338bf2d - Browse repository at this point
Copy the full SHA 338bf2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f1fa31 - Browse repository at this point
Copy the full SHA 0f1fa31View commit details
Commits on Sep 26, 2024
-
mpOpenAPI-4.0: Implement OpenAPI v3.1 validation
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.
Configuration menu - View commit details
-
Copy full SHA for f92272e - Browse repository at this point
Copy the full SHA f92272eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2d1723 - Browse repository at this point
Copy the full SHA a2d1723View commit details -
MP OpenAPI: Add test for validation message output
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:"
Configuration menu - View commit details
-
Copy full SHA for feb0a48 - Browse repository at this point
Copy the full SHA feb0a48View commit details -
mpOpenAPI-4.0: OpenAPI v3.1 validation FAT tests
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.
Configuration menu - View commit details
-
Copy full SHA for a0a56f0 - Browse repository at this point
Copy the full SHA a0a56f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 912b38a - Browse repository at this point
Copy the full SHA 912b38aView commit details