Search in sources :

Example 1 with MethodAnnotationProcessor

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

the class ApiResponsesMethodProcessor method process.

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

Example 2 with MethodAnnotationProcessor

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

the class ResponseHeadersProcessor method process.

@Override
public void process(Object annotation, OperationGenerator operationGenerator) {
    ResponseHeaders responseHeaders = (ResponseHeaders) annotation;
    MethodAnnotationProcessor processor = operationGenerator.getContext().findMethodAnnotationProcessor(ResponseHeader.class);
    for (ResponseHeader responseHeader : responseHeaders.value()) {
        processor.process(responseHeader, operationGenerator);
    }
}
Also used : ResponseHeader(io.swagger.annotations.ResponseHeader) MethodAnnotationProcessor(org.apache.servicecomb.swagger.generator.core.MethodAnnotationProcessor) ResponseHeaders(org.apache.servicecomb.swagger.extend.annotations.ResponseHeaders)

Example 3 with MethodAnnotationProcessor

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

the class ApiImplicitParamsMethodProcessor method process.

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

Aggregations

MethodAnnotationProcessor (org.apache.servicecomb.swagger.generator.core.MethodAnnotationProcessor)3 ApiImplicitParam (io.swagger.annotations.ApiImplicitParam)1 ApiImplicitParams (io.swagger.annotations.ApiImplicitParams)1 ApiResponse (io.swagger.annotations.ApiResponse)1 ApiResponses (io.swagger.annotations.ApiResponses)1 ResponseHeader (io.swagger.annotations.ResponseHeader)1 ResponseHeaders (org.apache.servicecomb.swagger.extend.annotations.ResponseHeaders)1