From 62bd4c1300d9308c91e19909cb00f033a0215a9e Mon Sep 17 00:00:00 2001 From: lgromero Date: Fri, 13 Sep 2024 18:07:26 +0200 Subject: [PATCH] refs #734 Adds nelmio api doc configuration --- config/packages/nelmio_api_doc.yaml | 9 +++++++++ config/routes/nelmio_api_doc.yaml | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 config/packages/nelmio_api_doc.yaml create mode 100644 config/routes/nelmio_api_doc.yaml diff --git a/config/packages/nelmio_api_doc.yaml b/config/packages/nelmio_api_doc.yaml new file mode 100644 index 0000000..87a2989 --- /dev/null +++ b/config/packages/nelmio_api_doc.yaml @@ -0,0 +1,9 @@ +nelmio_api_doc: + documentation: + info: + title: My App + description: This is an awesome app! + version: 1.0.0 + areas: # to filter documented areas + path_patterns: + - ^/oggit # Accepts routes under /api except /api/doc diff --git a/config/routes/nelmio_api_doc.yaml b/config/routes/nelmio_api_doc.yaml new file mode 100644 index 0000000..364b4af --- /dev/null +++ b/config/routes/nelmio_api_doc.yaml @@ -0,0 +1,12 @@ +# Expose your documentation as JSON swagger compliant +app.swagger: + path: /api/doc.json + methods: GET + defaults: { _controller: nelmio_api_doc.controller.swagger } + +## Requires the Asset component and the Twig bundle +## $ composer require twig asset +#app.swagger_ui: +# path: /api/doc +# methods: GET +# defaults: { _controller: nelmio_api_doc.controller.swagger_ui }