kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
892 stars 235 forks source link

openapi-schema-validator: upgrade ajv to version 8 and use json schema draft 7 #729

Closed asarver closed 3 years ago

asarver commented 3 years ago

part 1 for issue #727

AJV v6 is no longer receiving feature updates and stops receiving security updates at the end of June. AJV v6 also has an outstanding security issue (in issue).

AJV v8 does not support json schema draft 4, so along with upgrading to ajv 8, we need to switch to json schema draft 7. I could not find the repo for openapi schema v2, so I've removed the npm dependency and included the file here to upgrade the schema to draft 7.

New typescript version is needed for the newer version of AJV

asarver commented 3 years ago

for a more end to end view of the changes, I have everything on my work-saved branch: https://github.com/kogosoftwarellc/open-api/compare/master...asarver:work-saved

asarver commented 3 years ago

@jsdevel @chadxz you both have been active on the most recent PRs, can you take a look? Thanks in advance!

jsdevel commented 3 years ago

awesome change! thanks!