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
Nullable
Export a utility function Nullable that generates OpenAPI-compatible schemas with the nullable property.
nullable
Example:
const Nullable = <T extends TSchema>(schema: T) => Type.Unsafe<Static<T> | null>({ ...schema, nullable: true }); const T = Nullable(Type.String()); // Output: // { // type: 'string', // nullable: true // }
I am happy to implement this feature if the proposal is approved.
Improve developer experience.
// .... response: { 201: Type.Object({ name: Nullable(Type.String()), }), } // ....
Outputs:
responses: "201": description: Default Response content: application/json: schema: type: object properties: displayName: type: string nullable: true required: - displayName
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prerequisites
🚀 Feature Proposal
Export a utility function
Nullable
that generates OpenAPI-compatible schemas with thenullable
property.Example:
I am happy to implement this feature if the proposal is approved.
Motivation
Improve developer experience.
Example
Outputs:
The text was updated successfully, but these errors were encountered: