symfony / recipes-contrib

Symfony Contrib Recipes Repositories
https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md
MIT License
528 stars 630 forks source link

Add initial configuration and setup for MVola bundle #1664

Closed dahromy closed 2 months ago

dahromy commented 2 months ago
Q A
License MIT
Packagist https://packagist.org/packages/dahromy/mvola-bundle
github-actions[bot] commented 2 months ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1664/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1664/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'dahromy/glide-symfony:^1.0' 'dahromy/mvola-bundle:^1.0' 'nelmio/api-doc-bundle:^3.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

nelmio/api-doc-bundle

2.13 vs 3.0 ```diff diff --git a/nelmio/api-doc-bundle/2.13/config/packages/nelmio_api_doc.yaml b/nelmio/api-doc-bundle/3.0/config/packages/nelmio_api_doc.yaml index 4ee4142d..30767e1e 100644 --- a/nelmio/api-doc-bundle/2.13/config/packages/nelmio_api_doc.yaml +++ b/nelmio/api-doc-bundle/3.0/config/packages/nelmio_api_doc.yaml @@ -1,22 +1,9 @@ -#nelmio_api_doc: -# exclude_sections: [] -# default_sections_opened: true -# motd: -# template: 'NelmioApiDocBundle::Components/motd.html.twig' -# request_listener: -# enabled: true -# parameter: _doc -# swagger: -# api_base_path: /api -# swagger_version: '1.2' -# api_version: '0.1' -# info: -# title: Symfony2 -# description: 'My awesome Symfony2 app!' -# TermsOfServiceUrl: null -# contact: null -# license: null -# licenseUrl: null -# cache: -# enabled: false -# file: '%kernel.cache_dir%/api-doc.cache' +nelmio_api_doc: + documentation: + info: + title: My App + description: This is an awesome app! + version: 1.0 + areas: # to filter documented areas + path_patterns: + - ^/api(?!/doc$) # Accepts routes under /api except /api/doc diff --git a/nelmio/api-doc-bundle/2.13/config/routes/nelmio_api_doc.yaml b/nelmio/api-doc-bundle/3.0/config/routes/nelmio_api_doc.yaml index 58ebd413..364b4af0 100644 --- a/nelmio/api-doc-bundle/2.13/config/routes/nelmio_api_doc.yaml +++ b/nelmio/api-doc-bundle/3.0/config/routes/nelmio_api_doc.yaml @@ -1,3 +1,12 @@ -NelmioApiDocBundle: - resource: "@NelmioApiDocBundle/Resources/config/routing.yml" - prefix: /api/doc +# 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 } ```