diff --git a/src/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration/Extensions/TypeExtensions.cs b/src/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration/Extensions/TypeExtensions.cs index 42173e0..0ec0341 100644 --- a/src/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration/Extensions/TypeExtensions.cs +++ b/src/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration/Extensions/TypeExtensions.cs @@ -31,6 +31,7 @@ public static class TypeExtensions [typeof(decimal)] = () => new OpenApiSchema {Type = "number", Format = "double"}, [typeof(DateTime)] = () => new OpenApiSchema {Type = "string", Format = "date-time"}, [typeof(DateTimeOffset)] = () => new OpenApiSchema {Type = "string", Format = "date-time"}, + [typeof(TimeSpan)] = () => new OpenApiSchema {Type = "string"}, [typeof(Guid)] = () => new OpenApiSchema {Type = "string", Format = "uuid"}, [typeof(char)] = () => new OpenApiSchema {Type = "string"}, @@ -47,6 +48,7 @@ public static class TypeExtensions [typeof(DateTime?)] = () => new OpenApiSchema {Type = "string", Format = "date-time", Nullable = true}, [typeof(DateTimeOffset?)] = () => new OpenApiSchema {Type = "string", Format = "date-time", Nullable = true}, + [typeof(TimeSpan?)] = () => new OpenApiSchema { Type = "string", Nullable = true }, [typeof(Guid?)] = () => new OpenApiSchema {Type = "string", Format = "uuid", Nullable = true}, [typeof(char?)] = () => new OpenApiSchema {Type = "string", Nullable = true}, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts/SampleObject1.cs b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts/SampleObject1.cs index 8bb4a0c..a1ef4f7 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts/SampleObject1.cs +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts/SampleObject1.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using Newtonsoft.Json; +using System; namespace Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts { @@ -53,5 +54,11 @@ public sealed class SampleObject1 /// [JsonProperty(PropertyName = "samplePropertyEnum", Required = Required.Always)] public SampleEnum1 SamplePropertyEnum { get; set; } + + /// + /// Gets or sets the sample timespan + /// + [JsonProperty(PropertyName = "samplePropertyTimespan", Required = Required.Always)] + public TimeSpan SamplePropertyTimespan { get; set; } } } \ No newline at end of file diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationDefaultVariant.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationDefaultVariant.json index acaf56a..b09da0e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationDefaultVariant.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationDefaultVariant.json @@ -631,7 +631,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -667,6 +668,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup1.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup1.json index c54aefc..6d372b6 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup1.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup1.json @@ -151,7 +151,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -187,6 +188,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup2.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup2.json index c54aefc..6d372b6 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup2.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationVariantSwaggerGroup2.json @@ -151,7 +151,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -187,6 +188,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationDefaultVariant.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationDefaultVariant.json index 1be80f4..013fed5 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationDefaultVariant.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationDefaultVariant.json @@ -703,7 +703,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -739,6 +740,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup1.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup1.json index 532d31b..a1a05de 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup1.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup1.json @@ -167,7 +167,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -203,6 +204,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup2.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup2.json index f9fd3df..4301af5 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup2.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithCommonAnnotations/AnnotationVariantSwaggerGroup2.json @@ -167,7 +167,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -203,6 +204,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationDefaultVariant.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationDefaultVariant.json index 4d8539c..9de0a87 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationDefaultVariant.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationDefaultVariant.json @@ -218,7 +218,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -254,6 +255,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup1.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup1.json index 9a5a532..2610198 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup1.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup1.json @@ -93,7 +93,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -129,6 +130,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } } diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup2.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup2.json index 37aadee..4324957 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup2.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/DocumentVariantTests/Output/AnnotationsWithDuplicatePaths/AnnotationVariantSwaggerGroup2.json @@ -209,7 +209,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -245,6 +246,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } } diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.dll b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.dll index 22160e8..a9e956f 100644 Binary files a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.dll and b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.dll differ diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.xml b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.xml index 8438071..13e609c 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.xml +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Input/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.xml @@ -89,6 +89,11 @@ Gets or sets the sample property enum + + + Gets or sets the sample timespan + + Sample contract for object 2 diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/Annotation.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/Annotation.Json index 00783b6..78e42a6 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/Annotation.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/Annotation.Json @@ -641,7 +641,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -677,6 +678,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationAlternativeParamTags.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationAlternativeParamTags.Json index 8e3e026..9e2fae7 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationAlternativeParamTags.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationAlternativeParamTags.Json @@ -640,7 +640,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -676,6 +677,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationArrayInParamTags.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationArrayInParamTags.Json index 9c8b265..04c5acb 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationArrayInParamTags.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationArrayInParamTags.Json @@ -634,7 +634,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -670,6 +671,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationCamelCase.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationCamelCase.Json index 00783b6..78e42a6 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationCamelCase.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationCamelCase.Json @@ -641,7 +641,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -677,6 +678,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationConflictingPathAndQueryParameters.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationConflictingPathAndQueryParameters.json index 3b8893e..319388e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationConflictingPathAndQueryParameters.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationConflictingPathAndQueryParameters.json @@ -557,7 +557,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -593,6 +594,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationIncorrectlyOrderedGeneric.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationIncorrectlyOrderedGeneric.json index c8e41bf..552f417 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationIncorrectlyOrderedGeneric.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationIncorrectlyOrderedGeneric.json @@ -570,7 +570,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -606,6 +607,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidUri.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidUri.json index 4aab11d..b7459ec 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidUri.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidUri.json @@ -615,7 +615,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -651,6 +652,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidVerb.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidVerb.json index 4aab11d..b7459ec 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidVerb.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationInvalidVerb.json @@ -615,7 +615,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -651,6 +652,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestMediaTypes.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestMediaTypes.Json index 9f0788e..0783559 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestMediaTypes.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestMediaTypes.Json @@ -655,7 +655,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -691,6 +692,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestTypes.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestTypes.Json index d92d7c3..b98a7ed 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestTypes.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleRequestTypes.Json @@ -641,7 +641,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -677,6 +678,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseMediaTypes.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseMediaTypes.Json index 7c3b1c4..a1d1a70 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseMediaTypes.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseMediaTypes.Json @@ -672,7 +672,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -708,6 +709,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseTypes.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseTypes.Json index 3f48aea..c646d99 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseTypes.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationMultipleResponseTypes.Json @@ -641,7 +641,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -677,6 +678,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationNewFilter.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationNewFilter.Json index eab86d3..f7a7547 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationNewFilter.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationNewFilter.Json @@ -94,7 +94,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -130,6 +131,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationOptionalPathParametersBranching.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationOptionalPathParametersBranching.Json index 7c34eac..2ceb29a 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationOptionalPathParametersBranching.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationOptionalPathParametersBranching.Json @@ -1403,7 +1403,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -1439,6 +1440,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamNoTypeSpecified.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamNoTypeSpecified.json index acaf56a..b09da0e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamNoTypeSpecified.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamNoTypeSpecified.json @@ -631,7 +631,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -667,6 +668,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInButPresentInUrl.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInButPresentInUrl.Json index acaf56a..b09da0e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInButPresentInUrl.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInButPresentInUrl.Json @@ -631,7 +631,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -667,6 +668,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInNotPresentInUrl.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInNotPresentInUrl.Json index 3b8893e..319388e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInNotPresentInUrl.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationParamWithoutInNotPresentInUrl.Json @@ -557,7 +557,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -593,6 +594,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationRequestMissingSeeTag.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationRequestMissingSeeTag.json index f63bce8..c684147 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationRequestMissingSeeTag.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationRequestMissingSeeTag.json @@ -556,7 +556,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -592,6 +593,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationSummaryWithTags.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationSummaryWithTags.Json index 40a229b..1f5f7e2 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationSummaryWithTags.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationSummaryWithTags.Json @@ -631,7 +631,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -667,6 +668,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationTypeNotFound.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationTypeNotFound.json index f63bce8..c684147 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationTypeNotFound.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationTypeNotFound.json @@ -556,7 +556,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -592,6 +593,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedGeneric.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedGeneric.json index f63bce8..c684147 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedGeneric.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedGeneric.json @@ -556,7 +556,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -592,6 +593,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedPathParam.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedPathParam.Json index 3b8893e..319388e 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedPathParam.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationUndocumentedPathParam.Json @@ -557,7 +557,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -593,6 +594,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationWithDuplicateStringInParamName.Json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationWithDuplicateStringInParamName.Json index 4a6d0c6..ec423a8 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationWithDuplicateStringInParamName.Json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OpenApiDocumentGeneratorTests/Output/AnnotationWithDuplicateStringInParamName.Json @@ -26,25 +26,25 @@ "$ref": "#/components/schemas/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject1" } }, - { - "name": "sample-Header-Param2", - "in": "header", - "description": "Header param 2", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.ISampleObject4_Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject1-Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject2_" - } - } - }, - { - "name": "$sampleHeaderParam3", - "in": "header", - "description": "Header param 3", - "schema": { - "type": "string" - } - }, + { + "name": "sample-Header-Param2", + "in": "header", + "description": "Header param 2", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.ISampleObject4_Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject1-Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject2_" + } + } + }, + { + "name": "$sampleHeaderParam3", + "in": "header", + "description": "Header param 3", + "schema": { + "type": "string" + } + }, { "name": "id", "in": "path", @@ -641,7 +641,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -677,6 +678,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToAllOperations.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToAllOperations.json index 6a5af8d..288b183 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToAllOperations.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToAllOperations.json @@ -614,7 +614,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -650,6 +651,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToSomeOperations.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToSomeOperations.json index 8792ff2..598c295 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToSomeOperations.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationApplyToSomeOperations.json @@ -610,7 +610,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -646,6 +647,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationBlankOperationConfig.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationBlankOperationConfig.json index 737ad0f..8a46340 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationBlankOperationConfig.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationBlankOperationConfig.json @@ -495,7 +495,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -531,6 +532,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationNoOperationConfig.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationNoOperationConfig.json index 737ad0f..8a46340 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationNoOperationConfig.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationNoOperationConfig.json @@ -495,7 +495,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -531,6 +532,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } }, diff --git a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationOverridden.json b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationOverridden.json index 208b68e..0f06243 100644 --- a/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationOverridden.json +++ b/test/Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests/OperationConfigTests/Output/AnnotationOverridden.json @@ -495,7 +495,8 @@ "required": [ "samplePropertyString3", "samplePropertyString4", - "samplePropertyEnum" + "samplePropertyEnum", + "samplePropertyTimespan" ], "type": "object", "properties": { @@ -531,6 +532,10 @@ ], "type": "string", "description": "Gets or sets the sample property enum" + }, + "samplePropertyTimespan": { + "type": "string", + "description": "Gets or sets the sample timespan" } } },