diff --git a/docs/generators/aspnet-fastendpoints.md b/docs/generators/aspnet-fastendpoints.md index 75a31639bdba..426314b2e5b5 100644 --- a/docs/generators/aspnet-fastendpoints.md +++ b/docs/generators/aspnet-fastendpoints.md @@ -77,6 +77,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • Object
  • String
  • System.IO.Stream
  • +
  • TimeSpan
  • +
  • TimeSpan?
  • bool
  • bool?
  • byte[]
  • diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 5d0ca08085dc..ce3c0d08c86c 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -95,6 +95,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • Object
  • String
  • System.IO.Stream
  • +
  • TimeSpan
  • +
  • TimeSpan?
  • bool
  • bool?
  • byte[]
  • diff --git a/docs/generators/csharp-functions.md b/docs/generators/csharp-functions.md index 8e6a6a98726a..48b4a492ef02 100644 --- a/docs/generators/csharp-functions.md +++ b/docs/generators/csharp-functions.md @@ -87,6 +87,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • Object
  • String
  • System.IO.Stream
  • +
  • TimeSpan
  • +
  • TimeSpan?
  • bool
  • bool?
  • byte[]
  • diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index ef482820cef6..4b4b601be3fe 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -96,6 +96,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • Object
  • String
  • System.IO.Stream
  • +
  • TimeSpan
  • +
  • TimeSpan?
  • bool
  • bool?
  • byte[]
  • diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 5303598ed7a6..ca63ccab4e64 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -125,7 +125,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public String arrayModelType; public boolean isAlias; // Is this effectively an alias of another simple type public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, - isDecimal, isShort, isUnboundedInteger, isPrimitiveType, isBoolean, isFreeFormObject; + isDuration, isDecimal, isShort, isUnboundedInteger, isPrimitiveType, isBoolean, isFreeFormObject; private boolean additionalPropertiesIsAnyType; public List vars = new ArrayList<>(); // all properties (without parent's properties) @Getter @Setter @@ -544,6 +544,16 @@ public void setIsDateTime(boolean isDateTime) { this.isDateTime = isDateTime; } + @Override + public boolean getIsDuration() { + return isDuration; + } + + @Override + public void setIsDuration(boolean isDuration) { + this.isDuration = isDuration; + } + @Override public boolean getIsMap() { return isMap; @@ -878,6 +888,7 @@ public boolean equals(Object o) { isDouble == that.isDouble && isDate == that.isDate && isDateTime == that.isDateTime && + isDuration == that.isDuration && hasVars == that.hasVars && emptyVars == that.emptyVars && hasMoreModels == that.hasMoreModels && @@ -979,7 +990,7 @@ public int hashCode() { getDescription(), getClassVarName(), getModelJson(), getDataType(), getXmlPrefix(), getXmlNamespace(), getXmlName(), getClassFilename(), getUnescapedDescription(), getDiscriminator(), getDefaultValue(), getArrayModelType(), isAlias, isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, - isDate, isDateTime, isNull, hasValidation, isShort, isUnboundedInteger, isBoolean, + isDate, isDateTime, isDuration, isNull, hasValidation, isShort, isUnboundedInteger, isBoolean, getVars(), getAllVars(), getNonNullableVars(), getRequiredVars(), getOptionalVars(), getReadOnlyVars(), getReadWriteVars(), getParentVars(), getAllowableValues(), getMandatory(), getAllMandatory(), getImports(), hasVars, isEmptyVars(), hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArray, @@ -1035,6 +1046,7 @@ public String toString() { sb.append(", isDouble=").append(isDouble); sb.append(", isDate=").append(isDate); sb.append(", isDateTime=").append(isDateTime); + sb.append(", isDuration=").append(isDuration); sb.append(", vars=").append(vars); sb.append(", allVars=").append(allVars); sb.append(", nonNullableVars=").append(nonNullableVars); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 0497bf49c55b..ed75caea9ae9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -48,7 +48,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { public Map examples; public String jsonSchema; public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, - isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isShort, isUnboundedInteger; + isBoolean, isDate, isDateTime, isDuration, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isShort, isUnboundedInteger; public boolean isArray, isMap; /** datatype is the generic inner parameter of a std::optional for C++, or Optional (Java) */ public boolean isOptional; @@ -259,6 +259,7 @@ public CodegenParameter copy() { output.isBoolean = this.isBoolean; output.isDate = this.isDate; output.isDateTime = this.isDateTime; + output.isDuration = this.isDuration; output.isUuid = this.isUuid; output.isUri = this.isUri; output.isEmail = this.isEmail; @@ -286,7 +287,7 @@ public int hashCode() { unescapedDescription, baseType, containerType, containerTypeMapped, defaultValue, enumDefaultValue, enumName, style, isDeepObject, isMatrix, isAllowEmptyValue, example, examples, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, - isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, + isByteArray, isBinary, isBoolean, isDate, isDateTime, isDuration, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isArray, isMap, isOptional, isFile, isEnum, isEnumRef, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), @@ -329,6 +330,7 @@ public boolean equals(Object o) { isBoolean == that.isBoolean && isDate == that.isDate && isDateTime == that.isDateTime && + isDuration == that.isDuration && isUuid == that.isUuid && isUri == that.isUri && isEmail == that.isEmail && @@ -463,6 +465,7 @@ public String toString() { sb.append(", isBoolean=").append(isBoolean); sb.append(", isDate=").append(isDate); sb.append(", isDateTime=").append(isDateTime); + sb.append(", isDuration=").append(isDuration); sb.append(", isUuid=").append(isUuid); sb.append(", isUri=").append(isUri); sb.append(", isEmail=").append(isEmail); @@ -754,6 +757,16 @@ public void setIsDateTime(boolean isDateTime) { this.isDateTime = isDateTime; } + @Override + public boolean getIsDuration() { + return isDuration; + } + + @Override + public void setIsDuration(boolean isDuration) { + this.isDuration = isDuration; + } + @Override public boolean getIsMap() { return isMap; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index dddec1c620c6..e6538091693f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -159,6 +159,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti public boolean isBoolean; public boolean isDate; // full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21 public boolean isDateTime; // the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z + public boolean isDuration; public boolean isUuid; public boolean isUri; public boolean isEmail; @@ -488,6 +489,16 @@ public void setIsDateTime(boolean isDateTime) { this.isDateTime = isDateTime; } + @Override + public boolean getIsDuration() { + return isDuration; + } + + @Override + public void setIsDuration(boolean isDuration) { + this.isDuration = isDuration; + } + @Override public boolean getIsMap() { return isMap; @@ -1014,6 +1025,7 @@ public String toString() { sb.append(", isBoolean=").append(isBoolean); sb.append(", isDate=").append(isDate); sb.append(", isDateTime=").append(isDateTime); + sb.append(", isDuration=").append(isDuration); sb.append(", isUuid=").append(isUuid); sb.append(", isUri=").append(isUri); sb.append(", isEmail=").append(isEmail); @@ -1111,6 +1123,7 @@ public boolean equals(Object o) { isBoolean == that.isBoolean && isDate == that.isDate && isDateTime == that.isDateTime && + isDuration == that.isDuration && isUuid == that.isUuid && isUri == that.isUri && isEmail == that.isEmail && @@ -1210,7 +1223,7 @@ public int hashCode() { exclusiveMinimum, exclusiveMaximum, required, deprecated, hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile, - isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, + isBoolean, isDate, isDateTime, isDuration, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isArray, isMap, isOptional, isEnum, isInnerEnum, isEnumRef, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort, isUnboundedInteger, isSelfReference, isCircularReference, isDiscriminator, isNew, isOverridden, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 9c8dc08aaa5f..37dc51c3f58b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -53,6 +53,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { public boolean isBoolean; public boolean isDate; public boolean isDateTime; + public boolean isDuration; public boolean isUuid; public boolean isEmail; public boolean isPassword; @@ -109,7 +110,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { public int hashCode() { return Objects.hash(headers, code, message, examples, dataType, baseType, containerType, containerTypeMapped, hasHeaders, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate, - isDateTime, isUuid, isEmail, isPassword, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType, + isDateTime, isDuration, isUuid, isEmail, isPassword, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType, isMap, isOptional, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties, vars, requiredVars, isNull, isVoid, hasValidation, isShort, isUnboundedInteger, getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(), @@ -139,6 +140,7 @@ public boolean equals(Object o) { isBoolean == that.isBoolean && isDate == that.isDate && isDateTime == that.isDateTime && + isDuration == that.isDuration && isUuid == that.isUuid && isEmail == that.isEmail && isPassword == that.isPassword && @@ -485,6 +487,16 @@ public void setIsDateTime(boolean isDateTime) { this.isDateTime = isDateTime; } + @Override + public boolean getIsDuration() { + return isDuration; + } + + @Override + public void setIsDuration(boolean isDuration) { + this.isDuration = isDuration; + } + @Override public boolean getIsMap() { return isMap; @@ -586,6 +598,7 @@ public String toString() { sb.append(", isBoolean=").append(isBoolean); sb.append(", isDate=").append(isDate); sb.append(", isDateTime=").append(isDateTime); + sb.append(", isDuration=").append(isDuration); sb.append(", isUuid=").append(isUuid); sb.append(", isEmail=").append(isEmail); sb.append(", isPassword=").append(isPassword); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index 47fef0eddf5f..5852deae62e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -101,6 +101,10 @@ public interface IJsonSchemaValidationProperties { void setIsDateTime(boolean isDateTime); + boolean getIsDuration(); + + void setIsDuration(boolean isDuration); + // true when the schema type is object boolean getIsMap(); @@ -312,6 +316,8 @@ default void setTypeProperties(Schema p, OpenAPI openAPI) { ; } else if (ModelUtils.isDateTimeSchema(p)) { ; + } else if (ModelUtils.isDurationSchema(p)) { + ; } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number ; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 02043c013d9a..73ee05931cf8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -195,6 +195,8 @@ public AbstractCSharpCodegen() { "DateTimeOffset", "DateOnly?", "DateOnly", + "TimeSpan?", + "TimeSpan", "Boolean", "Double", "Decimal", @@ -1427,6 +1429,10 @@ public String toDefaultValue(Schema p) { if (p.getDefault() != null) { return "\"" + p.getDefault().toString() + "\""; } + } else if (ModelUtils.isDurationSchema(p)) { + if (p.getDefault() != null) { + return "\"" + p.getDefault().toString() + "\""; + } } else if (ModelUtils.isNumberSchema(p)) { if (p.getDefault() != null) { if (ModelUtils.isFloatSchema(p)) { // float @@ -1986,7 +1992,7 @@ protected Set getNullableTypes() { } protected Set getValueTypes() { - return new HashSet<>(Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double", "DateTime", "DateOnly", "DateTimeOffset", "Guid")); + return new HashSet<>(Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double", "DateTime", "DateOnly", "DateTimeOffset", "TimeSpan", "Guid")); } protected void setTypeMapping() { @@ -2006,6 +2012,7 @@ protected void setTypeMapping() { typeMapping.put("BigDecimal", "decimal"); typeMapping.put("DateTime", this.useDateTimeOffsetFlag ? "DateTimeOffset" : "DateTime"); typeMapping.put("date", this.useDateOnly() ? "DateOnly" : "DateTime"); + typeMapping.put("duration", "TimeSpan"); typeMapping.put("file", "System.IO.Stream"); typeMapping.put("array", "List"); typeMapping.put("list", "List"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java index 60e8fb231011..d60c4b8bbb1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java @@ -327,7 +327,7 @@ private void addCentralizedPackageManagementOption(){ @Override protected Set getNullableTypes() { return new HashSet<>(Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double", - "DateTime", "DateOnly", "DateTimeOffset", "Guid")); + "DateTime", "DateOnly", "DateTimeOffset", "TimeSpan", "Guid")); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java index 61f4ef6bae87..bab191cea1fc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java @@ -260,7 +260,7 @@ public CSharpFunctionsServerCodegen() { @Override protected Set getNullableTypes() { return new HashSet<>(Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double", - "DateTime", "DateTimeOffset", "Guid")); + "DateTime", "DateTimeOffset", "TimeSpan", "Guid")); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpReducedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpReducedClientCodegen.java index f0706780a2ec..dd158497513b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpReducedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpReducedClientCodegen.java @@ -306,7 +306,7 @@ public CSharpReducedClientCodegen() { @Override protected Set getNullableTypes() { return new HashSet<>(Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double", - "DateTime", "DateTimeOffset", "Guid")); + "DateTime", "DateTimeOffset", "TimeSpan", "Guid")); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index d9f77b3f5731..a2047b0e5a4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -692,6 +692,12 @@ public static boolean isDateTimeSchema(Schema schema) { && SchemaTypeUtil.DATE_TIME_FORMAT.equals(schema.getFormat())); } + public static boolean isDurationSchema(Schema schema) { + // format: duration (todo: swagger parser does not support duration) + return (SchemaTypeUtil.STRING_TYPE.equals(getType(schema)) + && "duration".equals(schema.getFormat())); + } + public static boolean isPasswordSchema(Schema schema) { return (schema instanceof PasswordSchema) || // double diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache index 1405dd77c79d..77609e770f78 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache @@ -226,6 +226,10 @@ if (utf8JsonReader.TokenType != JsonTokenType.Null) {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); {{/isDateTime}} + {{#isDuration}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + {{/isDuration}} {{#isEnum}} {{^isMap}} {{#isNumeric}} diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 48b55285aa4b..4b69f27d3a71 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1592,6 +1592,10 @@ components: type: string format: date-time example: '2007-12-03T10:15:30+01:00' + duration: + type: string + format: duration + example: '1.03:14:56.1667' uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml index 8828ce072268..b551c197ce06 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml @@ -1658,6 +1658,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1718,6 +1719,10 @@ components: type: string format: date-time example: '2007-12-03T10:15:30+01:00' + duration: + type: string + format: duration + example: '1.03:14:56.1667' uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 5b726d69b9f6..bd5b4f8640c0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1672,6 +1672,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1750,6 +1751,10 @@ components: type: string format: date-time example: '2007-12-03T10:15:30+01:00' + duration: + type: string + format: duration + example: '1.03:14:56.1667' uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-echo.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-echo.yaml index dea319154236..31df8f2c504b 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-echo.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-echo.yaml @@ -1549,6 +1549,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1595,6 +1596,9 @@ components: dateTime: type: string format: date-time + duration: + type: string + format: duration uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index b3727634f1bb..553d87336e7b 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1520,6 +1520,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1563,6 +1564,9 @@ components: dateTime: type: string format: date-time + duration: + type: string + format: duration uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index e4957b4e19d1..189a0eeb007d 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1598,6 +1598,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1644,6 +1645,9 @@ components: dateTime: type: string format: date-time + duration: + type: string + format: duration uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/snakecase-discriminator.yaml b/modules/openapi-generator/src/test/resources/3_0/snakecase-discriminator.yaml index cc4f62fa3972..0447cb5d8e56 100644 --- a/modules/openapi-generator/src/test/resources/3_0/snakecase-discriminator.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/snakecase-discriminator.yaml @@ -1525,6 +1525,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -1571,6 +1572,9 @@ components: dateTime: type: string format: date-time + duration: + type: string + format: duration uuid: type: string format: uuid diff --git a/modules/openapi-generator/src/test/resources/3_0/unsigned-test.yaml b/modules/openapi-generator/src/test/resources/3_0/unsigned-test.yaml index 2c7073528db4..d2e806ddfd12 100644 --- a/modules/openapi-generator/src/test/resources/3_0/unsigned-test.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/unsigned-test.yaml @@ -97,6 +97,7 @@ components: - number - byte - date + - duration - password properties: integer: @@ -157,6 +158,10 @@ components: type: string format: date-time example: '2007-12-03T10:15:30+01:00' + duration: + type: string + format: duration + example: '1.03:14:56.1667' uuid: type: string format: uuid diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml index 3c7d8aa3954b..ab68fdb093f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml @@ -1642,6 +1642,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1668,6 +1672,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md index 5983bc096900..6cdfcb9a6a07 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateTime** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index 86d63c7ac5f6..4c8452c219e0 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateTime date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md index 5983bc096900..6cdfcb9a6a07 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateTime** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 86d63c7ac5f6..4c8452c219e0 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateTime date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml index 3c7d8aa3954b..ab68fdb093f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml @@ -1642,6 +1642,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1668,6 +1672,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md index 5983bc096900..6cdfcb9a6a07 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateTime** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index 86d63c7ac5f6..4c8452c219e0 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateTime date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md index 5983bc096900..6cdfcb9a6a07 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateTime** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 86d63c7ac5f6..4c8452c219e0 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateTime date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml index 3c7d8aa3954b..ab68fdb093f5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml @@ -1642,6 +1642,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1668,6 +1672,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index 96902abd13a6..2da3d5078e2e 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 5244065820ea..a24ad2d76784 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -36,6 +36,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -59,10 +60,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -103,6 +105,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -396,6 +405,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -628,6 +638,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -674,6 +685,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()!); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -769,6 +783,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -781,6 +798,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -847,7 +867,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value!, date.Value!.Value!, duration.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -899,6 +919,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 96902abd13a6..2da3d5078e2e 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index d9011f3dbd67..039f60aeeb4d 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -37,6 +37,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -60,10 +61,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -104,6 +106,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -397,6 +406,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -629,6 +639,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -675,6 +686,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()!); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -770,6 +784,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -782,6 +799,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -848,7 +868,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value!, date.Value!.Value!, duration.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -900,6 +920,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml index 3c7d8aa3954b..ab68fdb093f5 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml @@ -1642,6 +1642,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1668,6 +1672,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index 96902abd13a6..2da3d5078e2e 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 5244065820ea..a24ad2d76784 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -36,6 +36,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -59,10 +60,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -103,6 +105,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -396,6 +405,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -628,6 +638,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -674,6 +685,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()!); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -769,6 +783,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -781,6 +798,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -847,7 +867,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value!, date.Value!.Value!, duration.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -899,6 +919,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 96902abd13a6..2da3d5078e2e 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/FormatTest.md index 1009f35198fb..4a79dbcf92d3 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateOnly** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index d9011f3dbd67..039f60aeeb4d 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -37,6 +37,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -60,10 +61,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateOnly date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -104,6 +106,13 @@ public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, [JsonPropertyName("date")] public DateOnly Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -397,6 +406,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -629,6 +639,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -675,6 +686,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()!); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -770,6 +784,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -782,6 +799,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -848,7 +868,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value!, date.Value!.Value!, duration.Value!.Value!, number.Value!.Value!, password.Value!, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -900,6 +920,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/FormatTest.md index 5983bc096900..6cdfcb9a6a07 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/models/FormatTest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Byte** | **byte[]** | | **Date** | **DateTime** | | +**Duration** | **TimeSpan** | | **Number** | **decimal** | | **Password** | **string** | | **Binary** | **System.IO.Stream** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 86d63c7ac5f6..4c8452c219e0 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -34,6 +34,7 @@ public partial class FormatTest : IValidatableObject /// /// byte /// date + /// duration /// number /// password /// binary @@ -57,10 +58,11 @@ public partial class FormatTest : IValidatableObject /// unsignedLong /// uuid [JsonConstructor] - public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) + public FormatTest(byte[] @byte, DateTime date, TimeSpan duration, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default) { Byte = @byte; Date = date; + Duration = duration; Number = number; Password = password; BinaryOption = binary; @@ -101,6 +103,13 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets Duration + /// + /* 1.03:14:56.1667 */ + [JsonPropertyName("duration")] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Number /// @@ -394,6 +403,7 @@ public override string ToString() sb.Append("class FormatTest {\n"); sb.Append(" Byte: ").Append(Byte).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n"); @@ -626,6 +636,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo Option varByte = default; Option date = default; + Option duration = default; Option number = default; Option password = default; Option binary = default; @@ -672,6 +683,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (utf8JsonReader.TokenType != JsonTokenType.Null) date = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); break; + case "duration": + duration = new Option(utf8JsonReader.GetString()); + break; case "number": if (utf8JsonReader.TokenType != JsonTokenType.Null) number = new Option(utf8JsonReader.GetDecimal()); @@ -767,6 +781,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (!date.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + if (!duration.IsSet) + throw new ArgumentException("Property is required for class FormatTest.", nameof(duration)); + if (!number.IsSet) throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); @@ -779,6 +796,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (date.IsSet && date.Value == null) throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + if (duration.IsSet && duration.Value == null) + throw new ArgumentNullException(nameof(duration), "Property is not nullable for class FormatTest."); + if (number.IsSet && number.Value == null) throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); @@ -845,7 +865,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo if (uuid.IsSet && uuid.Value == null) throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); - return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); + return new FormatTest(varByte.Value, date.Value.Value, duration.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid); } /// @@ -897,6 +917,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions); writer.WriteString("date", formatTest.Date.ToString(DateFormat)); + writer.WriteString("duration", formatTest.Duration); + writer.WriteNumber("number", formatTest.Number); writer.WriteString("password", formatTest.Password); diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md index 7f34f02b4aea..0e6d6112203b 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | [**FileParameter**](FileParameter.md) | | [optional] **Date** | **DateOnly** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 508f9fe5dd86..ff56102c760f 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,12 +63,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), FileParameter binary = default(FileParameter), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), FileParameter binary = default(FileParameter), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -78,6 +79,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -227,6 +234,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -296,6 +312,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -378,6 +395,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FormatTest.md index c028ca739018..438892f0549e 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | [**FileParameter**](FileParameter.md) | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 81da66d122d5..6aa9c91431d7 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -63,12 +63,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), FileParameter binary = default(FileParameter), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), FileParameter binary = default(FileParameter), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -78,6 +79,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -228,6 +235,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -297,6 +313,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -379,6 +396,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml index 6cfc875b0745..4577e022573d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml @@ -1651,6 +1651,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1677,6 +1681,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FormatTest.md index c2144b5e3cf6..e4d7d0b9a734 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index a741277dd273..232d20a160ee 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -187,6 +194,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -251,6 +267,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -328,6 +345,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml index 6cfc875b0745..4577e022573d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml @@ -1651,6 +1651,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1677,6 +1681,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FormatTest.md index c2144b5e3cf6..e4d7d0b9a734 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index a741277dd273..232d20a160ee 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -187,6 +194,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -251,6 +267,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -328,6 +345,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml index 6cfc875b0745..4577e022573d 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml @@ -1651,6 +1651,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1677,6 +1681,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/docs/FormatTest.md index 14efa7b0f63e..2c6673c03c4c 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateOnly** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs index 59c8975b9295..9cd565ee7c3b 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -186,6 +193,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -250,6 +266,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -327,6 +344,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/FormatTest.md index 2fe92b2cac89..0475f8fb6726 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateOnly** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index fc3472412e57..e5290413dd6e 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -59,12 +59,13 @@ protected FormatTest() { } /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -74,6 +75,12 @@ protected FormatTest() { } } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -222,6 +229,15 @@ protected FormatTest() { } [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -285,6 +301,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -366,6 +383,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml index 6cfc875b0745..4577e022573d 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml @@ -1651,6 +1651,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1677,6 +1681,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/docs/FormatTest.md index 14efa7b0f63e..2c6673c03c4c 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateOnly** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs index 59c8975b9295..9cd565ee7c3b 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -186,6 +193,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -250,6 +266,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -327,6 +344,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FormatTest.md index 1b12163e9a6a..fbe9bcbc30b1 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index 4c576118fb1e..b10b7c0f29d8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -62,12 +62,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this._Number = number; // to ensure "varByte" is required (not null) @@ -77,6 +78,12 @@ protected FormatTest() } this._Byte = varByte; this._Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this._Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -650,6 +657,33 @@ public bool ShouldSerializeDateTime() return _flagDateTime; } /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration + { + get{ return _Duration;} + set + { + _Duration = value; + _flagDuration = true; + } + } + private TimeSpan _Duration; + private bool _flagDuration; + + /// + /// Returns false as Duration should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeDuration() + { + return _flagDuration; + } + /// /// Gets or Sets Uuid /// /* @@ -808,6 +842,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -890,6 +925,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml index 6cfc875b0745..4577e022573d 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml @@ -1651,6 +1651,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1677,6 +1681,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FormatTest.md index c2144b5e3cf6..e4d7d0b9a734 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index a741277dd273..232d20a160ee 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -187,6 +194,15 @@ protected FormatTest() [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -251,6 +267,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -328,6 +345,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/FormatTest.md index 2fe92b2cac89..0475f8fb6726 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateOnly** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 2eb69255b421..75d350dd93fc 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() { } /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateOnly date = default(DateOnly), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() { } } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -220,6 +227,15 @@ protected FormatTest() { } [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -283,6 +299,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -404,6 +421,11 @@ public bool Equals(FormatTest input) (this.DateTime != null && this.DateTime.Equals(input.DateTime)) ) && + ( + this.Duration == input.Duration || + (this.Duration != null && + this.Duration.Equals(input.Duration)) + ) && ( this.Uuid == input.Uuid || (this.Uuid != null && @@ -474,6 +496,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml index 6a83f7a1e484..7bcb600e8e83 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml @@ -1683,6 +1683,10 @@ components: example: 2007-12-03T10:15:30+01:00 format: date-time type: string + duration: + example: 1.03:14:56.1667 + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1709,6 +1713,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FormatTest.md index 1b12163e9a6a..fbe9bcbc30b1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FormatTest.md +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/FormatTest.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **Binary** | **System.IO.Stream** | | [optional] **Date** | **DateTime** | | **DateTime** | **DateTime** | | [optional] +**Duration** | **TimeSpan** | | **Uuid** | **Guid** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 5a287cd71827..d30bddfaf05f 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -57,12 +57,13 @@ protected FormatTest() { } /// binary. /// date (required). /// dateTime. + /// duration (required). /// uuid. /// password (required). /// A string that is a 10 digit number. Can have leading zeros.. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. /// None. - public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), int int32Range = default(int), int int64Positive = default(int), int int64Negative = default(int), int int64PositiveExclusive = default(int), int int64NegativeExclusive = default(int), uint unsignedInteger = default(uint), long int64 = default(long), ulong unsignedLong = default(ulong), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), TimeSpan duration = default(TimeSpan), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string), string patternWithBackslash = default(string)) { this.Number = number; // to ensure "varByte" is required (not null) @@ -72,6 +73,12 @@ protected FormatTest() { } } this.Byte = varByte; this.Date = date; + // to ensure "duration" is required (not null) + if (duration == null) + { + throw new ArgumentNullException("duration is a required property for FormatTest and cannot be null"); + } + this.Duration = duration; // to ensure "password" is required (not null) if (password == null) { @@ -221,6 +228,15 @@ protected FormatTest() { } [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime { get; set; } + /// + /// Gets or Sets Duration + /// + /* + 1.03:14:56.1667 + */ + [DataMember(Name = "duration", IsRequired = true, EmitDefaultValue = true)] + public TimeSpan Duration { get; set; } + /// /// Gets or Sets Uuid /// @@ -284,6 +300,7 @@ public override string ToString() sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); @@ -405,6 +422,11 @@ public bool Equals(FormatTest input) (this.DateTime != null && this.DateTime.Equals(input.DateTime)) ) && + ( + this.Duration == input.Duration || + (this.Duration != null && + this.Duration.Equals(input.Duration)) + ) && ( this.Uuid == input.Uuid || (this.Uuid != null && @@ -475,6 +497,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); } + if (this.Duration != null) + { + hashCode = (hashCode * 59) + this.Duration.GetHashCode(); + } if (this.Uuid != null) { hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/FormatTest.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/FormatTest.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/FormatTest.java index 1f3fc84b65ae..c5af808f1df0 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/FormatTest.java @@ -52,6 +52,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -316,6 +318,26 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -417,6 +439,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/FormatTest.md b/samples/client/petstore/java-helidon-client/v3/se/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/FormatTest.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/FormatTest.java index 1f3fc84b65ae..c5af808f1df0 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/FormatTest.java @@ -52,6 +52,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -316,6 +318,26 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -417,6 +439,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/FormatTest.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/FormatTest.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/FormatTest.java index 1f3fc84b65ae..c5af808f1df0 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/FormatTest.java @@ -52,6 +52,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -316,6 +318,26 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -417,6 +439,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java-helidon-client/v4/se/docs/FormatTest.md b/samples/client/petstore/java-helidon-client/v4/se/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java-helidon-client/v4/se/docs/FormatTest.md +++ b/samples/client/petstore/java-helidon-client/v4/se/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java-helidon-client/v4/se/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java-helidon-client/v4/se/src/main/java/org/openapitools/client/model/FormatTest.java index 1f3fc84b65ae..c5af808f1df0 100644 --- a/samples/client/petstore/java-helidon-client/v4/se/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java-helidon-client/v4/se/src/main/java/org/openapitools/client/model/FormatTest.java @@ -52,6 +52,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -316,6 +318,26 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -417,6 +439,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java index cd67f744bfff..ee3c24c2a63b 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -47,6 +47,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -103,6 +104,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -432,6 +437,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -553,6 +583,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -561,7 +592,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -580,6 +611,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); @@ -751,6 +783,16 @@ public String toUrlQueryString(String prefix) { } } + // add `duration` to the URL query string + if (getDuration() != null) { + try { + joiner.add(String.format("%sduration%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDuration()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + // add `uuid` to the URL query string if (getUuid() != null) { try { diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java index 173876355440..865522c27f78 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -441,6 +446,32 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -566,6 +597,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -574,7 +606,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -593,6 +625,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/docs/FormatTest.md b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/docs/FormatTest.md index d5b492c6e4ec..06de25458a75 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/docs/FormatTest.md +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **Date** | | | |**dateTime** | **Date** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/FormatTest.java index 67d54cf4552d..0ee5f393affc 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -41,6 +41,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -98,6 +99,10 @@ public class FormatTest { private Date dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; private UUID uuid; @@ -418,6 +423,30 @@ public FormatTest dateTime(Date dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDuration() { + return duration; + } + + /** + * Set duration + */ + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -544,6 +573,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/FormatTest.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/FormatTest.md index d5b492c6e4ec..06de25458a75 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/FormatTest.md +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **Date** | | | |**dateTime** | **Date** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/FormatTest.java index 0a28a8ffb143..0c08a443be89 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/FormatTest.java @@ -72,6 +72,9 @@ public class FormatTest { @JsonbProperty("dateTime") private Date dateTime; + @JsonbProperty("duration") + private String duration; + @JsonbProperty("uuid") private UUID uuid; @@ -340,6 +343,26 @@ public FormatTest dateTime(Date dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + */ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -441,6 +464,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -449,7 +473,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } /** @@ -472,6 +496,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/FormatTest.md b/samples/client/petstore/java/microprofile-rest-client/docs/FormatTest.md index d5b492c6e4ec..06de25458a75 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/FormatTest.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **Date** | | | |**dateTime** | **Date** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/FormatTest.java index ae0b8b735434..51bd0c151d39 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/FormatTest.java @@ -69,6 +69,9 @@ public class FormatTest { @JsonbProperty("dateTime") private Date dateTime; + @JsonbProperty("duration") + private String duration; + @JsonbProperty("uuid") private UUID uuid; @@ -337,6 +340,26 @@ public FormatTest dateTime(Date dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + public String getDuration() { + return duration; + } + + /** + * Set duration + */ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -438,6 +461,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -446,7 +470,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } /** @@ -469,6 +493,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/restclient-swagger2/docs/FormatTest.md b/samples/client/petstore/java/restclient-swagger2/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/FormatTest.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java index d4426350ee06..a40eca5577a8 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -45,6 +45,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -101,6 +102,10 @@ public class FormatTest { @jakarta.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @jakarta.annotation.Nullable private UUID uuid; @@ -442,6 +447,32 @@ public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@jakarta.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @jakarta.annotation.Nonnull + @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "") + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@jakarta.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -567,6 +598,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -575,7 +607,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -594,6 +626,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter/api/openapi.yaml b/samples/client/petstore/java/restclient-useSingleRequestParameter/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter/api/openapi.yaml +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter/docs/FormatTest.md b/samples/client/petstore/java/restclient-useSingleRequestParameter/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter/docs/FormatTest.md +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/restclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java index f0a0cce1fcbc..97bf289233fa 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @jakarta.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @jakarta.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@jakarta.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@jakarta.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/restclient/api/openapi.yaml b/samples/client/petstore/java/restclient/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/restclient/api/openapi.yaml +++ b/samples/client/petstore/java/restclient/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/restclient/docs/FormatTest.md b/samples/client/petstore/java/restclient/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/restclient/docs/FormatTest.md +++ b/samples/client/petstore/java/restclient/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/FormatTest.java index f0a0cce1fcbc..97bf289233fa 100644 --- a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @jakarta.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @jakarta.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@jakarta.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@jakarta.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/resteasy/docs/FormatTest.md b/samples/client/petstore/java/resteasy/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/resteasy/docs/FormatTest.md +++ b/samples/client/petstore/java/resteasy/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java index ac7e28794447..d3fc216c682a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index cbbd24e70c79..ddc1890de828 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -48,6 +48,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -120,6 +121,11 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @XmlElement(name = "duration") + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @XmlElement(name = "uuid") @javax.annotation.Nullable @@ -477,6 +483,33 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JacksonXmlProperty(localName = "duration") + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JacksonXmlProperty(localName = "duration") + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -606,6 +639,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -614,7 +648,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -633,6 +667,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/resttemplate/docs/FormatTest.md b/samples/client/petstore/java/resttemplate/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/resttemplate/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index 1fe7cbb041ac..6e25fa792c2b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -122,7 +127,7 @@ public FormatTest() { /** * Constructor with all args parameters */ - public FormatTest(@JsonProperty(JSON_PROPERTY_INTEGER) Integer integer, @JsonProperty(JSON_PROPERTY_INT32) Integer int32, @JsonProperty(JSON_PROPERTY_INT64) Long int64, @JsonProperty(JSON_PROPERTY_NUMBER) BigDecimal number, @JsonProperty(JSON_PROPERTY_FLOAT) Float _float, @JsonProperty(JSON_PROPERTY_DOUBLE) Double _double, @JsonProperty(JSON_PROPERTY_DECIMAL) BigDecimal decimal, @JsonProperty(JSON_PROPERTY_STRING) String string, @JsonProperty(JSON_PROPERTY_BYTE) byte[] _byte, @JsonProperty(JSON_PROPERTY_BINARY) File binary, @JsonProperty(JSON_PROPERTY_DATE) LocalDate date, @JsonProperty(JSON_PROPERTY_DATE_TIME) OffsetDateTime dateTime, @JsonProperty(JSON_PROPERTY_UUID) UUID uuid, @JsonProperty(JSON_PROPERTY_PASSWORD) String password, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) String patternWithDigits, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) String patternWithDigitsAndDelimiter) { + public FormatTest(@JsonProperty(JSON_PROPERTY_INTEGER) Integer integer, @JsonProperty(JSON_PROPERTY_INT32) Integer int32, @JsonProperty(JSON_PROPERTY_INT64) Long int64, @JsonProperty(JSON_PROPERTY_NUMBER) BigDecimal number, @JsonProperty(JSON_PROPERTY_FLOAT) Float _float, @JsonProperty(JSON_PROPERTY_DOUBLE) Double _double, @JsonProperty(JSON_PROPERTY_DECIMAL) BigDecimal decimal, @JsonProperty(JSON_PROPERTY_STRING) String string, @JsonProperty(JSON_PROPERTY_BYTE) byte[] _byte, @JsonProperty(JSON_PROPERTY_BINARY) File binary, @JsonProperty(JSON_PROPERTY_DATE) LocalDate date, @JsonProperty(JSON_PROPERTY_DATE_TIME) OffsetDateTime dateTime, @JsonProperty(JSON_PROPERTY_DURATION) String duration, @JsonProperty(JSON_PROPERTY_UUID) UUID uuid, @JsonProperty(JSON_PROPERTY_PASSWORD) String password, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) String patternWithDigits, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) String patternWithDigitsAndDelimiter) { this.integer = integer; this.int32 = int32; this.int64 = int64; @@ -135,6 +140,7 @@ public FormatTest(@JsonProperty(JSON_PROPERTY_INTEGER) Integer integer, @JsonPro this.binary = binary; this.date = date; this.dateTime = dateTime; + this.duration = duration; this.uuid = uuid; this.password = password; this.patternWithDigits = patternWithDigits; @@ -451,6 +457,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -572,6 +603,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -580,7 +612,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -599,6 +631,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); @@ -678,6 +711,10 @@ public FormatTest.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } + public FormatTest.Builder duration(String duration) { + this.instance.duration = duration; + return this; + } public FormatTest.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; @@ -740,6 +777,7 @@ public FormatTest.Builder toBuilder() { .binary(getBinary()) .date(getDate()) .dateTime(getDateTime()) + .duration(getDuration()) .uuid(getUuid()) .password(getPassword()) .patternWithDigits(getPatternWithDigits()) diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/vertx/docs/FormatTest.md b/samples/client/petstore/java/vertx/docs/FormatTest.md index 42278d0f3953..1521b663507c 100644 --- a/samples/client/petstore/java/vertx/docs/FormatTest.md +++ b/samples/client/petstore/java/vertx/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **AsyncFile** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java index cea6aa9c8156..af5d1c083216 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/webclient-jakarta/docs/FormatTest.md b/samples/client/petstore/java/webclient-jakarta/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/FormatTest.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java index f0a0cce1fcbc..97bf289233fa 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @jakarta.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @jakarta.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@jakarta.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@jakarta.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/webclient-swagger2/docs/FormatTest.md b/samples/client/petstore/java/webclient-swagger2/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/FormatTest.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java index 1efebbb26694..8e5c387520f3 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -45,6 +45,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -101,6 +102,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -442,6 +447,32 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "") + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -567,6 +598,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -575,7 +607,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -594,6 +626,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/webclient-useSingleRequestParameter/api/openapi.yaml b/samples/client/petstore/java/webclient-useSingleRequestParameter/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/webclient-useSingleRequestParameter/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-useSingleRequestParameter/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/webclient-useSingleRequestParameter/docs/FormatTest.md b/samples/client/petstore/java/webclient-useSingleRequestParameter/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/webclient-useSingleRequestParameter/docs/FormatTest.md +++ b/samples/client/petstore/java/webclient-useSingleRequestParameter/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/webclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java index ac7e28794447..d3fc216c682a 100644 --- a/samples/client/petstore/java/webclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient-useSingleRequestParameter/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 1eddf878948c..ce7fd772b8e4 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/client/petstore/java/webclient/docs/FormatTest.md b/samples/client/petstore/java/webclient/docs/FormatTest.md index 01b8c777ae06..704659ad4959 100644 --- a/samples/client/petstore/java/webclient/docs/FormatTest.md +++ b/samples/client/petstore/java/webclient/docs/FormatTest.md @@ -19,6 +19,7 @@ |**binary** | **File** | | [optional] | |**date** | **LocalDate** | | | |**dateTime** | **OffsetDateTime** | | [optional] | +|**duration** | **String** | | | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | |**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java index ac7e28794447..d3fc216c682a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -44,6 +44,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -100,6 +101,10 @@ public class FormatTest { @javax.annotation.Nullable private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nonnull + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @javax.annotation.Nullable private UUID uuid; @@ -429,6 +434,31 @@ public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest duration(@javax.annotation.Nonnull String duration) { + + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@javax.annotation.Nonnull String duration) { + this.duration = duration; + } + public FormatTest uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; @@ -550,6 +580,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -558,7 +589,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -577,6 +608,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/client/petstore/ruby-autoload/docs/FormatTest.md b/samples/client/petstore/ruby-autoload/docs/FormatTest.md index a790ce448359..a1473a3d0e2e 100644 --- a/samples/client/petstore/ruby-autoload/docs/FormatTest.md +++ b/samples/client/petstore/ruby-autoload/docs/FormatTest.md @@ -16,6 +16,7 @@ | **binary** | **File** | | [optional] | | **date** | **Date** | | | | **date_time** | **Time** | | [optional] | +| **duration** | **String** | | | | **uuid** | **String** | | [optional] | | **password** | **String** | | | | **pattern_with_digits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | @@ -39,6 +40,7 @@ instance = Petstore::FormatTest.new( binary: null, date: null, date_time: null, + duration: null, uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84, password: null, pattern_with_digits: null, diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb index 4c4de58c1ab9..d71319a7fd7f 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb @@ -39,6 +39,8 @@ class FormatTest attr_accessor :date_time + attr_accessor :duration + attr_accessor :uuid attr_accessor :password @@ -64,6 +66,7 @@ def self.attribute_map :'binary' => :'binary', :'date' => :'date', :'date_time' => :'dateTime', + :'duration' => :'duration', :'uuid' => :'uuid', :'password' => :'password', :'pattern_with_digits' => :'pattern_with_digits', @@ -91,6 +94,7 @@ def self.openapi_types :'binary' => :'File', :'date' => :'Date', :'date_time' => :'Time', + :'duration' => :'String', :'uuid' => :'String', :'password' => :'String', :'pattern_with_digits' => :'String', @@ -173,6 +177,12 @@ def initialize(attributes = {}) self.date_time = attributes[:'date_time'] end + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + else + self.duration = nil + end + if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end @@ -254,6 +264,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "date", date cannot be nil.') end + if @duration.nil? + invalid_properties.push('invalid value for "duration", duration cannot be nil.') + end + if @password.nil? invalid_properties.push('invalid value for "password", password cannot be nil.') end @@ -297,6 +311,7 @@ def valid? return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) return false if @byte.nil? return false if @date.nil? + return false if @duration.nil? return false if @password.nil? return false if @password.to_s.length > 64 return false if @password.to_s.length < 10 @@ -475,6 +490,7 @@ def ==(o) binary == o.binary && date == o.date && date_time == o.date_time && + duration == o.duration && uuid == o.uuid && password == o.password && pattern_with_digits == o.pattern_with_digits && @@ -490,7 +506,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash + [integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, duration, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby-faraday/docs/FormatTest.md b/samples/client/petstore/ruby-faraday/docs/FormatTest.md index a790ce448359..a1473a3d0e2e 100644 --- a/samples/client/petstore/ruby-faraday/docs/FormatTest.md +++ b/samples/client/petstore/ruby-faraday/docs/FormatTest.md @@ -16,6 +16,7 @@ | **binary** | **File** | | [optional] | | **date** | **Date** | | | | **date_time** | **Time** | | [optional] | +| **duration** | **String** | | | | **uuid** | **String** | | [optional] | | **password** | **String** | | | | **pattern_with_digits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | @@ -39,6 +40,7 @@ instance = Petstore::FormatTest.new( binary: null, date: null, date_time: null, + duration: null, uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84, password: null, pattern_with_digits: null, diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 4c4de58c1ab9..d71319a7fd7f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -39,6 +39,8 @@ class FormatTest attr_accessor :date_time + attr_accessor :duration + attr_accessor :uuid attr_accessor :password @@ -64,6 +66,7 @@ def self.attribute_map :'binary' => :'binary', :'date' => :'date', :'date_time' => :'dateTime', + :'duration' => :'duration', :'uuid' => :'uuid', :'password' => :'password', :'pattern_with_digits' => :'pattern_with_digits', @@ -91,6 +94,7 @@ def self.openapi_types :'binary' => :'File', :'date' => :'Date', :'date_time' => :'Time', + :'duration' => :'String', :'uuid' => :'String', :'password' => :'String', :'pattern_with_digits' => :'String', @@ -173,6 +177,12 @@ def initialize(attributes = {}) self.date_time = attributes[:'date_time'] end + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + else + self.duration = nil + end + if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end @@ -254,6 +264,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "date", date cannot be nil.') end + if @duration.nil? + invalid_properties.push('invalid value for "duration", duration cannot be nil.') + end + if @password.nil? invalid_properties.push('invalid value for "password", password cannot be nil.') end @@ -297,6 +311,7 @@ def valid? return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) return false if @byte.nil? return false if @date.nil? + return false if @duration.nil? return false if @password.nil? return false if @password.to_s.length > 64 return false if @password.to_s.length < 10 @@ -475,6 +490,7 @@ def ==(o) binary == o.binary && date == o.date && date_time == o.date_time && + duration == o.duration && uuid == o.uuid && password == o.password && pattern_with_digits == o.pattern_with_digits && @@ -490,7 +506,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash + [integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, duration, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash end # Builds the object from hash diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index a2e245084ac7..c8b0507a4003 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -565,6 +565,12 @@ export interface FormatTest { * @memberof FormatTest */ 'dateTime'?: string; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'duration': string; /** * * @type {string} diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts index 33aed92595aa..479c3e258e98 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts @@ -91,6 +91,12 @@ export interface FormatTest { * @memberof FormatTest */ dateTime?: Date; + /** + * + * @type {string} + * @memberof FormatTest + */ + duration: string; /** * * @type {string} @@ -124,6 +130,7 @@ export function instanceOfFormatTest(value: object): value is FormatTest { if (!('number' in value) || value['number'] === undefined) return false; if (!('_byte' in value) || value['_byte'] === undefined) return false; if (!('date' in value) || value['date'] === undefined) return false; + if (!('duration' in value) || value['duration'] === undefined) return false; if (!('password' in value) || value['password'] === undefined) return false; return true; } @@ -150,6 +157,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'binary': json['binary'] == null ? undefined : json['binary'], 'date': (new Date(json['date'])), 'dateTime': json['dateTime'] == null ? undefined : (new Date(json['dateTime'])), + 'duration': json['duration'], 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'password': json['password'], 'patternWithDigits': json['pattern_with_digits'] == null ? undefined : json['pattern_with_digits'], @@ -180,6 +188,7 @@ export function FormatTestToJSONTyped(value?: FormatTest | null, ignoreDiscrimin 'binary': value['binary'], 'date': ((value['date']).toISOString().substring(0,10)), 'dateTime': value['dateTime'] == null ? undefined : ((value['dateTime']).toISOString()), + 'duration': value['duration'], 'uuid': value['uuid'], 'password': value['password'], 'pattern_with_digits': value['patternWithDigits'], diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts index 33aed92595aa..479c3e258e98 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts @@ -91,6 +91,12 @@ export interface FormatTest { * @memberof FormatTest */ dateTime?: Date; + /** + * + * @type {string} + * @memberof FormatTest + */ + duration: string; /** * * @type {string} @@ -124,6 +130,7 @@ export function instanceOfFormatTest(value: object): value is FormatTest { if (!('number' in value) || value['number'] === undefined) return false; if (!('_byte' in value) || value['_byte'] === undefined) return false; if (!('date' in value) || value['date'] === undefined) return false; + if (!('duration' in value) || value['duration'] === undefined) return false; if (!('password' in value) || value['password'] === undefined) return false; return true; } @@ -150,6 +157,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'binary': json['binary'] == null ? undefined : json['binary'], 'date': (new Date(json['date'])), 'dateTime': json['dateTime'] == null ? undefined : (new Date(json['dateTime'])), + 'duration': json['duration'], 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'password': json['password'], 'patternWithDigits': json['pattern_with_digits'] == null ? undefined : json['pattern_with_digits'], @@ -180,6 +188,7 @@ export function FormatTestToJSONTyped(value?: FormatTest | null, ignoreDiscrimin 'binary': value['binary'], 'date': ((value['date']).toISOString().substring(0,10)), 'dateTime': value['dateTime'] == null ? undefined : ((value['dateTime']).toISOString()), + 'duration': value['duration'], 'uuid': value['uuid'], 'password': value['password'], 'pattern_with_digits': value['patternWithDigits'], diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md index 83b60545eb61..e96ca71e4d9e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | **dateTime** | [**DateTime**](DateTime.md) | | [optional] +**duration** | **String** | | **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart index a20ba417fa54..079a07296b46 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart @@ -43,6 +43,8 @@ class FormatTest { this.dateTime, + required this.duration, + this.uuid, required this.password, @@ -201,6 +203,18 @@ class FormatTest { + @JsonKey( + + name: r'duration', + required: true, + includeIfNull: false, + ) + + + final String duration; + + + @JsonKey( name: r'uuid', @@ -267,6 +281,7 @@ class FormatTest { other.binary == binary && other.date == date && other.dateTime == dateTime && + other.duration == duration && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -286,6 +301,7 @@ class FormatTest { binary.hashCode + date.hashCode + dateTime.hashCode + + duration.hashCode + uuid.hashCode + password.hashCode + patternWithDigits.hashCode + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md index f811264ca2ba..a009342017b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **binary** | [**Uint8List**](Uint8List.md) | | [optional] **date** | [**Date**](Date.md) | | **dateTime** | [**DateTime**](DateTime.md) | | [optional] +**duration** | **String** | | **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart index 33775231476e..6a91d1c1dd84 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart @@ -25,6 +25,7 @@ part 'format_test.g.dart'; /// * [binary] /// * [date] /// * [dateTime] +/// * [duration] /// * [uuid] /// * [password] /// * [patternWithDigits] - A string that is a 10 digit number. Can have leading zeros. @@ -67,6 +68,9 @@ abstract class FormatTest implements Built { @BuiltValueField(wireName: r'dateTime') DateTime? get dateTime; + @BuiltValueField(wireName: r'duration') + String get duration; + @BuiltValueField(wireName: r'uuid') String? get uuid; @@ -182,6 +186,11 @@ class _$FormatTestSerializer implements PrimitiveSerializer { specifiedType: const FullType(DateTime), ); } + yield r'duration'; + yield serializers.serialize( + object.duration, + specifiedType: const FullType(String), + ); if (object.uuid != null) { yield r'uuid'; yield serializers.serialize( @@ -315,6 +324,13 @@ class _$FormatTestSerializer implements PrimitiveSerializer { ) as DateTime; result.dateTime = valueDes; break; + case r'duration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.duration = valueDes; + break; case r'uuid': final valueDes = serializers.deserialize( value, diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md index 83b60545eb61..e96ca71e4d9e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | **dateTime** | [**DateTime**](DateTime.md) | | [optional] +**duration** | **String** | | **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index b0edc2e38e14..3b7e8f4124c5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -25,6 +25,7 @@ class FormatTest { this.binary, required this.date, this.dateTime, + required this.duration, this.uuid, required this.password, this.patternWithDigits, @@ -119,6 +120,8 @@ class FormatTest { /// DateTime? dateTime; + String duration; + /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -161,6 +164,7 @@ class FormatTest { other.binary == binary && other.date == date && other.dateTime == dateTime && + other.duration == duration && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -181,13 +185,14 @@ class FormatTest { (binary == null ? 0 : binary!.hashCode) + (date.hashCode) + (dateTime == null ? 0 : dateTime!.hashCode) + + (duration.hashCode) + (uuid == null ? 0 : uuid!.hashCode) + (password.hashCode) + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); @override - String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; + String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, duration=$duration, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; Map toJson() { final json = {}; @@ -239,6 +244,7 @@ class FormatTest { } else { json[r'dateTime'] = null; } + json[r'duration'] = this.duration; if (this.uuid != null) { json[r'uuid'] = this.uuid; } else { @@ -289,6 +295,7 @@ class FormatTest { binary: null, // No support for decoding binary content from JSON date: mapDateTime(json, r'date', r'')!, dateTime: mapDateTime(json, r'dateTime', r''), + duration: mapValueOfType(json, r'duration')!, uuid: mapValueOfType(json, r'uuid'), password: mapValueOfType(json, r'password')!, patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), @@ -343,6 +350,7 @@ class FormatTest { 'number', 'byte', 'date', + 'duration', 'password', }; } diff --git a/samples/openapi3/client/petstore/typescript/builds/explode-query/models/FormatTest.ts b/samples/openapi3/client/petstore/typescript/builds/explode-query/models/FormatTest.ts index da5f14482202..c81d315a926a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/explode-query/models/FormatTest.ts +++ b/samples/openapi3/client/petstore/typescript/builds/explode-query/models/FormatTest.ts @@ -25,6 +25,7 @@ export class FormatTest { 'binary'?: HttpFile; 'date': string; 'dateTime'?: Date; + 'duration': string; 'uuid'?: string; 'password': string; /** @@ -113,6 +114,12 @@ export class FormatTest { "type": "Date", "format": "date-time" }, + { + "name": "duration", + "baseName": "duration", + "type": "string", + "format": "duration" + }, { "name": "uuid", "baseName": "uuid", diff --git a/samples/schema/petstore/mysql/Model/FormatTest.sql b/samples/schema/petstore/mysql/Model/FormatTest.sql index 0c7bf749cbef..bd1e2f47d741 100644 --- a/samples/schema/petstore/mysql/Model/FormatTest.sql +++ b/samples/schema/petstore/mysql/Model/FormatTest.sql @@ -7,17 +7,17 @@ -- -- SELECT template for table `format_test` -- -SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter` FROM `format_test` WHERE 1; +SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `duration`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter` FROM `format_test` WHERE 1; -- -- INSERT template for table `format_test` -- -INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); +INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `duration`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); -- -- UPDATE template for table `format_test` -- -UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `decimal` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `pattern_with_digits` = ?, `pattern_with_digits_and_delimiter` = ? WHERE 1; +UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `decimal` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `duration` = ?, `uuid` = ?, `password` = ?, `pattern_with_digits` = ?, `pattern_with_digits_and_delimiter` = ? WHERE 1; -- -- DELETE template for table `format_test` diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index 0c526bdabd3e..887c92cdf45f 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -239,6 +239,7 @@ CREATE TABLE IF NOT EXISTS `format_test` ( `binary` MEDIUMBLOB DEFAULT NULL, `date` DATE NOT NULL, `dateTime` DATETIME DEFAULT NULL, + `duration` TEXT NOT NULL, `uuid` TEXT DEFAULT NULL, `password` VARCHAR(64) NOT NULL, `pattern_with_digits` TEXT DEFAULT NULL COMMENT 'A string that is a 10 digit number. Can have leading zeros.', diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp index 3746e59ea319..f41bbbe9d2a1 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp @@ -71,6 +71,7 @@ ptree Format_test::toPropertyTree() const pt.put("string", m_string); pt.put("date", m_date); pt.put("dateTime", m_DateTime); + pt.put("duration", m_Duration); pt.put("uuid", m_Uuid); pt.put("password", m_Password); pt.put("pattern_with_digits", m_Pattern_with_digits); @@ -90,6 +91,7 @@ void Format_test::fromPropertyTree(ptree const &pt) m_string = pt.get("string", ""); m_date = pt.get("date", ""); m_DateTime = pt.get("dateTime", ""); + m_Duration = pt.get("duration", ""); m_Uuid = pt.get("uuid", ""); m_Password = pt.get("password", ""); m_Pattern_with_digits = pt.get("pattern_with_digits", ""); @@ -228,6 +230,17 @@ void Format_test::setDateTime(std::string value) } +std::string Format_test::getDuration() const +{ + return m_Duration; +} + +void Format_test::setDuration(std::string value) +{ + m_Duration = value; +} + + std::string Format_test::getUuid() const { return m_Uuid; diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h index b56e3709a1ed..419b5333aa27 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h @@ -129,6 +129,12 @@ class Format_test std::string getDateTime() const; void setDateTime(std::string value); + /// + /// + /// + std::string getDuration() const; + void setDuration(std::string value); + /// /// /// @@ -166,6 +172,7 @@ class Format_test std::string m_binary = ""; std::string m_date = ""; std::string m_DateTime = ""; + std::string m_Duration = ""; std::string m_Uuid = ""; std::string m_Password = ""; std::string m_Pattern_with_digits = ""; diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/FormatTest.java index c98c85ccbebb..38e57162a33a 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/FormatTest.java @@ -53,6 +53,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -320,6 +322,27 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + @NotNull + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -422,6 +445,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/FormatTest.java index 92e3aef3e80d..de9da538e371 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/FormatTest.java @@ -25,6 +25,7 @@ public class FormatTest { private File binary; private LocalDate date; private OffsetDateTime dateTime; + private String duration; private UUID uuid; private String password; private String patternWithDigits; @@ -52,6 +53,7 @@ public FormatTest() { * @param binary binary * @param date date * @param dateTime dateTime + * @param duration duration * @param uuid uuid * @param password password * @param patternWithDigits A string that is a 10 digit number. Can have leading zeros. @@ -70,6 +72,7 @@ public FormatTest( File binary, LocalDate date, OffsetDateTime dateTime, + String duration, UUID uuid, String password, String patternWithDigits, @@ -87,6 +90,7 @@ public FormatTest( this.binary = binary; this.date = date; this.dateTime = dateTime; + this.duration = duration; this.uuid = uuid; this.password = password; this.patternWithDigits = patternWithDigits; @@ -249,6 +253,18 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + /** + * Get duration + * @return duration + */ + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + /** * Get uuid * @return uuid @@ -317,6 +333,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/FormatTest.java index c98c85ccbebb..38e57162a33a 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/FormatTest.java @@ -53,6 +53,8 @@ public class FormatTest { private OffsetDateTime dateTime; + private String duration; + private UUID uuid; private String password; @@ -320,6 +322,27 @@ public FormatTest dateTime(OffsetDateTime dateTime) { return this; } + /** + * Get duration + * @return duration + **/ + @NotNull + public String getDuration() { + return duration; + } + + /** + * Set duration + **/ + public void setDuration(String duration) { + this.duration = duration; + } + + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + /** * Get uuid * @return uuid @@ -422,6 +445,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/java/org/openapitools/server/model/FormatTest.java index 92e3aef3e80d..de9da538e371 100644 --- a/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/java/org/openapitools/server/model/FormatTest.java @@ -25,6 +25,7 @@ public class FormatTest { private File binary; private LocalDate date; private OffsetDateTime dateTime; + private String duration; private UUID uuid; private String password; private String patternWithDigits; @@ -52,6 +53,7 @@ public FormatTest() { * @param binary binary * @param date date * @param dateTime dateTime + * @param duration duration * @param uuid uuid * @param password password * @param patternWithDigits A string that is a 10 digit number. Can have leading zeros. @@ -70,6 +72,7 @@ public FormatTest( File binary, LocalDate date, OffsetDateTime dateTime, + String duration, UUID uuid, String password, String patternWithDigits, @@ -87,6 +90,7 @@ public FormatTest( this.binary = binary; this.date = date; this.dateTime = dateTime; + this.duration = duration; this.uuid = uuid; this.password = password; this.patternWithDigits = patternWithDigits; @@ -249,6 +253,18 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + /** + * Get duration + * @return duration + */ + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + /** * Get uuid * @return uuid @@ -317,6 +333,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/se-uac-group-by-file-path/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/java/org/openapitools/server/model/FormatTest.java index 92e3aef3e80d..de9da538e371 100644 --- a/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/java/org/openapitools/server/model/FormatTest.java @@ -25,6 +25,7 @@ public class FormatTest { private File binary; private LocalDate date; private OffsetDateTime dateTime; + private String duration; private UUID uuid; private String password; private String patternWithDigits; @@ -52,6 +53,7 @@ public FormatTest() { * @param binary binary * @param date date * @param dateTime dateTime + * @param duration duration * @param uuid uuid * @param password password * @param patternWithDigits A string that is a 10 digit number. Can have leading zeros. @@ -70,6 +72,7 @@ public FormatTest( File binary, LocalDate date, OffsetDateTime dateTime, + String duration, UUID uuid, String password, String patternWithDigits, @@ -87,6 +90,7 @@ public FormatTest( this.binary = binary; this.date = date; this.dateTime = dateTime; + this.duration = duration; this.uuid = uuid; this.password = password; this.patternWithDigits = patternWithDigits; @@ -249,6 +253,18 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + /** + * Get duration + * @return duration + */ + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + /** * Get uuid * @return uuid @@ -317,6 +333,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/se-uac/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-helidon-server/v4/se/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/v4/se/src/main/java/org/openapitools/server/model/FormatTest.java index 92e3aef3e80d..de9da538e371 100644 --- a/samples/server/petstore/java-helidon-server/v4/se/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/v4/se/src/main/java/org/openapitools/server/model/FormatTest.java @@ -25,6 +25,7 @@ public class FormatTest { private File binary; private LocalDate date; private OffsetDateTime dateTime; + private String duration; private UUID uuid; private String password; private String patternWithDigits; @@ -52,6 +53,7 @@ public FormatTest() { * @param binary binary * @param date date * @param dateTime dateTime + * @param duration duration * @param uuid uuid * @param password password * @param patternWithDigits A string that is a 10 digit number. Can have leading zeros. @@ -70,6 +72,7 @@ public FormatTest( File binary, LocalDate date, OffsetDateTime dateTime, + String duration, UUID uuid, String password, String patternWithDigits, @@ -87,6 +90,7 @@ public FormatTest( this.binary = binary; this.date = date; this.dateTime = dateTime; + this.duration = duration; this.uuid = uuid; this.password = password; this.patternWithDigits = patternWithDigits; @@ -249,6 +253,18 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + /** + * Get duration + * @return duration + */ + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + /** * Get uuid * @return uuid @@ -317,6 +333,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/java-helidon-server/v4/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/se/src/main/resources/META-INF/openapi.yml index a08bc26cc144..19737c8ccf7a 100644 --- a/samples/server/petstore/java-helidon-server/v4/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/se/src/main/resources/META-INF/openapi.yml @@ -1721,6 +1721,9 @@ components: dateTime: format: date-time type: string + duration: + format: duration + type: string uuid: example: 72f98069-206d-4f12-9f12-3d1e525a8e84 format: uuid @@ -1742,6 +1745,7 @@ components: required: - byte - date + - duration - number - password type: object diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index bad7106ea5c8..e324c8fb40ab 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -577,13 +577,13 @@ public interface PathHandlerInterface { *

    Response headers: [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", "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, 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, isDuration=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", "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, 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, isDuration=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", "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}]

    +}', 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, isDuration=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='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}]

    * *

    Produces: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]

    *

    Returns: {@link String}

    diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java index 03f137eb87d0..b74100236434 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java @@ -43,6 +43,7 @@ FormatTest.JSON_PROPERTY_BINARY, FormatTest.JSON_PROPERTY_DATE, FormatTest.JSON_PROPERTY_DATE_TIME, + FormatTest.JSON_PROPERTY_DURATION, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, @@ -98,6 +99,10 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_DATE_TIME) private Date dateTime; + public static final String JSON_PROPERTY_DURATION = "duration"; + @JsonProperty(JSON_PROPERTY_DURATION) + private String duration; + public static final String JSON_PROPERTY_UUID = "uuid"; @JsonProperty(JSON_PROPERTY_UUID) private UUID uuid; @@ -364,6 +369,26 @@ public void setDateTime(Date dateTime) { this.dateTime = dateTime; } + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + **/ + @JsonProperty(value = "duration") + @ApiModelProperty(required = true, value = "") + @NotNull + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + public FormatTest uuid(UUID uuid) { this.uuid = uuid; return this; @@ -466,6 +491,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -474,7 +500,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, _byte, binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, _byte, binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -494,6 +520,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/FormatTest.java index 2b848c36ce00..9c2f706e44d5 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/FormatTest.java @@ -35,6 +35,7 @@ public class FormatTest implements Serializable { private File binary; private LocalDate date; private LocalDateTime dateTime; + private String duration; private UUID uuid; private String password; private String patternWithDigits; @@ -53,6 +54,7 @@ protected FormatTest(FormatTestBuilder b) { this.binary = b.binary; this.date = b.date; this.dateTime = b.dateTime; + this.duration = b.duration; this.uuid = b.uuid; this.password = b.password; this.patternWithDigits = b.patternWithDigits; @@ -67,11 +69,13 @@ public FormatTest( @JsonProperty(required = true, value = "number") BigDecimal number, @JsonProperty(required = true, value = "byte") byte[] _byte, @JsonProperty(required = true, value = "date") LocalDate date, + @JsonProperty(required = true, value = "duration") String duration, @JsonProperty(required = true, value = "password") String password ) { this.number = number; this._byte = _byte; this.date = date; + this.duration = duration; this.password = password; } @@ -313,6 +317,25 @@ public void setDateTime(LocalDateTime dateTime) { this.dateTime = dateTime; } + /** + **/ + public FormatTest duration(String duration) { + this.duration = duration; + return this; + } + + + @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") + @JsonProperty(required = true, value = "duration") + @NotNull public String getDuration() { + return duration; + } + + @JsonProperty(required = true, value = "duration") + public void setDuration(String duration) { + this.duration = duration; + } + /** **/ public FormatTest uuid(UUID uuid) { @@ -413,6 +436,7 @@ public boolean equals(Object o) { Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.duration, formatTest.duration) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && @@ -421,7 +445,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, duration, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -441,6 +465,7 @@ public String toString() { sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append("*").append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); @@ -491,6 +516,7 @@ public static abstract class FormatTestBuilder