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

fix: multiple route same schema #2108

Merged
merged 2 commits into from Feb 23, 2020
Merged

Conversation

Eomm
Copy link
Member

@Eomm Eomm commented Feb 21, 2020

Fixes #2104
Related #2044

This PR revert the #2044 fix and implement it in a different way but the same test cannot pass because when the user adopts the querystring alias (aka query) we modified the original object adding the querystring parameter.
The previous test was a deepEquals check with the original object
Now it is a deepEquals with the original object plus the querystring field.

So I think this PR is more in line with the older versions of fastify compared to v2.12

This is a "nice" edge case.. I will keep it in mind for the future during the reviews 😅

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

@Eomm Eomm added bugfix Issue or PR that should land as semver patch v2.x Issue or pr related to Fastify v2 labels Feb 21, 2020
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

@SkeLLLa
Copy link
Contributor

SkeLLLa commented Feb 22, 2020

I can confirm that this patch fixes issue with fastify-oas plugin, so LGTM.

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

@allevo
Copy link
Member

allevo commented Mar 10, 2020

Can it be published?

@mcollina
Copy link
Member

I'll prep a release asap.

@SkeLLLa
Copy link
Contributor

SkeLLLa commented Mar 10, 2020

I think it had been already published in 2.12.1 v2.12.1...master

@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 v2.x Issue or pr related to Fastify v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR-2044 (one schema for multiple routes) introduce breaking change behavior on routes schema resolve.
6 participants