This commit is contained in:
afornerot
2022-02-21 09:36:27 +01:00
parent 8b0c3e95b4
commit 8170e02dab
15 changed files with 354 additions and 36 deletions

View File

@ -1,15 +1,11 @@
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest: null
# param_fetcher_listener: true
# allowed_methods_listener: true
# routing_loader: true
# view:
# view_response_listener: true
# exception:
# codes:
# App\Exception\MyException: 403
# messages:
# App\Exception\MyException: Forbidden area.
# format_listener:
# rules:
# - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener:
enabled: true
rules:
- { path: '/rest', priorities: ['json', 'xml'], fallback_format: 'html' }
- { path: '/', fallback_format: 'html' }

View File

@ -1,9 +1,9 @@
nelmio_api_doc:
documentation:
info:
title: My App
description: This is an awesome app!
title: '%appName%'
description:
version: 1.0.0
areas: # to filter documented areas
path_patterns:
- ^/api(?!/doc$) # Accepts routes under /api except /api/doc
- /rest # Accepts routes under /rest except /rest/doc