Closed LoicBoursin closed 2 years ago
Got some conflicts on this now we've merged other updates.
I have reset my branch to be in sync with main after your merges then cherry-picked my commit. Let me know if everything is OK now
Any movement here?
Right! After a month of cycling around mountains and deserts and not being able to get a laptop out for anything particularly focused, I am back at it.
This repo has been in a bit of a bad way, had a lot of errors in the build, but those have been fixed with 10.0.3 (npm run test:node at least). If you could pull main, fix the conflict (popped this down to lockfileVersion 1 for now) then run it again, you might notice errors like this:
1) Real-world APIs
11) adyen.com:PaymentServiceadyen.com:PaymentServiceadyen.com:PaymentService:
SyntaxError: Swagger schema validation failed.
Schema is not an object: boolean at #/x-groups
JSON_OBJECT_VALIDATION_FAILED
at validateSchema (lib/validators/schema.js:38:15)
at SwaggerParser.validate (lib/index.js:155:7)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async validateApi (test/specs/real-world/real-world.spec.js:56:7)
at async Context.<anonymous> (test/specs/real-world/real-world.spec.js:47:7)
z-schema validation error: JSON_OBJECT_VALIDATION_FAILED
at ZSchema.getLastError (node_modules/z-schema/src/ZSchema.js:260:13)
at validateSchema (lib/validators/schema.js:36:23)
at SwaggerParser.validate (lib/index.js:155:7)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async validateApi (test/specs/real-world/real-world.spec.js:56:7)
at async Context.<anonymous> (test/specs/real-world/real-world.spec.js:47:7)
In main many of the Adyen OpenAPI documents have been disabled because they're OpenAPI v3.1, but of course we'd want to enable them in this repo to test it properly. I found myself adding even more of their APIs to the list, because of this x-groups error, so I think it might be something to do with this change.
Can you investigate?
x-properties are allowed as specification extensions: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions to be tested
Correct, so we'd need to make sure this PR is still allowing them.
I've got all of these changes working and passing over in https://github.com/APIDevTools/swagger-parser/pull/187.
This adds the support for OpenAPI 3.1 #169.