Skip to content

Conversation

@Eomm
Copy link
Owner

@Eomm Eomm commented May 16, 2020

@mcollina would you mind to give it a check if you spot potential issues in code?

I implemented this logic: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.appendix.B.1
It replaces all $ref with a new path to local /definitions added by code

It supports draft-07 (supported by ajv) with a small tweak to add draft-08 in future.

I tried it roughly with fastify-swagger and it does the job

TODO

  • docs
  • more test?

Copy link

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The algorithm seems ok, I would add some docs and then we should be good to go.

(there will be bugs, but it should unblock us to ship Fastify v3)

@Eomm Eomm merged commit 730c533 into master May 16, 2020
@Eomm Eomm deleted the first-impl branch May 16, 2020 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants