Skip to content

Commit 61daae2

Browse files
authored
fix: change swagger_definition_name to openapi_definition_name (#1740)
1 parent 8a5f5dd commit 61daae2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/openapi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ Note: as your route is not exposed, you may want to return a HTTP 404 if it's ca
316316

317317
API Platform generates a definition name based on the serializer `groups` defined
318318
in the (`de`)`normalizationContext`. It's possible to override the name
319-
thanks to the `swagger_definition_name` option:
319+
thanks to the `openapi_definition_name` option:
320320

321321
```php
322322
use ApiPlatform\Metadata\ApiResource;
323323
use ApiPlatform\Metadata\Post;
324324

325325
#[ApiResource]
326-
#[Post(denormalizationContext: ['groups' => ['user:read'], 'swagger_definition_name' => 'Read'])]
326+
#[Post(denormalizationContext: ['groups' => ['user:read'], 'openapi_definition_name' => 'Read'])]
327327
class User
328328
{
329329
// ...
@@ -342,7 +342,7 @@ class User
342342
{
343343
const API_WRITE = [
344344
'groups' => ['user:read'],
345-
'swagger_definition_name' => 'Read',
345+
'openapi_definition_name' => 'Read',
346346
];
347347
}
348348
```

0 commit comments

Comments
 (0)