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

Namespace swagger configuration #862

Merged
merged 3 commits into from Apr 13, 2023

Conversation

PanosCodes
Copy link
Contributor

Why

In order to support multiple generator this PR moves the Swagger configuration attributes under Apipie.configuration.generator.swagger.*

How

  • It moves the swagger configuration under Apipie::Generator::Swagger::Config
  • When a configuration option is accessed thought the old config (Apipie.configuration.swagger_include_warning_tags?) an ActiveSupport::Deprecation warning is issued.

For example

DEPRECATION WARNING: config.swagger_include_warning_tags is deprecated.
Use config.generator.swagger.include_warning_tags instead.

In order to support multiple generator configurations we move the
Swagger config attributes under `Apipie.configuration.generator.swagger.`
Copy link
Collaborator

@mathieujobin mathieujobin left a comment

Choose a reason for hiding this comment

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

Wow !

)

Apipie.configuration.generator.swagger.content_type_input =
args[:swagger_content_type_input].to_sym
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am a bit confused how above, you've renamed swagger_content_type_input in the defaults as content_type_input but then, you keep using swagger_content_type_input here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I probably shouldn't renamed it 49c0e7d 😀

@PanosCodes PanosCodes force-pushed the namespace-swagger-config branch 2 times, most recently from 92e2175 to 49c0e7d Compare April 12, 2023 03:42
@mathieujobin mathieujobin merged commit 352edfe into Apipie:master Apr 13, 2023
18 checks passed
@PanosCodes PanosCodes deleted the namespace-swagger-config branch April 14, 2023 18:02
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.

None yet

2 participants