Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Replace Swagger with OpenAPI #15158

Merged

Conversation

coldic3
Copy link
Contributor

@coldic3 coldic3 commented Jul 11, 2023

Q A
Branch? 1.13
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Related tickets fixes #14877, #14553
License MIT

In this PR I do several things:

  1. Remove SwaggerUiAction that overrides API Platform's one. It was used (if I see correctly) only to add a custom twig template. Thanks to the removal of overwritten action, we use OpenAPI instead of Swagger. I don't know how to override twig template in a bundle, so I do it templates/bundles. I think no one uses ApiBundle separately ;)
  2. Remove normalizers located in Sylius\Bundle\ApiBundle\Swagger and decorate api_platform.openapi.factory. DocumentationModifierInterface do the same what normalizers were doing.

@coldic3 coldic3 requested a review from a team as a code owner July 11, 2023 18:51
@probot-autolabeler probot-autolabeler bot added API APIs related issues and PRs. Maintenance CI configurations, READMEs, releases, etc. labels Jul 11, 2023
@coldic3 coldic3 force-pushed the feature/replace-swagger-with-open-api branch from d7ba2e0 to 5d13875 Compare July 11, 2023 18:53
@github-actions
Copy link

github-actions bot commented Jul 11, 2023

Bunnyshell Preview Environment deleted

Available commands:

  • /bns:deploy to redeploy the environment

@coldic3 coldic3 force-pushed the feature/replace-swagger-with-open-api branch from 5d13875 to b7cb6ac Compare July 11, 2023 19:07
@coldic3 coldic3 marked this pull request as draft July 12, 2023 07:06
@coldic3 coldic3 force-pushed the feature/replace-swagger-with-open-api branch from b7cb6ac to 2554fd6 Compare July 12, 2023 07:54
@coldic3 coldic3 marked this pull request as ready for review July 12, 2023 07:55
@jakubtobiasz
Copy link
Member

/bns:start

@pmikolajek1
Copy link

Any movement on this? We also encountered this problem in our project. Json and html versions of api docs being different is a headache, as is OpenApiFactory only applying to json, but not to html.

@jakubtobiasz jakubtobiasz merged commit 97945ca into Sylius:1.13 Jul 30, 2023
25 checks passed
@jakubtobiasz
Copy link
Member

Thank you, @coldic3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs. Maintenance CI configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the /api/v2/shop/authentication-token route is missing from JSON generated with 'api:openapi:export' command
4 participants