You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Json object type required body may contain optional keys. This should be documentable both using the interface notation and form options.
To Reproduce
/**
* @param {object} request.body.required - Body of the request - application/json
* @param {string} key.form.required - Key
* @param {number} value.form.required - Value
* @param {string} otherThing.form.optional - Other meta info. // or otherThing.form
*/
Expected behavior
Above should make otherThing as optional in the schema: { key: string, value: number, otherThing?: string}
Currently they all are required when specified with form.
However, it works when the form data is moved to Body type and then included as:
/**
* SomeRequestBody type
* @typedef {object} SomeRequestBody
* @property {string} key.required - Some key
* @property {string} value.required - Some value
* @property {string} otherThing - Other meta info
*/
Desktop (please complete the following information):
OS: macOS
Version 11.6
The text was updated successfully, but these errors were encountered:
Description
Json object type required body may contain optional keys. This should be documentable both using the interface notation and form options.
To Reproduce
Expected behavior
Above should make otherThing as optional in the schema: { key: string, value: number, otherThing?: string}
Currently they all are required when specified with form.
However, it works when the form data is moved to Body type and then included as:
where SomeRequestBody is defined as
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: