From 55e7df14490813fe4b92a011d16347c8c768440a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Aug 2026 18:33:46 +0000 Subject: [PATCH 1/2] Bump Microsoft.OpenApi from 3.9.0 to 3.10.2 --- updated-dependencies: - dependency-name: Microsoft.OpenApi dependency-version: 3.10.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Microsoft.OpenAPI.OData.Reader.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj index 09da523b..67a40c16 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -30,7 +30,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive From d9c7020a7737098dd189002cc70c36f36598824c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 19:02:34 +0000 Subject: [PATCH 2/2] Fix CI snapshot failures for OpenAPI 3.0 nullable enum output Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- .../Generator/OpenApiSchemaGeneratorTests.cs | 15 ++++-- .../Resources/Multiple.Schema.OpenApi.json | 39 ++++++++++----- .../Resources/Multiple.Schema.OpenApi.yaml | 13 +++++ .../Resources/TripService.OpenApi.json | 48 ++++++++++++------- .../Resources/TripService.OpenApi.yaml | 16 +++++++ 5 files changed, 97 insertions(+), 34 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index ff62e212..447acb94 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -393,7 +393,8 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns "$ref": "#/components/schemas/microsoft.graph.userInsightsSettings" }, { - "enum": [null] + "enum": [null], + "nullable": true } ], "description": "The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property.", @@ -405,7 +406,8 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns "$ref": "#/components/schemas/microsoft.graph.contactMergeSuggestions" }, { - "enum": [null] + "enum": [null], + "nullable": true } ], "description": "The user's settings for the visibility of merge suggestion for the duplicate contacts in the user's contact list.", @@ -417,7 +419,8 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns "$ref": "#/components/schemas/microsoft.graph.regionalAndLanguageSettings" }, { - "enum": [null] + "enum": [null], + "nullable": true } ], "description": "The user's preferences for languages, regional locale and date/time formatting.", @@ -429,7 +432,8 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns "$ref": "#/components/schemas/microsoft.graph.shiftPreferences" }, { - "enum": [null] + "enum": [null], + "nullable": true } ], "description": "The shift preferences for the user.", @@ -928,7 +932,8 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp { "enum": [ null - ] + ], + "nullable": true } ], "default": "yellow" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json index b00992a6..a7198a53 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json @@ -5018,7 +5018,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5368,7 +5369,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5381,7 +5383,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5394,7 +5397,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5545,7 +5549,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5617,7 +5622,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5630,7 +5636,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5880,7 +5887,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5893,7 +5901,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5906,7 +5915,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6086,7 +6096,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6099,7 +6110,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6616,7 +6628,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml index 715d8e71..5307eeea 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml @@ -3530,6 +3530,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: Id: 0 @@ -3808,18 +3809,21 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true LastRevisionFile: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' - enum: - null + nullable: true x-ms-navigationProperty: true SourceDocument: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true SourceDocumentChildren: type: array @@ -3934,6 +3938,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: ClassInstance: 0 @@ -3988,12 +3993,14 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true Tag: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - enum: - null + nullable: true x-ms-navigationProperty: true example: DocumentId: 0 @@ -4195,18 +4202,21 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true Type: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true SourceFolder: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true Documents: type: array @@ -4345,12 +4355,14 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true ParentLibraryTypes: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true MasterLibraryTypeChildren: type: array @@ -4739,6 +4751,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: Id: 0 diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json index 33b971d7..e1c6729d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -1420,7 +1420,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -1456,7 +1457,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -11693,7 +11695,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -16971,7 +16974,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -30723,7 +30727,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33743,7 +33748,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -33777,7 +33783,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "description": "The best friend.", @@ -33829,7 +33836,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33851,7 +33859,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33895,7 +33904,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "description": "The person to contact in case of a crisis at this location.", @@ -34040,7 +34050,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -34090,7 +34101,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34103,7 +34115,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34116,7 +34129,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34188,7 +34202,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -34533,7 +34548,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml index c7eb92a8..5680245b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -914,6 +914,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -935,6 +936,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -7782,6 +7784,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -11292,6 +11295,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -20530,6 +20534,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -22565,6 +22570,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - enum: - null + nullable: true FavoriteFeature: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Features: @@ -22586,6 +22592,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true description: The best friend. x-ms-navigationProperty: true Trips: @@ -22620,6 +22627,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - enum: - null + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object @@ -22632,6 +22640,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - enum: - null + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: title: City type: object @@ -22658,6 +22667,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true description: The person to contact in case of a crisis at this location. x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: @@ -22753,6 +22763,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' - enum: - null + nullable: true Description: type: string nullable: true @@ -22779,18 +22790,21 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - enum: - null + nullable: true x-ms-navigationProperty: true From: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true x-ms-navigationProperty: true To: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: @@ -22828,6 +22842,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - enum: - null + nullable: true DirectReports: type: array items: @@ -23046,6 +23061,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - enum: - null + nullable: true GetFriendsTripsResponse: description: Success content: