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
defineRouteMeta({ openAPI: { tags: ["test"], description: "Test route description", requestBody: { required: true, content: { "application/json": { description: "Payload", summary: "Payload", schema: SomeInputSchemaJson, examples: { my_correct_example { summary: "an awesome example", value: { yayValidField: 'nice' }, }, my_incorrect_example { summary: "oops", value: { failTrain: 'lmao' }, }, }, }, }, }, responses: { "200": { summary: "Success", description: "Success", content: { "application/json": { encoding: {}, schema: SomeOutputSchemaJson, }, }, }, }, }, });
Given the above route meta, we should be able to ensure that we get type safety when inserting incorrect example data structure :
defineRouteMeta<SomeInput>({ openAPI: { tags: ["test"], description: "Test route description", requestBody: { required: true, content: { "application/json": { description: "Payload", summary: "Payload", schema: SomeInputSchemaJson, examples: { my_correct_example { summary: "an awesome example", value: { yayValidField: 'nice' }, }, my_incorrect_example { summary: "oops", value: { failTrain: 'lmao' 👈👈👈👈👈👈👈👈 should now show error }, }, }, }, }, }, responses: { "200": { summary: "Success", description: "Success", content: { "application/json": { encoding: {}, schema: SomeOutputSchemaJson, }, }, }, }, }, });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the feature
Given the above route meta, we should be able to ensure that we get type safety when inserting incorrect example data structure :
Additional information
The text was updated successfully, but these errors were encountered: