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

Filtering groups by packages #1736

Closed
DKarim opened this issue Aug 27, 2024 · 0 comments · Fixed by #1737
Closed

Filtering groups by packages #1736

DKarim opened this issue Aug 27, 2024 · 0 comments · Fixed by #1737

Comments

@DKarim
Copy link

DKarim commented Aug 27, 2024

Expected Behavior

When using yaml configuration micronaut.openapi.groups.*.packages I expect:

  • controllers not in this package to not be included in the doc
  • classes used in other controllers only to not be included in schema

Actual Behaviour

Endpoints are properly excluded from the generated doc.
But any class used in filtered out controllers request/response classes is exposed in schema.

Steps To Reproduce

  1. Add configuration:
micronaut:
  openapi:
    groups:
      visible:
        common-exclude: true
        packages: com.example.visible.*
  1. Add a controller in any other package exposing a request/response containing another custom defined class
  2. Compile and check the output, the class used in request/response appears in the generated doc

Worth noticing: the request/response itself does not appear in the doc

Environment Information

  • OS: Mac Sonoma 14.5
  • Micronaut version: 4.3.1
  • micronaut openapi version: 6.5.1
  • JDK version: Azul Zulu OpenJDK 64-Bit Server VM 17.0.12+7-LTS

Example Application

https://github.com/DKarim/open-api-groups-packages

Version

4.3.1

altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 28, 2024
altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 28, 2024
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 a pull request may close this issue.

1 participant