[Not working] Try upgrading to OAPIv3.1
This is not a real PR, but I did some work to see what would be needed to upgrade to Open API v3.1 and don't want it to be lost to time.
As far as I can tell, the AJV/OpenAPIv3.1 combo doesn't seem to be correctly working right now, as I eventually realized I can't even get the OpenAPI example to validate with AJV. This is the issue I filed on the AJV repo: https://github.com/ajv-validator/ajv/issues/1745
Other things I've learned:
- The package
ajv-draft-04is needed to maintain compatibility with what's already being validated by this package, or potentially https://github.com/ajv-validator/json-schema-migrate. - https://www.npmjs.com/package/ajv-formats is also needed (unsure if this makes some of the code in this repo obsolete)
The file I've dedicated most of my attention to is src/framework/openapi.schema.validator.ts. You can see here the options I've passed to AJV, which are also attached to the issue filed. An explanation for those can be found here: https://github.com/OAI/OpenAPI-Specification/pull/2489
I'll see how the discussion with the AJV folks goes (and then with the OpenAPI folks as needed), but it's unknown whether I'll pick this back up. Hopefully, however, this initial investigation is useful for someone.
Sorry for the mess in these files! I tried a lot of different things.