Skip to content

Commit

Permalink
fix: include enum options for array values in OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelhoun authored Feb 28, 2024
1 parent 4811b00 commit 76f7c25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Writing/OpenAPISpecWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ public function generateFieldData($field): array
'format' => 'binary',
] : ['type' => $baseType];

if (!empty($field->enumValues)) {
$baseItem['enum'] = $field->enumValues;
}

$fieldData = [
'type' => 'array',
'description' => $field->description ?: '',
Expand Down

0 comments on commit 76f7c25

Please sign in to comment.