Skip to content
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

First impl #1

Merged
merged 7 commits into from
May 16, 2020
Merged

First impl #1

merged 7 commits into from
May 16, 2020

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)

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@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.

2 participants