Open
Description
I have a REST search service with optional header parameter of type enum:
- in: header
name: personType
description: Filter by person type
required: false
schema:
type: string
enum: [INDIVIDUAL, LEGAL_ENTITY]
MISP2 generates the following SELECTbox out of this:
<div class="field">
<label>Filter by person type</label>
<select name="personType" data-rf-param-location="header">
<option value="INDIVIDUAL">INDIVIDUAL</option>
<option value="LEGAL_ENTITY">LEGAL_ENTITY</option>
</select>
</div>
But Misp2 doesn't add empty option to the front (for the case if I don't want to specify anything).
The required behaviour would be that since the element is declared as required=false there should be an additional option tag in the front:
<div class="field">
<label>Filter by person type</label>
<select name="personType" data-rf-param-location="header">
<option value="">--</option>
<option value="INDIVIDUAL">INDIVIDUAL</option>
<option value="LEGAL_ENTITY">LEGAL_ENTITY</option>
</select>
</div>
Metadata
Metadata
Assignees
Labels
No labels