CodegenOperation & CodegenProperty: turn fields into getters (#21225)

* turn fields into getters

* update samples
This commit is contained in:
martin-mfg 2025-05-07 09:04:04 +02:00 committed by GitHub
parent 5e5a053bfa
commit 5117616b53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 30 additions and 84 deletions

View File

@ -24,15 +24,13 @@ import java.util.*;
public class CodegenOperation { public class CodegenOperation {
public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>(); public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>();
public boolean hasAuthMethods, hasConsumes, hasProduces, hasOptionalParams, hasRequiredParams, public boolean hasAuthMethods, hasConsumes, hasProduces, hasOptionalParams,
returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart, isVoid = false, isArray, isMultipart, isVoid = false,
hasVersionHeaders = false, hasVersionQueryParams = false, hasVersionHeaders = false, hasVersionQueryParams = false,
isResponseBinary = false, isResponseFile = false, isResponseOptional = false, hasReference = false, defaultReturnType = false, isResponseBinary = false, isResponseFile = false, isResponseOptional = false, hasReference = false, defaultReturnType = false,
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isDeprecated, isCallbackRequest, uniqueItems,
isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false, hasOnlyDefaultResponse = false, hasConstantParams = false, hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined
hasErrorResponseObject, // if 4xx, 5xx responses have at least one error object defined
hasSingleParam = false; // if the operation has only one parameter;
public CodegenProperty returnProperty; public CodegenProperty returnProperty;
public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType, public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType,
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse; returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse;
@ -90,6 +88,24 @@ public class CodegenOperation {
return nonEmpty(allParams); return nonEmpty(allParams);
} }
/**
* Check if there's at least one required parameter
*
* @return true if required parameter exists, false otherwise
*/
public boolean getHasRequiredParam() {
return nonEmpty(requiredParams);
}
/**
* Check if there's exactly one parameter
*
* @return true if exactly one parameter exists, false otherwise
*/
public boolean getHasSingleParam() {
return allParams.size() == 1;
}
/** /**
* Check if there's at least one body parameter * Check if there's at least one body parameter
* *
@ -372,7 +388,6 @@ public class CodegenOperation {
sb.append(", hasConsumes=").append(hasConsumes); sb.append(", hasConsumes=").append(hasConsumes);
sb.append(", hasProduces=").append(hasProduces); sb.append(", hasProduces=").append(hasProduces);
sb.append(", hasOptionalParams=").append(hasOptionalParams); sb.append(", hasOptionalParams=").append(hasOptionalParams);
sb.append(", hasRequiredParams=").append(hasRequiredParams);
sb.append(", returnTypeIsPrimitive=").append(returnTypeIsPrimitive); sb.append(", returnTypeIsPrimitive=").append(returnTypeIsPrimitive);
sb.append(", returnSimpleType=").append(returnSimpleType); sb.append(", returnSimpleType=").append(returnSimpleType);
sb.append(", subresourceOperation=").append(subresourceOperation); sb.append(", subresourceOperation=").append(subresourceOperation);
@ -385,16 +400,7 @@ public class CodegenOperation {
sb.append(", isResponseFile=").append(isResponseFile); sb.append(", isResponseFile=").append(isResponseFile);
sb.append(", isResponseOptional=").append(isResponseOptional); sb.append(", isResponseOptional=").append(isResponseOptional);
sb.append(", hasReference=").append(hasReference); sb.append(", hasReference=").append(hasReference);
sb.append(", hasDefaultResponse=").append(hasDefaultResponse);
sb.append(", hasOnlyDefaultResponse=").append(hasOnlyDefaultResponse);
sb.append(", hasErrorResponseObject=").append(hasErrorResponseObject); sb.append(", hasErrorResponseObject=").append(hasErrorResponseObject);
sb.append(", hasSingleParam=").append(hasSingleParam);
sb.append(", isRestfulIndex=").append(isRestfulIndex);
sb.append(", isRestfulShow=").append(isRestfulShow);
sb.append(", isRestfulCreate=").append(isRestfulCreate);
sb.append(", isRestfulUpdate=").append(isRestfulUpdate);
sb.append(", isRestfulDestroy=").append(isRestfulDestroy);
sb.append(", isRestful=").append(isRestful);
sb.append(", isDeprecated=").append(isDeprecated); sb.append(", isDeprecated=").append(isDeprecated);
sb.append(", isCallbackRequest=").append(isCallbackRequest); sb.append(", isCallbackRequest=").append(isCallbackRequest);
sb.append(", uniqueItems='").append(uniqueItems); sb.append(", uniqueItems='").append(uniqueItems);
@ -454,7 +460,6 @@ public class CodegenOperation {
hasConsumes == that.hasConsumes && hasConsumes == that.hasConsumes &&
hasProduces == that.hasProduces && hasProduces == that.hasProduces &&
hasOptionalParams == that.hasOptionalParams && hasOptionalParams == that.hasOptionalParams &&
hasRequiredParams == that.hasRequiredParams &&
returnTypeIsPrimitive == that.returnTypeIsPrimitive && returnTypeIsPrimitive == that.returnTypeIsPrimitive &&
returnSimpleType == that.returnSimpleType && returnSimpleType == that.returnSimpleType &&
subresourceOperation == that.subresourceOperation && subresourceOperation == that.subresourceOperation &&
@ -466,16 +471,7 @@ public class CodegenOperation {
isResponseFile == that.isResponseFile && isResponseFile == that.isResponseFile &&
isResponseOptional == that.isResponseOptional && isResponseOptional == that.isResponseOptional &&
hasReference == that.hasReference && hasReference == that.hasReference &&
hasDefaultResponse == that.hasDefaultResponse &&
hasOnlyDefaultResponse == that.hasOnlyDefaultResponse &&
hasErrorResponseObject == that.hasErrorResponseObject && hasErrorResponseObject == that.hasErrorResponseObject &&
hasSingleParam == that.hasSingleParam &&
isRestfulIndex == that.isRestfulIndex &&
isRestfulShow == that.isRestfulShow &&
isRestfulCreate == that.isRestfulCreate &&
isRestfulUpdate == that.isRestfulUpdate &&
isRestfulDestroy == that.isRestfulDestroy &&
isRestful == that.isRestful &&
isDeprecated == that.isDeprecated && isDeprecated == that.isDeprecated &&
isCallbackRequest == that.isCallbackRequest && isCallbackRequest == that.isCallbackRequest &&
uniqueItems == that.uniqueItems && uniqueItems == that.uniqueItems &&
@ -530,15 +526,14 @@ public class CodegenOperation {
public int hashCode() { public int hashCode() {
return Objects.hash(responseHeaders, hasAuthMethods, hasConsumes, hasProduces, hasOptionalParams, return Objects.hash(responseHeaders, hasAuthMethods, hasConsumes, hasProduces, hasOptionalParams,
hasRequiredParams, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart, isVoid, isResponseBinary, isResponseFile, isResponseOptional, hasReference, isArray, isMultipart, isVoid, isResponseBinary, isResponseFile, isResponseOptional, hasReference,
hasDefaultResponse, hasOnlyDefaultResponse, isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isDeprecated, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod,
isRestful, isDeprecated, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod,
returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse,
discriminator, consumes, produces, prioritizedContentTypes, servers, bodyParam, allParams, bodyParams, discriminator, consumes, produces, prioritizedContentTypes, servers, bodyParam, allParams, bodyParams,
pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams, pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams,
authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs, authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs,
vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase, vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase,
operationIdSnakeCase, hasErrorResponseObject, hasSingleParam, requiredAndNotNullableParams, notNullableParams, constantParams); operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams, notNullableParams, constantParams);
} }
} }

View File

@ -128,7 +128,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public boolean exclusiveMaximum; public boolean exclusiveMaximum;
@Setter public boolean required; @Setter public boolean required;
public boolean deprecated; public boolean deprecated;
public boolean hasMoreNonReadOnly; // for model constructor, true if next property is not readonly
public boolean isPrimitiveType; public boolean isPrimitiveType;
public boolean isModel; public boolean isModel;
/** /**
@ -995,7 +994,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", exclusiveMaximum=").append(exclusiveMaximum); sb.append(", exclusiveMaximum=").append(exclusiveMaximum);
sb.append(", required=").append(required); sb.append(", required=").append(required);
sb.append(", deprecated=").append(deprecated); sb.append(", deprecated=").append(deprecated);
sb.append(", hasMoreNonReadOnly=").append(hasMoreNonReadOnly);
sb.append(", isPrimitiveType=").append(isPrimitiveType); sb.append(", isPrimitiveType=").append(isPrimitiveType);
sb.append(", isModel=").append(isModel); sb.append(", isModel=").append(isModel);
sb.append(", isContainer=").append(isContainer); sb.append(", isContainer=").append(isContainer);
@ -1092,7 +1090,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
exclusiveMaximum == that.exclusiveMaximum && exclusiveMaximum == that.exclusiveMaximum &&
required == that.required && required == that.required &&
deprecated == that.deprecated && deprecated == that.deprecated &&
hasMoreNonReadOnly == that.hasMoreNonReadOnly &&
isPrimitiveType == that.isPrimitiveType && isPrimitiveType == that.isPrimitiveType &&
isModel == that.isModel && isModel == that.isModel &&
isContainer == that.isContainer && isContainer == that.isContainer &&
@ -1209,7 +1206,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
defaultValueWithParam, baseType, containerType, containerTypeMapped, title, unescapedDescription, defaultValueWithParam, baseType, containerType, containerTypeMapped, title, unescapedDescription,
maxLength, minLength, pattern, example, jsonSchema, minimum, maximum, maxLength, minLength, pattern, example, jsonSchema, minimum, maximum,
exclusiveMinimum, exclusiveMaximum, required, deprecated, exclusiveMinimum, exclusiveMaximum, required, deprecated,
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, isPrimitiveType, isModel, isContainer, isString, isNumeric,
isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile,
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject,
isArray, isMap, isOptional, isEnum, isInnerEnum, isEnumRef, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort, isArray, isMap, isOptional, isEnum, isInnerEnum, isEnumRef, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort,

View File

@ -4834,19 +4834,6 @@ public class DefaultCodegen implements CodegenConfig {
// legacy support // legacy support
op.nickname = op.operationId; op.nickname = op.operationId;
op.hasRequiredParams = op.requiredParams.size() > 0;
// check if the operation has only a single parameter
op.hasSingleParam = op.allParams.size() == 1;
// set Restful Flag
op.isRestfulShow = op.isRestfulShow();
op.isRestfulIndex = op.isRestfulIndex();
op.isRestfulCreate = op.isRestfulCreate();
op.isRestfulUpdate = op.isRestfulUpdate();
op.isRestfulDestroy = op.isRestfulDestroy();
op.isRestful = op.isRestful();
return op; return op;
} }

View File

@ -721,12 +721,6 @@ public class ElixirClientCodegen extends DefaultCodegen {
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex;
this.isRestfulShow = o.isRestfulShow;
this.isRestfulCreate = o.isRestfulCreate;
this.isRestfulUpdate = o.isRestfulUpdate;
this.isRestfulDestroy = o.isRestfulDestroy;
this.isRestful = o.isRestful;
this.path = o.path; this.path = o.path;
this.operationId = o.operationId; this.operationId = o.operationId;
this.returnType = o.returnType; this.returnType = o.returnType;

View File

@ -428,12 +428,6 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
this.isResponseFile = o.isResponseFile; this.isResponseFile = o.isResponseFile;
this.isResponseOptional = o.isResponseOptional; this.isResponseOptional = o.isResponseOptional;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex;
this.isRestfulShow = o.isRestfulShow;
this.isRestfulCreate = o.isRestfulCreate;
this.isRestfulUpdate = o.isRestfulUpdate;
this.isRestfulDestroy = o.isRestfulDestroy;
this.isRestful = o.isRestful;
this.path = o.path; this.path = o.path;
this.operationId = o.operationId; this.operationId = o.operationId;
this.returnType = o.returnType; this.returnType = o.returnType;

View File

@ -516,12 +516,6 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex;
this.isRestfulShow = o.isRestfulShow;
this.isRestfulCreate = o.isRestfulCreate;
this.isRestfulUpdate = o.isRestfulUpdate;
this.isRestfulDestroy = o.isRestfulDestroy;
this.isRestful = o.isRestful;
this.path = o.path; this.path = o.path;
this.operationId = o.operationId; this.operationId = o.operationId;
this.returnType = o.returnType; this.returnType = o.returnType;

View File

@ -1271,7 +1271,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.exclusiveMaximum = cp.exclusiveMaximum; this.exclusiveMaximum = cp.exclusiveMaximum;
this.required = cp.required; this.required = cp.required;
this.deprecated = cp.deprecated; this.deprecated = cp.deprecated;
this.hasMoreNonReadOnly = cp.hasMoreNonReadOnly;
this.isPrimitiveType = cp.isPrimitiveType; this.isPrimitiveType = cp.isPrimitiveType;
this.isModel = cp.isModel; this.isModel = cp.isModel;
this.isContainer = cp.isContainer; this.isContainer = cp.isContainer;
@ -1380,7 +1379,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.hasConsumes = o.hasConsumes; this.hasConsumes = o.hasConsumes;
this.hasProduces = o.hasProduces; this.hasProduces = o.hasProduces;
this.hasOptionalParams = o.hasOptionalParams; this.hasOptionalParams = o.hasOptionalParams;
this.hasRequiredParams = o.hasRequiredParams;
this.returnTypeIsPrimitive = o.returnTypeIsPrimitive; this.returnTypeIsPrimitive = o.returnTypeIsPrimitive;
this.returnSimpleType = o.returnSimpleType; this.returnSimpleType = o.returnSimpleType;
this.subresourceOperation = o.subresourceOperation; this.subresourceOperation = o.subresourceOperation;
@ -1391,12 +1389,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.isResponseFile = o.isResponseFile; this.isResponseFile = o.isResponseFile;
this.isResponseOptional = o.isResponseOptional; this.isResponseOptional = o.isResponseOptional;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex;
this.isRestfulShow = o.isRestfulShow;
this.isRestfulCreate = o.isRestfulCreate;
this.isRestfulUpdate = o.isRestfulUpdate;
this.isRestfulDestroy = o.isRestfulDestroy;
this.isRestful = o.isRestful;
this.isDeprecated = o.isDeprecated; this.isDeprecated = o.isDeprecated;
this.isCallbackRequest = o.isCallbackRequest; this.isCallbackRequest = o.isCallbackRequest;
this.uniqueItems = o.uniqueItems; this.uniqueItems = o.uniqueItems;

View File

@ -349,7 +349,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
this.hasConsumes = o.hasConsumes; this.hasConsumes = o.hasConsumes;
this.hasProduces = o.hasProduces; this.hasProduces = o.hasProduces;
this.hasOptionalParams = o.hasOptionalParams; this.hasOptionalParams = o.hasOptionalParams;
this.hasRequiredParams = o.hasRequiredParams;
this.returnTypeIsPrimitive = o.returnTypeIsPrimitive; this.returnTypeIsPrimitive = o.returnTypeIsPrimitive;
this.returnSimpleType = o.returnSimpleType; this.returnSimpleType = o.returnSimpleType;
this.subresourceOperation = o.subresourceOperation; this.subresourceOperation = o.subresourceOperation;
@ -359,12 +358,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.isResponseFile = o.isResponseFile; this.isResponseFile = o.isResponseFile;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex;
this.isRestfulShow = o.isRestfulShow;
this.isRestfulCreate = o.isRestfulCreate;
this.isRestfulUpdate = o.isRestfulUpdate;
this.isRestfulDestroy = o.isRestfulDestroy;
this.isRestful = o.isRestful;
this.isDeprecated = o.isDeprecated; this.isDeprecated = o.isDeprecated;
this.isCallbackRequest = o.isCallbackRequest; this.isCallbackRequest = o.isCallbackRequest;
this.path = o.path; this.path = o.path;

View File

@ -5000,7 +5000,7 @@ public class DefaultCodegenTest {
CodegenOperation codegenOperation = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); CodegenOperation codegenOperation = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
// When & Then // When & Then
assertThat(codegenOperation.hasSingleParam).isFalse(); assertThat(codegenOperation.getHasSingleParam()).isFalse();
} }
@Test @Test
@ -5013,6 +5013,6 @@ public class DefaultCodegenTest {
CodegenOperation codegenOperation = codegen.fromOperation(path, "POST", openAPI.getPaths().get(path).getPost(), null); CodegenOperation codegenOperation = codegen.fromOperation(path, "POST", openAPI.getPaths().get(path).getPost(), null);
// When & Then // When & Then
assertThat(codegenOperation.hasSingleParam).isTrue(); assertThat(codegenOperation.getHasSingleParam()).isTrue();
} }
} }

View File

@ -577,13 +577,13 @@ public interface PathHandlerInterface {
* <p><b>Response headers</b>: [CodegenProperty{openApiType='string', baseName='Set-Cookie', complexType='null', getter='getSetCookie', setter='setSetCookie', description='Cookie authentication key for use with the `api_key` apiKey authentication.', dataType='String', datatypeWithEnum='String', dataFormat='null', name='setCookie', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.Set-Cookie;', baseType='String', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='Cookie authentication key for use with the `api_key` apiKey authentication.', maxLength=null, minLength=null, pattern='null', example='AUTH_KEY=abcde12345; Path=/; HttpOnly', jsonSchema='{ * <p><b>Response headers</b>: [CodegenProperty{openApiType='string', baseName='Set-Cookie', complexType='null', getter='getSetCookie', setter='setSetCookie', description='Cookie authentication key for use with the `api_key` apiKey authentication.', dataType='String', datatypeWithEnum='String', dataFormat='null', name='setCookie', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.Set-Cookie;', baseType='String', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='Cookie authentication key for use with the `api_key` apiKey authentication.', maxLength=null, minLength=null, pattern='null', example='AUTH_KEY=abcde12345; Path=/; HttpOnly', jsonSchema='{
"example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly",
"type" : "string" "type" : "string"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='setCookie', nameInPascalCase='SetCookie', nameInSnakeCase='SET_COOKIE', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ }', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='setCookie', nameInPascalCase='SetCookie', nameInSnakeCase='SET_COOKIE', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"format" : "int32", "format" : "int32",
"type" : "integer" "type" : "integer"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='xRateLimit', nameInPascalCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ }', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='xRateLimit', nameInPascalCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"format" : "date-time", "format" : "date-time",
"type" : "string" "type" : "string"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='xExpiresAfter', nameInPascalCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=date-time, dependentRequired=null, contains=null}]</p> }', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isOptional=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='xExpiresAfter', nameInPascalCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, hasSanitizedName=true, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=date-time, dependentRequired=null, contains=null}]</p>
* *
* <p><b>Produces</b>: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]</p> * <p><b>Produces</b>: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]</p>
* <p><b>Returns</b>: {@link String}</p> * <p><b>Returns</b>: {@link String}</p>