|
1 | 1 | # Swagger / Open API Support
|
2 | 2 |
|
3 | 3 | API Platform natively support the [Open API](https://www.openapis.org/) (formerly Swagger) API documentation format.
|
4 |
| -It also integrates a customized version of [Swagger UI](https://swagger.io/swagger-ui/), a nice tool to display the |
| 4 | +It also integrates a customized version of [Swagger UI](https://swagger.io/swagger-ui/) and [ReDoc](https://rebilly.github.io/ReDoc/), some nice tools to display the |
5 | 5 | API documentation in a user friendly way.
|
6 | 6 |
|
7 | 7 | 
|
@@ -54,12 +54,12 @@ final class SwaggerDecorator implements NormalizerInterface
|
54 | 54 |
|
55 | 55 | // e.g. add a custom parameter
|
56 | 56 | $docs['paths']['/foos']['get']['parameters'][] = $customDefinition;
|
57 |
| - |
| 57 | + |
58 | 58 | // e.g. remove an existing parameter
|
59 | 59 | $docs['paths']['/foos']['get']['parameters'] = array_values(array_filter($docs['paths']['/foos']['get']['parameters'], function ($param){
|
60 | 60 | return $param['name'] !== 'bar';
|
61 | 61 | }));
|
62 |
| - |
| 62 | + |
63 | 63 | // Override title
|
64 | 64 | $docs['info']['title'] = 'My Api Foo';
|
65 | 65 |
|
@@ -346,10 +346,10 @@ You can also dump your current Swagger documentation using the provided command:
|
346 | 346 | $ docker-compose exec php bin/console api:swagger:export
|
347 | 347 | # Swagger documentation in JSON format...
|
348 | 348 |
|
349 |
| -$ docker-compose exec php bin/console api:swagger:export --yaml |
350 |
| -# Swagger documentation in YAML format... |
| 349 | +$ docker-compose exec php bin/console api:swagger:export --yaml |
| 350 | +# Swagger documentation in YAML format... |
351 | 351 |
|
352 |
| -$ docker-compose exec php bin/console api:swagger:export --output=swagger_docs.json |
| 352 | +$ docker-compose exec php bin/console api:swagger:export --output=swagger_docs.json |
353 | 353 | # Swagger documentation dumped directly into JSON file (add --yaml to change format)
|
354 | 354 | ```
|
355 | 355 |
|
|
0 commit comments