Created
January 11, 2020 21:49
-
-
Save brunapereira/52033b00a81ad885a60c2950eb371fb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
class SwaggerResourceConfig { | |
@Primary | |
@Bean | |
fun swaggerResourcesProvider(defaultResourcesProvider: InMemorySwaggerResourcesProvider): SwaggerResourcesProvider { | |
return SwaggerResourcesProvider { | |
val resource = SwaggerResource() | |
resource.name = "Open API" | |
resource.swaggerVersion = "2.9.2" | |
resource.location = "/openapi.json" // troque pelo nome do arquivo que se encontra no diretório resources/public | |
val resources: ArrayList<SwaggerResource> = ArrayList(defaultResourcesProvider.get()) | |
resources.add(resource) | |
resources | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment