@Component
@Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER)
public class TestOperation implements ApiListingScannerPlugin {
// tag::api-listing-plugin[]
@Override
public List<ApiDescription> apply(DocumentationContext context) {
return new ArrayList<ApiDescription>(
Arrays.asList( //<1>
new ApiDescription(
"/bugs/1767",
"This is a bug",
Arrays.asList( //<2>
new OperationBuilder(
new CachingOperationNameGenerator())
.authorizations(new ArrayList())
.codegenMethodNameStem("bug1767GET") //<3>
.method(HttpMethod.GET)
.notes("This is a test method")
.parameters(
Arrays.asList( //<4>
new ParameterBuilder()
.description("search by description")
.type(new TypeResolver().resolve(String.class))
.name("description")
.parameterType("query")
.parameterAccess("access")
.required(true)
.modelRef(new ModelRef("string")) //<5>
.build()))
.build()),
false)));
}
// tag::api-listing-plugin[]
@Override
public boolean supports(DocumentationType delimiter) {
return DocumentationType.SWAGGER_2.equals(delimiter);
}
}
Hi James,
For springfox related issues, please file a ticket on the project. Springfox is a community project, and its authors don’t regularly monitor this mailing list.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.