micronaut-projects / micronaut-openapi

Generates OpenAPI / Swagger Documentation for Micronaut projects
https://micronaut-projects.github.io/micronaut-openapi/latest/guide/index.html
Apache License 2.0
79 stars 93 forks source link

Filtering groups by packages #1736

Closed DKarim closed 3 weeks ago

DKarim commented 1 month ago

Expected Behavior

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

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.*
  2. Add a controller in any other package exposing a request/response containing another custom defined class
  3. 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

Example Application

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

Version

4.3.1