postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.83k stars 838 forks source link

ajv need update #10207

Open 1pbSolidDrives opened 3 years ago

1pbSolidDrives commented 3 years ago

Is there an existing request for this feature?

Is your feature request related to a problem?

The AJV version is too old and needs to be upgraded. You still used 6.12.6 but now it is 8.6.2

Describe the solution you'd like

Upgrade ajv

Describe alternatives you've considered

No response

Additional context

No response

Richard-Giraud-AliceAndSmith commented 2 months ago

OpenAPI 3.1.0 uses a proper JSON Schema to define the structure of request and responses. It leverages draft 2020-12.

AJV introduced changes changes to support draft 2020-12 in v8.0.0. https://ajv.js.org/news/2021-03-27-ajv-version-8-released.html

With a AJV v8, it should be possible to use the OpenAPI spec to validate the requests and responses used in testing by extracting the appropriate definition. With v6 (needed for draft-04, I think), this is not straightforward.