Search in sources :

Example 1 with HttpMethod

use of org.eclipse.microprofile.openapi.models.PathItem.HttpMethod in project Payara by payara.

the class CallbackImpl method applyCallbackOperationAnnotation.

private static void applyCallbackOperationAnnotation(PathItem pathItem, Operation callbackOperation, boolean override, ApiContext context) {
    if (callbackOperation instanceof OperationImpl) {
        OperationImpl callbackOperationImpl = (OperationImpl) callbackOperation;
        if (callbackOperationImpl.getMethod() != null) {
            HttpMethod method = getHttpMethod(callbackOperationImpl.getMethod());
            if (method != null) {
                Operation operation = getOrCreateOperation(pathItem, method);
                OperationImpl.merge(callbackOperation, operation, override, context);
            }
        }
    }
}
Also used : OperationImpl(fish.payara.microprofile.openapi.impl.model.OperationImpl) Operation(org.eclipse.microprofile.openapi.models.Operation) ModelUtils.getOrCreateOperation(fish.payara.microprofile.openapi.impl.model.util.ModelUtils.getOrCreateOperation) HttpMethod(org.eclipse.microprofile.openapi.models.PathItem.HttpMethod) ModelUtils.getHttpMethod(fish.payara.microprofile.openapi.impl.model.util.ModelUtils.getHttpMethod)

Aggregations

OperationImpl (fish.payara.microprofile.openapi.impl.model.OperationImpl)1 ModelUtils.getHttpMethod (fish.payara.microprofile.openapi.impl.model.util.ModelUtils.getHttpMethod)1 ModelUtils.getOrCreateOperation (fish.payara.microprofile.openapi.impl.model.util.ModelUtils.getOrCreateOperation)1 Operation (org.eclipse.microprofile.openapi.models.Operation)1 HttpMethod (org.eclipse.microprofile.openapi.models.PathItem.HttpMethod)1