You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/openapi.md
+26
Original file line number
Diff line number
Diff line change
@@ -717,6 +717,10 @@ framework:
717
717
718
718
## Overriding the UI Template
719
719
720
+
You can extend the default UI Template using the Symfony and Laravel instructions below:
721
+
722
+
### Overriding the UI Template using Symfony
723
+
720
724
As described [in the Symfony documentation](https://symfony.com/doc/current/templating/overriding.html), it's possible to override the Twig template that loads Swagger UI and renders the documentation:
721
725
722
726
```twig
@@ -732,6 +736,28 @@ As described [in the Symfony documentation](https://symfony.com/doc/current/temp
732
736
733
737
You may want to copy the [one shipped with API Platform](https://github.com/api-platform/core/blob/main/src/Symfony/Bundle/Resources/views/SwaggerUi/index.html.twig) and customize it.
734
738
739
+
### Overriding the UI Template using Laravel
740
+
741
+
As described [in the Laravel documentation](https://laravel.com/docs/blade#extending-a-layout), it's possible to override the Blade template that loads Swagger UI and renders the documentation:
742
+
743
+
```blade
744
+
{# resources/views/swagger-ui.blade.php #}
745
+
<!DOCTYPE html>
746
+
<html>
747
+
<head>
748
+
<meta charset="UTF-8">
749
+
<title>
750
+
@if(isset($title))
751
+
{{ $title }}
752
+
@endif
753
+
My custom template
754
+
</title>
755
+
{# ... #}
756
+
</html>
757
+
```
758
+
759
+
You may want to copy the [one shipped with API Platform](https://github.com/api-platform/core/blob/main/src/Laravel/resources/views/swagger-ui.blade.php) and customize it.
760
+
735
761
## Compatibility Layer with Amazon API Gateway
736
762
737
763
[AWS API Gateway](https://aws.amazon.com/api-gateway/) supports OpenAPI partially, but it [requires some changes](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html).
0 commit comments