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

feat: type definitions and documentation for separated type provider. #5427

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Bram-dc
Copy link
Contributor

@Bram-dc Bram-dc commented Apr 24, 2024

Fix for discussion: #5311
An update on a previous PR

This improved PR includes:

  • Breaking changes with separate providers for both the validation and serialization stages
  • Docs for the new TypeProvider interface
  • A test

@Eomm Eomm added the typescript TypeScript related label May 18, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 22, 2024
@Bram-dc
Copy link
Contributor Author

Bram-dc commented May 22, 2024

Will this be included in the new 5.0.0 release? I could start to create PRs for all the type-providers to support this change.

@mcollina
Copy link
Member

cc @fastify/typescript what do you think? Should we do this?

@fox1t
Copy link
Member

fox1t commented Jun 12, 2024

I encountered this same limitation recently while working with the Zod-type provider. I am +1 for this landing. Since I haven't worked recently on the type provider types, though, I am not sure how much breaking this PR is.

@mcollina
Copy link
Member

@Bram-dc could you start preparing the matching PRs for our type providers? So we can land this for v5.

@Bram-dc
Copy link
Contributor Author

Bram-dc commented Jun 20, 2024

@mcollina Could we have a npm publish to the "next" tag so that we can try this change in the plugins pipelines?

@mcollina
Copy link
Member

This conflicts now, can you rebase?

@github-actions github-actions bot added the github actions Github actions related label Jun 20, 2024
@Bram-dc
Copy link
Contributor Author

Bram-dc commented Jun 20, 2024

I think the conflict is resolved now, I did not completely understand the conflict.

@@ -1053,7 +1062,7 @@ expectAssignable(server.withTypeProvider<InlineHandlerProvider>().get(
// Handlers: Auxiliary
// -------------------------------------------------------------------

interface AuxiliaryHandlerProvider extends FastifyTypeProvider { output: this['input'] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why was this changed from { output: 'auxiliary' }

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 c44dd00 into fastify:main Jun 21, 2024
28 checks passed
@Bram-dc
Copy link
Contributor Author

Bram-dc commented Jun 21, 2024

Could we have a "5.0.0-alpha.2" like 5.0.0-aplha.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation github actions Github actions related typescript TypeScript related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants