Skip to content

feat(schema): implement types based on openapi#4

Merged
mcollina merged 1 commit intoplatformatic:mainfrom
rozzilla:feat/schema/implement-types-based-on-openapi
Dec 24, 2024
Merged

feat(schema): implement types based on openapi#4
mcollina merged 1 commit intoplatformatic:mainfrom
rozzilla:feat/schema/implement-types-based-on-openapi

Conversation

@rozzilla
Copy link
Copy Markdown
Contributor

Screenshot 2024-12-24 at 17 26 40

This leverages @fastify/type-provider-json-schema-to-ts to use the OpenAPI schema to get the right Typescript types for the fastify endpoint. This solution seems simpler to me (compared to using typebox or Zod) since you don't need to specify a new "syntax" in order to get types, but you can just pass the OpenAPI. Please let me know if it make sense 😊

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
Copy link
Copy Markdown
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 eaa7ec9 into platformatic:main Dec 24, 2024
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