Search in sources :

Example 1 with ClassAnnotationProcessor

use of org.apache.servicecomb.swagger.generator.core.ClassAnnotationProcessor in project incubator-servicecomb-java-chassis by apache.

the class ApiImplicitParamsClassProcessor method process.

@Override
public void process(Object annotation, SwaggerGenerator swaggerGenerator) {
    ApiImplicitParams apiImplicitParamsAnnotation = (ApiImplicitParams) annotation;
    ClassAnnotationProcessor processor = swaggerGenerator.getContext().findClassAnnotationProcessor(ApiImplicitParam.class);
    for (ApiImplicitParam paramAnnotation : apiImplicitParamsAnnotation.value()) {
        processor.process(paramAnnotation, swaggerGenerator);
    }
}
Also used : ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) ClassAnnotationProcessor(org.apache.servicecomb.swagger.generator.core.ClassAnnotationProcessor) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam)

Example 2 with ClassAnnotationProcessor

use of org.apache.servicecomb.swagger.generator.core.ClassAnnotationProcessor in project incubator-servicecomb-java-chassis by apache.

the class ApiResponsesClassProcessor method process.

@Override
public void process(Object annotation, SwaggerGenerator swaggerGenerator) {
    ApiResponses apiResponses = (ApiResponses) annotation;
    ClassAnnotationProcessor processor = swaggerGenerator.getContext().findClassAnnotationProcessor(ApiResponse.class);
    for (ApiResponse apiResponse : apiResponses.value()) {
        processor.process(apiResponse, swaggerGenerator);
    }
}
Also used : ClassAnnotationProcessor(org.apache.servicecomb.swagger.generator.core.ClassAnnotationProcessor) ApiResponses(io.swagger.annotations.ApiResponses) ApiResponse(io.swagger.annotations.ApiResponse)

Aggregations

ClassAnnotationProcessor (org.apache.servicecomb.swagger.generator.core.ClassAnnotationProcessor)2 ApiImplicitParam (io.swagger.annotations.ApiImplicitParam)1 ApiImplicitParams (io.swagger.annotations.ApiImplicitParams)1 ApiResponse (io.swagger.annotations.ApiResponse)1 ApiResponses (io.swagger.annotations.ApiResponses)1