0

Only the Account Resource is picked up by swagger. None of the other JHipster controllers (User Resource, etc.), or any of my custom controllers are picked up and shown by Swagger UI.

I have not made any changes to the swagger configuration in my JHipster project. This was working at some point but not sure when it stopped working. I check the default include pattern and ensured that it is not filtering it.

As you can see, the configuration for swagger is untouched. Any suggestions of what to look for would be appreciated.

SwaggerConfiguration.java:

public static final String DEFAULT_INCLUDE_PATTERN = "/api/.*";

Docket docket = new Docket(DocumentationType.SWAGGER_2)
            .apiInfo(apiInfo)
            .forCodeGeneration(true)
            .genericModelSubstitutes(ResponseEntity.class)
            .select()
            .paths(regex(DEFAULT_INCLUDE_PATTERN))
            .build();

application-dev.yml:

spring:
    profiles:
        active: dev
        include: swagger

application.yml:

swagger:
        title: myApp API
        description: myApp API documentation
        version: 0.0.1
        termsOfServiceUrl:
        contactName:
        contactUrl:
        contactEmail:
        license:
        licenseUrl:
Jose Gulisano
  • 1,281
  • 3
  • 11
  • 12

0 Answers0