fastify-swagger-ui
fastify-swagger-ui copied to clipboard
Makes all properties/params required, `required: []` option is ignored
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the bug has not already been reported
Fastify version
^4.26.2
Plugin version
^4.0.0
Node.js version
20.14.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.5
Description
For example, in this schema, only "name" is required:
export const args = {
required: ['name'],
type: 'object',
properties: {
paths: {
type: ['string', 'null'],
},
name: { type: 'string' },
age: { type: 'number' },
},
};
but ui requires all properties:
Link to code that reproduces the bug
No response
Expected Behavior
No response
Thanks for reporting!
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
I don't think this is an issue, because those are path parameters and they are required by definition
Closing it as there was no mvce provider.