Skip to content

Integrate swagger

Matthias Larisch requested to merge integrate-swagger into master

What does this MR do?

  • Integrates NelmioAPIDoc in a configuration to provide swagger UI and swagger API description.
  • For that it switches our twig usage to be integrated via TwigBundle
  • It integrates symfony assets to manage the swagger UI in the way supported by NelmioAPIDocBundle
    • This implies having the symfony asset build step included in our build pipeline.
    • It should not have any implications on webserverconfig etc. as it just uses existing asset folders.
  • Add very basic API documentation to ForumRestController as an example. Still I wonder about a nice way to not be too expressive with documentation. We might want to use more DTO-like objects on the API level in the future...

Read https://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html for some details on how to use the documentation feature.

How confident are you it won't break things if deployed?

Dev environment is fine and I took care not to change any settings. Still, should be watched closely on deploy.

Links to related issues

Related to !901 (closed)

How to test

Visit API docs in http://localhost:18080/api/doc/

Screenshots (if applicable)

Bildschirmfoto_von_2020-05-03_20-35-51

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Matthias Larisch

Merge request reports