diff --git a/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java b/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java index c20e9fa..5036185 100644 --- a/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java +++ b/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java @@ -11,23 +11,23 @@ @Configuration public class SpringdocConfiguration { - @Bean - public OpenAPI customOpenAPI() { - return new OpenAPI() - .components(new Components() - .addSecuritySchemes("bearer-key", - new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat("JWT"))) - .info(new Info().title("alura-flix-api") - .description("An API Rest about movies and series that implements Get, Post, Put and Delet methods." - + " Also implements JWT security with Spring Framework") - .contact(new Contact() - .name("Lauro Correia") - .email("lauro.silveira@ymail.com")) - .license(new License() - .name("Apache 2.0") - .url("http://voll.med/api/licenca") - ) - ); - } + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI() + .components(new Components() + .addSecuritySchemes("bearer-key", + new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat("JWT"))) + .info(new Info().title("alura-flix-api") + .description("An API Rest about movies and series that implements Get, Post, Put and Delet methods." + + " Also implements JWT security with Spring Framework") + .contact(new Contact() + .name("Lauro Correia") + .email("lauro.silveira@ymail.com")) + .license(new License() + .name("Apache 2.0") + .url("http://voll.med/api/licenca") + ) + ); + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9a54070..c940c3f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -17,3 +17,8 @@ api: security: # always commit the uri like this: ${JWT_SECRET} token-jwt-secret: ${JWT_SECRET} + +springdoc: + swagger-ui: + operations-sorter: method + tags-sorter: alpha \ No newline at end of file