I'm a new developer and I have to create a Swagger API Documentation separately of the APIs to use as LIB of them.
I already created a Swagger Documentation for APIs using the Swagger into the API adding a Config class with the code below:
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket swagger() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("br.com.apiexample"))
.paths(PathSelectors.any())
.build();
}
}
But I don't know if is possible to create separately and if is, how can I do it?