API Platform version(s) affected: 2.5.9
Description
Given is this definition in a custom filter:
public function getDescription(string $resourceClass): array
{
if (!$this->properties) {
return [];
}
$description = [];
foreach ($this->properties as $property => $strategy) {
$description[$property] = [
'property' => $property,
'type' => 'string',
'required' => false,
'openapi' => [
'description' => 'Filter leads by state',
'name' => 'LeadStateFilter',
'type' => 'string',
'enum' => ['new', 'archived', 'anonymized'],
],
];
}
return $description;
}
The enum isn't showing up on swagger anymore. This used to work in the past. I did not realize when it stopped working.
How to reproduce
Try setting an enum like above in a custom filter description.
API Platform version(s) affected: 2.5.9
Description
Given is this definition in a custom filter:
The enum isn't showing up on swagger anymore. This used to work in the past. I did not realize when it stopped working.
How to reproduce
Try setting an enum like above in a custom filter description.