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

Strip external schemas from standalone compiled code #704

Merged
merged 1 commit into from
May 21, 2024

Conversation

remidewitte
Copy link
Contributor

Checklist

Copy link
Member

@ivan-tymoshenko ivan-tymoshenko left a comment

Choose a reason for hiding this comment

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

I see that this is a serialized state, but can you check if validator still works after this change. You need to use oneOf/anyOf keywords in the external schemas to trigger the validator usage.

@remidewitte
Copy link
Contributor Author

Thanks for the feedback. I will check the oneOf/anyOf use case.

@remidewitte
Copy link
Contributor Author

I can now confirm with a proper test case that it works with the oneOf case / validator case.
The standalone code does not need to keep external schemas as validatorState will hold them if the validator needs them.

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

@mcollina mcollina merged commit a2e4ef9 into fastify:master May 21, 2024
17 checks passed
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