Skip to content

ajv need update #10207

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

Closed
1 task done
1pbSolidDrives opened this issue Aug 9, 2021 · 2 comments
Closed
1 task done

ajv need update #10207

1pbSolidDrives opened this issue Aug 9, 2021 · 2 comments

Comments

@1pbSolidDrives
Copy link

Is there an existing request for this feature?

  • I have searched the existing issues for this feature request

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

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.

@appurva21
Copy link
Member

Hey folks! 👋

We’ve rolled out support for using external packages from NPM directly in your Postman scripts! That means you can now easily bring in ajv@8 like this:

const Ajv = pm.require('npm:[email protected]');

Image

You can read more about this capability here: #13542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants