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: Use openapi-types 3.1 document type to support null schema types #707

Merged
merged 4 commits into from
Jan 30, 2023

Conversation

nidhi-kala
Copy link
Contributor

Fixes #705

Type '"null"' is not assignable to type 'NonArraySchemaObjectType | undefined'.

By using OpenAPIV3_1.Document instead of OpenAPIV3.Document as type for Fastify dynamic swagger options, openapi config.

Checklist

index.d.ts Show resolved Hide resolved
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

I guess it is OK. But see my other remark.

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

Please use OpenAPIV3 | OpenAPIV3_1 syntax. OpenAPI 3.1 is not a superset of OpenAPI 3.0

@nidhi-kala nidhi-kala requested a review from Uzlopak January 27, 2023 19:00
@Uzlopak Uzlopak merged commit 0960098 into fastify:master Jan 30, 2023
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.

Type error on passing JSON schema to openapi.components.schema
3 participants