Class OperationService


  • public class OperationService
    extends Object
    The type Operation builder.
    Author:
    bnasslahsen
    • Constructor Detail

      • OperationService

        public OperationService​(GenericParameterService parameterBuilder,
                                RequestBodyService requestBodyService,
                                SecurityService securityParser,
                                PropertyResolverUtils propertyResolverUtils,
                                Optional<JavadocProvider> javadocProvider)
        Instantiates a new Operation builder.
        Parameters:
        parameterBuilder - the parameter builder
        requestBodyService - the request body builder
        securityParser - the security parser
        propertyResolverUtils - the property resolver utils
        javadocProvider - the javadoc provider
    • Method Detail

      • parse

        public io.swagger.v3.oas.models.OpenAPI parse​(io.swagger.v3.oas.annotations.Operation apiOperation,
                                                      io.swagger.v3.oas.models.Operation operation,
                                                      io.swagger.v3.oas.models.OpenAPI openAPI,
                                                      MethodAttributes methodAttributes)
        Parse open api.
        Parameters:
        apiOperation - the api operation
        operation - the operation
        openAPI - the open api
        methodAttributes - the method attributes
        Returns:
        the open api
      • isHidden

        public boolean isHidden​(Method method)
        Is hidden boolean.
        Parameters:
        method - the method
        Returns:
        the boolean
      • buildCallbacks

        public Optional<Map<String,​io.swagger.v3.oas.models.callbacks.Callback>> buildCallbacks​(Set<io.swagger.v3.oas.annotations.callbacks.Callback> apiCallbacks,
                                                                                                      io.swagger.v3.oas.models.OpenAPI openAPI,
                                                                                                      MethodAttributes methodAttributes)
        Build callbacks optional.
        Parameters:
        apiCallbacks - the api callbacks
        openAPI - the open api
        methodAttributes - the method attributes
        Returns:
        the optional
      • getOperationId

        public String getOperationId​(String operationId,
                                     io.swagger.v3.oas.models.OpenAPI openAPI)
        Gets operation id.
        Parameters:
        operationId - the operation id
        openAPI - the open api
        Returns:
        the operation id
      • getOperationId

        public String getOperationId​(String operationId,
                                     String oldOperationId,
                                     io.swagger.v3.oas.models.OpenAPI openAPI)
        Gets operation id.
        Parameters:
        operationId - the operation id
        oldOperationId - the old operation id
        openAPI - the open api
        Returns:
        the operation id
      • mergeOperation

        public io.swagger.v3.oas.models.Operation mergeOperation​(io.swagger.v3.oas.models.Operation operation,
                                                                 io.swagger.v3.oas.models.Operation operationModel)
        Merge operation operation.
        Parameters:
        operation - the operation
        operationModel - the operation model
        Returns:
        the operation
      • getJavadocProvider

        public JavadocProvider getJavadocProvider()
        Gets javadoc provider.
        Returns:
        the javadoc provider