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

Feature/addSchema to serialization #1437

Merged
merged 4 commits into from
Feb 8, 2019

Conversation

Eomm
Copy link
Member

@Eomm Eomm commented Feb 6, 2019

Hi,
this PR fixes #1410 and add more tests for some use cases of JSON-schema.

Regarding the table for the compatibility, I have tested the not covered use cases (I will open an issue to implement them. Here a GIST as test)

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

| `$ref` to `$id` | ✔ | ✔️ |
| `$ref` to `/definitions` | ✔️ | ✔️ |
| `$ref` to shared schema `$id` | ❌ | ✔️ |
| `$ref` to shared schema `/definitions` | ❌ | ✔️ |
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be good to add some examples

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Member

@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.

LGTM

Can you confirm this is not semver-major?

@Eomm
Copy link
Member Author

Eomm commented Feb 8, 2019

Yes!

Because I filtered only the $ref key that can't use the shared schema feature but it must be a string without being resolved by the schemas.js class.

@mcollina mcollina merged commit 972f2e7 into fastify:master Feb 8, 2019
@mcollina
Copy link
Member

mcollina commented Feb 8, 2019

Can you send a backport PR to 1.x with 972f2e7?

@Eomm
Copy link
Member Author

Eomm commented Feb 8, 2019

Sure 👍

@delvedor
Copy link
Member

delvedor commented Feb 9, 2019

Is this a semver minor or a bugfix?

@Eomm
Copy link
Member Author

Eomm commented Feb 9, 2019

It is a semver patch.

The PR title is misleading 😅

@delvedor delvedor added the bugfix Issue or PR that should land as semver patch label Feb 9, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Issue or PR that should land as semver patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serialization references not resolved
3 participants