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

feat(config): allow to disable api platform support #2401

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

r-pierre-viously
Copy link

Description

Suggestion: allow to disable ApiPlatform support. In fact, you may want to document a part of your application (if you have endpoints that are not served by ApiPlatform) by NelmioDocBundle. If this configuration is loaded, the ApiPlatform endpoints are added in all areas of the documentation.

Please let me know what you think of this situation, or if there is any other way to do this.

What type of PR is this? (check all applicable)

  • Bug Fix
  • Feature
  • Refactor
  • Deprecation
  • Breaking Change
  • Documentation Update
  • CI

Checklist

  • I have made corresponding changes to the documentation (docs/)
  • I have made corresponding changes to the changelog (CHANGELOG.md)

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.10%. Comparing base (86d1a11) to head (e7aaf55).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2401      +/-   ##
==========================================
+ Coverage   90.09%   90.10%   +0.01%     
==========================================
  Files          94       94              
  Lines        3059     3063       +4     
==========================================
+ Hits         2756     2760       +4     
  Misses        303      303              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -29,6 +29,10 @@ public function getConfigTreeBuilder(): TreeBuilder
->info('If true, `groups` passed to @Model annotations will be used to limit validation constraints')
->defaultFalse()
->end()
->booleanNode('api_platform_support')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->booleanNode('api_platform_support')
->booleanNode('api_platform')

@@ -29,6 +29,10 @@ public function getConfigTreeBuilder(): TreeBuilder
->info('If true, `groups` passed to @Model annotations will be used to limit validation constraints')
->defaultFalse()
->end()
->booleanNode('api_platform_support')
->info('If false, the service declaration that support ApiPlatform will not be loaded even if ApiPlatform is detected in your installation')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->info('If false, the service declaration that support ApiPlatform will not be loaded even if ApiPlatform is detected in your installation')
->info('Enable API Platform integration'')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants