Added OpenAPI docs using nelmioAPIDocBundle.
CI / Docker Lint (push) Successful in 21s

This commit is contained in:
2024-09-20 21:29:23 +02:00
parent 0cf6f231a3
commit bfcd04c701
18 changed files with 610 additions and 20 deletions
+1
View File
@@ -11,4 +11,5 @@ return [
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
];
+9
View File
@@ -0,0 +1,9 @@
nelmio_api_doc:
documentation:
info:
title: SomniaRooms
description: A FOSS Hotel room booking system.
version: 1.0.0
areas: # to filter documented areas
path_patterns:
- ^/api(?!/doc$) # Accepts routes under /api except /api/doc
+10
View File
@@ -0,0 +1,10 @@
# Expose your documentation as JSON swagger compliant
app.swagger:
path: /api/doc.json
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger }
app.swagger_ui:
path: /api/swagger
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }