From 99df07d1e611d11d39e3d28ded9619675152d34f Mon Sep 17 00:00:00 2001 From: Andrew Dessin Date: Fri, 10 Apr 2020 14:21:17 -0700 Subject: [PATCH] Added timestamp support --- .../Extensions/TypeExtensions.cs | 2 + .../SampleObject1.cs | 7 +++ .../Output/AnnotationDefaultVariant.json | 7 ++- .../AnnotationVariantSwaggerGroup1.json | 7 ++- .../AnnotationVariantSwaggerGroup2.json | 7 ++- .../AnnotationDefaultVariant.json | 7 ++- .../AnnotationVariantSwaggerGroup1.json | 7 ++- .../AnnotationVariantSwaggerGroup2.json | 7 ++- .../AnnotationDefaultVariant.json | 7 ++- .../AnnotationVariantSwaggerGroup1.json | 7 ++- .../AnnotationVariantSwaggerGroup2.json | 7 ++- ...ons.DocumentGeneration.Tests.Contracts.dll | Bin 25088 -> 25600 bytes ...ons.DocumentGeneration.Tests.Contracts.xml | 5 ++ .../Output/Annotation.Json | 7 ++- .../AnnotationAlternativeParamTags.Json | 7 ++- .../Output/AnnotationArrayInParamTags.Json | 7 ++- .../Output/AnnotationCamelCase.Json | 7 ++- ...tionConflictingPathAndQueryParameters.json | 7 ++- .../AnnotationIncorrectlyOrderedGeneric.json | 7 ++- .../Output/AnnotationInvalidUri.json | 7 ++- .../Output/AnnotationInvalidVerb.json | 7 ++- .../AnnotationMultipleRequestMediaTypes.Json | 7 ++- .../AnnotationMultipleRequestTypes.Json | 7 ++- .../AnnotationMultipleResponseMediaTypes.Json | 7 ++- .../AnnotationMultipleResponseTypes.Json | 7 ++- .../Output/AnnotationNewFilter.Json | 7 ++- ...tationOptionalPathParametersBranching.Json | 7 ++- .../AnnotationParamNoTypeSpecified.json | 7 ++- ...notationParamWithoutInButPresentInUrl.Json | 7 ++- ...notationParamWithoutInNotPresentInUrl.Json | 7 ++- .../AnnotationRequestMissingSeeTag.json | 7 ++- .../Output/AnnotationSummaryWithTags.Json | 7 ++- .../Output/AnnotationTypeNotFound.json | 7 ++- .../Output/AnnotationUndocumentedGeneric.json | 7 ++- .../AnnotationUndocumentedPathParam.Json | 7 ++- ...otationWithDuplicateStringInParamName.Json | 45 ++++++++++-------- .../AnnotationApplyToAllOperations.json | 7 ++- .../AnnotationApplyToSomeOperations.json | 7 ++- .../AnnotationBlankOperationConfig.json | 7 ++- .../Output/AnnotationNoOperationConfig.json | 7 ++- .../Output/AnnotationOverridden.json | 7 ++- 41 files changed, 255 insertions(+), 56 deletions(-) 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 22160e82dab50d88edb67c01e100ea35933a61a7..a9e956fb7982e2edf39db1cccb88cff491c8ef0e 100644 GIT binary patch delta 3814 zcmcJSiBnbA9mjw7zW46J@-|ix^#Kx5T=20Z;sOL}T!NBqoic)@iL>tp}+|T)a zzrWu(_nvc?cZr-*A|ESzc4i*Ew&y95TOVZxVwF6iw)=>j<3_5je%U6- zHc_;qfP?4Nret*6E~?a~6cLI-Ihg2=QSEvTV4$7{MzM1o`g12?s!ge)e+tfYXaH-E zBW;m5*f7~CO|#VNPapn)1)tYd!nKQ!N z%;SW|6^qX2oq{j0)8Kkf(`cAkqQ}r4?K+sCUPtF+PH~t{97dzBm>cyH#LdjB^tGZ< zJ{UvAuIsv+JX#dI?24l18fObYapG2u%N?#Z>WnhXOrb7VzoR;wxs$b*x;f{>dMM}+ zL9QCH0p+FLP-Td1m8S^hrD2?FWR-+FS5zKhl}ckUs+Z2P8cq{foeV>IaRKt^iAcz~ zBltw*S!O$^&}Z8TO2!r z8T2>DYv6~Dz1%k}I?s1>N-Kl*I^L0vLOG82?w6MF2?>g&!_|*h=zUb$TW@?C{rmy7 zkA4-j?-EfNr5>mS0a5$1amefqI%t`#!o~^Hi<>KC%hW+!B`2-1mEqGr2|B4!svJED zxmKwH=9!?2UX-fHRB&l_OI1m|L5*IQ>KQD%Mn911U&!fnP^xe;u8>YYlX8aA8#L&s zRLhVv=r>YDkTdBcsrDgf(pjly>gR(obWy4m`X8bCrP{7v4aU+ zaWp8CVwgC(E0q`~jvN_;?PVi?Ws9d+sfw^_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entGeneratorTests/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" } } },