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):
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):