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
In reviewing the documentation and examples, it doesn't look like there is a way to add the example property to a Component. The OpenAPI spec supports this and several UI's rely on it to decorate response blocks. Please see the attached image for reference.
As a result, the only way to decorate each response is adding an example block like so:
/**
* POST /login
* @summary Login user
* @description Login to your account
* @param {string} email.form.required - The email address on file.
* @param {string} password.form.required - The email address on file.
* @tags Auth
* @return {Session} 200 - Success - application/json
* @example request - payload example
* {
* "data": {
* "attributes: {
* "email": "[email protected]",
* "password": "******"
* }
* }
* }
*/
It would be nice if we could add default or example values when defining a Component like so:
/**
* User data
* @typedef {object} User
* @property {integer} [id=1] - An auto-increment identifier
* @property {string} [status=active] - The status of the user
* @property {string} [thumbnail=https://www.filestack.com/photo.jpg] - The thumbnail for the user
* @property {string} [name=Steve Jobs] - The name for the user
* @property {string} [uuid=steve-jobs] - The uuid for the user
* @property {string} [[email protected]] - The email for the user
* @property {string} [tagline=Innovator] - The tagline for the user
* @property {string} [description=lorem ipsum...] - The description for the user
*/
The text was updated successfully, but these errors were encountered:
In reviewing the documentation and examples, it doesn't look like there is a way to add the
example
property to a Component. The OpenAPI spec supports this and several UI's rely on it to decorate response blocks. Please see the attached image for reference.Swagger Editor Example
https://editor.swagger.io/
As a result, the only way to decorate each response is adding an example block like so:
It would be nice if we could add default or example values when defining a Component like so:
The text was updated successfully, but these errors were encountered: