Search in sources :

Example 1 with MethodAnnotationProcessor

use of io.servicecomb.swagger.generator.core.MethodAnnotationProcessor in project java-chassis by ServiceComb.

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(io.servicecomb.swagger.generator.core.MethodAnnotationProcessor) ApiResponses(io.swagger.annotations.ApiResponses) ApiResponse(io.swagger.annotations.ApiResponse)

Example 2 with MethodAnnotationProcessor

use of io.servicecomb.swagger.generator.core.MethodAnnotationProcessor in project java-chassis by ServiceComb.

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(io.servicecomb.swagger.generator.core.MethodAnnotationProcessor) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam)

Example 3 with MethodAnnotationProcessor

use of io.servicecomb.swagger.generator.core.MethodAnnotationProcessor in project java-chassis by ServiceComb.

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(io.servicecomb.swagger.generator.core.MethodAnnotationProcessor) ResponseHeaders(io.servicecomb.swagger.extend.annotations.ResponseHeaders)

Aggregations

MethodAnnotationProcessor (io.servicecomb.swagger.generator.core.MethodAnnotationProcessor)3 ResponseHeaders (io.servicecomb.swagger.extend.annotations.ResponseHeaders)1 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