How to disable dgs-graphql framework controllers in swagger

462 Views Asked by At

I am using dgs-graphql and for REST Apis, I have configured the swagger (springdoc-open-api). When I am accessing the swagger ui, I am getting dgs-rest-schema-json-controller and dgs-rest-controller swaggers which are related to graphql.

How can I configure my swagger, so that those graphql swaggers wont appear in my swagger-ui?

1

There are 1 best solutions below

0
On

You can exclude certain packages via config https://springdoc.org/properties.html:

springdoc.packages-to-exclude

List of Strings.The list of packages to exclude (comma separated)

In application.yml

springdoc:
  packages-to-exclude: com.netflix.graphql.dgs.mvc