Package org.openapitools.codegen
Class CodegenOperation
- java.lang.Object
-
- org.openapitools.codegen.CodegenOperation
-
- Direct Known Subclasses:
TypeScriptFetchClientCodegen.ExtendedCodegenOperation
public class CodegenOperation extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CodegenOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,CodegenOperation>contentTypeToOperation()booleanequals(Object o)booleangetAllResponsesAreErrors()booleangetHasBodyOrFormParams()Check if there's at least one body parameter or at least one form parameterbooleangetHasBodyParam()Check if there's at least one body parameterbooleangetHasCookieParams()Check if there's at least one form parameterbooleangetHasDefaultResponse()Check if there's a default responsebooleangetHasExamples()Check if there's at least one example parameterbooleangetHasFormParams()Check if there's at least one form parameterbooleangetHasHeaderParams()Check if there's at least one header parameterbooleangetHasNonBodyParams()Check if there's at least one parameter which is not a body parameterbooleangetHasNotNullableParams()booleangetHasOnlyDefaultResponse()Check if the responses contain only 1 entry and it's defaultbooleangetHasOptionalParams()Check if there's at least one optional parameterbooleangetHasParams()Check if there's at least one parameterbooleangetHasPathParams()Check if there's at least one path parameterbooleangetHasQueryParams()Check if there's at least one query parameterbooleangetHasQueryParamsOrAuth()Check if there's at least one query parameter or passing API keys in querybooleangetHasRequiredAndNotNullableParams()booleangetHasRequiredParam()Check if there's at least one required parameterbooleangetHasRequiredParams()Check if there's at least one required parameterbooleangetHasResponseHeaders()Check if there's at least one response headerbooleangetHasSingleParam()Check if there's exactly one parameterbooleangetHasVendorExtensions()Check if there's at least one vendor extensioninthashCode()booleanisBodyAllowed()Check if body param is allowed for the request methodbooleanisRestful()Check if Restful-stylebooleanisRestfulCreate()Check if act as Restful create methodbooleanisRestfulDestroy()Check if act as Restful destroy methodbooleanisRestfulIndex()Check if act as Restful index methodbooleanisRestfulShow()Check if act as Restful show methodbooleanisRestfulUpdate()Check if act as Restful update methodbooleanproducesTextPlain()Check if operation produces text/plain responses.StringtoString()
-
-
-
Field Detail
-
responseHeaders
public final List<CodegenProperty> responseHeaders
-
hasAuthMethods
public boolean hasAuthMethods
-
hasConsumes
public boolean hasConsumes
-
hasProduces
public boolean hasProduces
-
hasOptionalParams
public boolean hasOptionalParams
-
returnTypeIsPrimitive
public boolean returnTypeIsPrimitive
-
returnSimpleType
public boolean returnSimpleType
-
subresourceOperation
public boolean subresourceOperation
-
isMap
public boolean isMap
-
isArray
public boolean isArray
-
isMultipart
public boolean isMultipart
-
isVoid
public boolean isVoid
-
hasVersionHeaders
public boolean hasVersionHeaders
-
hasVersionQueryParams
public boolean hasVersionQueryParams
-
isResponseBinary
public boolean isResponseBinary
-
isResponseFile
public boolean isResponseFile
-
isResponseOptional
public boolean isResponseOptional
-
hasReference
public boolean hasReference
-
defaultReturnType
public boolean defaultReturnType
-
isDeprecated
public boolean isDeprecated
-
isCallbackRequest
public boolean isCallbackRequest
-
uniqueItems
public boolean uniqueItems
-
hasErrorResponseObject
public boolean hasErrorResponseObject
-
returnProperty
public CodegenProperty returnProperty
-
path
public String path
-
operationId
public String operationId
-
returnType
public String returnType
-
returnFormat
public String returnFormat
-
httpMethod
public String httpMethod
-
returnBaseType
public String returnBaseType
-
returnContainer
public String returnContainer
-
summary
public String summary
-
unescapedNotes
public String unescapedNotes
-
notes
public String notes
-
baseName
public String baseName
-
defaultResponse
public String defaultResponse
-
discriminator
public CodegenDiscriminator discriminator
-
servers
public List<CodegenServer> servers
-
bodyParam
public CodegenParameter bodyParam
-
allParams
public List<CodegenParameter> allParams
-
bodyParams
public List<CodegenParameter> bodyParams
-
pathParams
public List<CodegenParameter> pathParams
-
queryParams
public List<CodegenParameter> queryParams
-
headerParams
public List<CodegenParameter> headerParams
-
implicitHeadersParams
public List<CodegenParameter> implicitHeadersParams
-
constantParams
public List<CodegenParameter> constantParams
-
formParams
public List<CodegenParameter> formParams
-
cookieParams
public List<CodegenParameter> cookieParams
-
requiredParams
public List<CodegenParameter> requiredParams
-
optionalParams
public List<CodegenParameter> optionalParams
-
requiredAndNotNullableParams
public List<CodegenParameter> requiredAndNotNullableParams
-
notNullableParams
public List<CodegenParameter> notNullableParams
-
authMethods
public List<CodegenSecurity> authMethods
-
tags
public List<io.swagger.v3.oas.models.tags.Tag> tags
-
responses
public List<CodegenResponse> responses
-
callbacks
public List<CodegenCallback> callbacks
-
externalDocs
public io.swagger.v3.oas.models.ExternalDocumentation externalDocs
-
nickname
public String nickname
-
operationIdOriginal
public String operationIdOriginal
-
operationIdLowerCase
public String operationIdLowerCase
-
operationIdCamelCase
public String operationIdCamelCase
-
operationIdSnakeCase
public String operationIdSnakeCase
-
-
Method Detail
-
getHasParams
public boolean getHasParams()
Check if there's at least one parameter- Returns:
- true if parameter exists, false otherwise
-
getHasRequiredParam
public boolean getHasRequiredParam()
Check if there's at least one required parameter- Returns:
- true if required parameter exists, false otherwise
-
getHasSingleParam
public boolean getHasSingleParam()
Check if there's exactly one parameter- Returns:
- true if exactly one parameter exists, false otherwise
-
getHasBodyParam
public boolean getHasBodyParam()
Check if there's at least one body parameter- Returns:
- true if body parameter exists, false otherwise
-
getHasQueryParams
public boolean getHasQueryParams()
Check if there's at least one query parameter- Returns:
- true if query parameter exists, false otherwise
-
getHasQueryParamsOrAuth
public boolean getHasQueryParamsOrAuth()
Check if there's at least one query parameter or passing API keys in query- Returns:
- true if query parameter exists or passing API keys in query, false otherwise
-
getHasHeaderParams
public boolean getHasHeaderParams()
Check if there's at least one header parameter- Returns:
- true if header parameter exists, false otherwise
-
getHasPathParams
public boolean getHasPathParams()
Check if there's at least one path parameter- Returns:
- true if path parameter exists, false otherwise
-
getHasFormParams
public boolean getHasFormParams()
Check if there's at least one form parameter- Returns:
- true if any form parameter exists, false otherwise
-
getHasBodyOrFormParams
public boolean getHasBodyOrFormParams()
Check if there's at least one body parameter or at least one form parameter- Returns:
- true if body or form parameter exists, false otherwise
-
getHasCookieParams
public boolean getHasCookieParams()
Check if there's at least one form parameter- Returns:
- true if any cookie parameter exists, false otherwise
-
getHasNonBodyParams
public boolean getHasNonBodyParams()
Check if there's at least one parameter which is not a body parameter- Returns:
- true if any non body parameter exists, false otherwise
-
getHasOptionalParams
public boolean getHasOptionalParams()
Check if there's at least one optional parameter- Returns:
- true if any optional parameter exists, false otherwise
-
getHasRequiredAndNotNullableParams
public boolean getHasRequiredAndNotNullableParams()
-
getHasNotNullableParams
public boolean getHasNotNullableParams()
-
getHasRequiredParams
public boolean getHasRequiredParams()
Check if there's at least one required parameter- Returns:
- true if any optional parameter exists, false otherwise
-
getHasResponseHeaders
public boolean getHasResponseHeaders()
Check if there's at least one response header- Returns:
- true if header response exists, false otherwise
-
getHasExamples
public boolean getHasExamples()
Check if there's at least one example parameter- Returns:
- true if examples parameter exists, false otherwise
-
getHasDefaultResponse
public boolean getHasDefaultResponse()
Check if there's a default response- Returns:
- true if responses contain a default response, false otherwise
-
getHasOnlyDefaultResponse
public boolean getHasOnlyDefaultResponse()
Check if the responses contain only 1 entry and it's default- Returns:
- true if responses contain only 1 entry and it's a default response, false otherwise
-
getAllResponsesAreErrors
public boolean getAllResponsesAreErrors()
-
contentTypeToOperation
public Map<String,CodegenOperation> contentTypeToOperation()
- Returns:
- contentTypeToOperation returns a map where the key is the request body content type and the value is the current CodegenOperation this is needed by templates when a different signature is needed for each request body content type
-
getHasVendorExtensions
public boolean getHasVendorExtensions()
Check if there's at least one vendor extension- Returns:
- true if vendor extensions exists, false otherwise
-
isRestfulIndex
public boolean isRestfulIndex()
Check if act as Restful index method- Returns:
- true if act as Restful index method, false otherwise
-
isRestfulShow
public boolean isRestfulShow()
Check if act as Restful show method- Returns:
- true if act as Restful show method, false otherwise
-
isRestfulCreate
public boolean isRestfulCreate()
Check if act as Restful create method- Returns:
- true if act as Restful create method, false otherwise
-
isRestfulUpdate
public boolean isRestfulUpdate()
Check if act as Restful update method- Returns:
- true if act as Restful update method, false otherwise
-
isBodyAllowed
public boolean isBodyAllowed()
Check if body param is allowed for the request method- Returns:
- true request method is PUT, PATCH or POST; false otherwise
-
isRestfulDestroy
public boolean isRestfulDestroy()
Check if act as Restful destroy method- Returns:
- true if act as Restful destroy method, false otherwise
-
isRestful
public boolean isRestful()
Check if Restful-style- Returns:
- true if Restful-style, false otherwise
-
producesTextPlain
public boolean producesTextPlain()
Check if operation produces text/plain responses. NOTE: This does not mean it _only_ produces text/plain, just that it is one of the produces types.- Returns:
- true if at least one produces is text/plain
-
-