SamirVora
3 years agoNew Member
Display enum select box to update a request body parameter
Is it possible to define an enum to update a property value on a request body? So a select box would display and the user can select the option. In the example below it would be either `Happy` or `Sad`.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
examples:
Pet example
value:
pet_name: Tony
mood:
enum:
- Happy
- Sad
When selecting the enum, it would update the request body:
{
"pet_name": "Tony"
"mood": "Happy | Sad"
}