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

Swagger: Adds option to skip default tags #881

Merged
merged 2 commits into from
Jun 4, 2023

Conversation

davidwessman
Copy link
Contributor

[@method_description.resource._id] +
warning_tags +
@method_description.tag_list.tags
tags = if Apipie.configuration.generator.swagger.skip_default_tags?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it should be called skip_default_resource_tag since it still allows warning_tags? (Which has a separate config)

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm not mistaken swagger tags are only used in endpoints so I guess it's ok to leave it as is, fine by me either way.

@mathieujobin
Copy link
Collaborator

@PanosCodes can you please review this Swagger related change?

Copy link
Contributor

@PanosCodes PanosCodes left a comment

Choose a reason for hiding this comment

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

Nice work. LGTM 😀

One thing to keep in mind is that when no tags exist the expected SwaggerUI behavior is to group them under the default section. image

Feel free to check the Rubocop violations.

[@method_description.resource._id] +
warning_tags +
@method_description.tag_list.tags
tags = if Apipie.configuration.generator.swagger.skip_default_tags?
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm not mistaken swagger tags are only used in endpoints so I guess it's ok to leave it as is, fine by me either way.

- This option allows the resource tags to be manually specified
- Fixes Apipie#759
@davidwessman
Copy link
Contributor Author

@PanosCodes Fixed the rubocop warnings and rebased 🙂
@mathieujobin Good to go? 🙂

@mathieujobin mathieujobin merged commit 8c20f2b into Apipie:master Jun 4, 2023
@davidwessman davidwessman deleted the remove-default-tags branch June 4, 2023 06: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.

[Feature request] Remove default tags from generated swagger json
3 participants