We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.2.1
9.4.1
22
Linux
Debian Testing
I am not sure if it is issue of @fastify/type-provider-typebox or of this package. After migrating TypeBox to 0.34 I had to use its Type.Module:
@fastify/type-provider-typebox
Type.Module
const Module = Type.Module({ Foo: Type.Ref("Bar"), Bar: Type.String(), }); const Foo = Module.Import("Foo"); type FooRequest = FastifyRequest<{ Reply: Static<typeof Foo>; }>; fastify.withTypeProvider<TypeBoxTypeProvider>().get("/foo", { schema: { produces: ["application/json"], response: { 200: Foo, }, }, async handler(_: FooRequest, reply) { await reply.send("OK"); }, });
Response handling works correctly, but /documentation generates invalid references:
/documentation
{ "openapi": "3.1.0", "info": { "title": "Test", "version": "0.1.0" }, "components": { "schemas": {} }, "paths": { "/foo": { "get": { "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$defs": { "Foo": { "$ref": "#/components/schemas/def-1", "title": "Foo" }, "Bar": { "type": "string", "title": "Bar" } }, "$ref": "#/components/schemas/def-0" } } } } } } } } }
included in the description
Schema should be valid.
The text was updated successfully, but these errors were encountered:
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Sorry, something went wrong.
No branches or pull requests
Prerequisites
Fastify version
5.2.1
Plugin version
9.4.1
Node.js version
22
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian Testing
Description
I am not sure if it is issue of
@fastify/type-provider-typebox
or of this package. After migrating TypeBox to 0.34 I had to use itsType.Module
:Response handling works correctly, but
/documentation
generates invalid references:Link to code that reproduces the bug
included in the description
Expected Behavior
Schema should be valid.
The text was updated successfully, but these errors were encountered: