ola.
após criar a classe do swagger configuration ele da o erro No operations defined in spec!
segue a classe
package br.com.alura.forum.config.swagger;
import java.util.Arrays;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;
import br.com.alura.forum.modelo.Usuario; import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.schema.ModelRef; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket;
@Configuration public class swaggerConfiguration {
@Bean
public Docket forumApi() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("br.alura.forum"))
.paths(PathSelectors.ant("/**"))
.build()
.ignoredParameterTypes(Usuario.class)
.globalOperationParameters(Arrays.asList(
new ParameterBuilder()
.name("Authorization")
.description("Header para token gerar o token JWT")
.modelRef(new ModelRef("string"))
.parameterType("header")
.required(false)
.build()));
}
}
obs: se eu comentar a linha do bean ele funciona , mas a parte de executar o delete não aparece o campo que precisa pra pegar o token