diff --git a/.redocly.lint-ignore.yaml b/.redocly.lint-ignore.yaml new file mode 100644 index 000000000..8fd42493c --- /dev/null +++ b/.redocly.lint-ignore.yaml @@ -0,0 +1,160 @@ +# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API. +# Suppresses the error "The 'type' field must be defined when the 'nullable' field is used" per this comment https://github.com/Redocly/redocly-cli/issues/925#issuecomment-2355005587. +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json: + no-server-example.com: + - '#/servers/0/url' + struct: + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel/properties/Tag/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/LibraryParent/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType/properties/MasterLibraryType/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType/properties/ParentLibraryTypes/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/Type/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/SourceFolder/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/Library/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/LastRevisionFile/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/SourceDocument/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.App.DTO.RevisionDto/properties/Document/anyOf/1/nullable +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json: + struct: + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location/properties/City/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person/properties/HomeAddress/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person/properties/BestFriend/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation/allOf/1/properties/EmergencyAuthority/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport/properties/Location/anyOf/1/nullable + - >- + #/paths/~1GetNearestAirport(lat={lat},lon={lon})/get/responses/200/content/application~1json/schema/anyOf/1/nullable + - >- + #/paths/~1GetPersonWithMostFriends()/get/responses/200/content/application~1json/schema/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/allOf/1/properties/BossOffice/anyOf/1/nullable + - >- + #/components/responses/GetFavoriteAirlineResponse/content/application~1json/schema/anyOf/1/nullable + - >- + #/paths/~1Me~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/paths/~1NewComePeople~1{UserName}~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/paths/~1People~1{UserName}~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event/allOf/1/properties/OccursAt/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/Airline/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/From/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/To/anyOf/1/nullable +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml: + no-server-example.com: + - '#/servers/0/url' +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml: + no-server-example.com: + - '#/servers/0/url' + struct: + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel/properties/Tag/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/LibraryParent/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType/properties/MasterLibraryType/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType/properties/ParentLibraryTypes/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/Type/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library/properties/SourceFolder/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/Library/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/LastRevisionFile/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document/properties/SourceDocument/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision/properties/Document/anyOf/1/nullable + - >- + #/components/schemas/Siterra.Documents.App.DTO.RevisionDto/properties/Document/anyOf/1/nullable +test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml: + struct: + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location/properties/City/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person/properties/HomeAddress/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person/properties/BestFriend/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation/allOf/1/properties/EmergencyAuthority/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport/properties/Location/anyOf/1/nullable + - >- + #/paths/~1GetNearestAirport(lat={lat},lon={lon})/get/responses/200/content/application~1json/schema/anyOf/1/nullable + - >- + #/paths/~1GetPersonWithMostFriends()/get/responses/200/content/application~1json/schema/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/allOf/1/properties/BossOffice/anyOf/1/nullable + - >- + #/components/responses/GetFavoriteAirlineResponse/content/application~1json/schema/anyOf/1/nullable + - >- + #/paths/~1Me~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/paths/~1NewComePeople~1{UserName}~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/paths/~1People~1{UserName}~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager~1Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire/post/requestBody/content/application~1json/schema/properties/hire/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event/allOf/1/properties/OccursAt/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/Airline/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/From/anyOf/1/nullable + - >- + #/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight/allOf/1/properties/To/anyOf/1/nullable diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs index 1603761c7..808ee59c4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs @@ -9,9 +9,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs index 592100fe7..54a92bc3b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs @@ -3,8 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Generator; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs index 233876ef1..93ffc7e03 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs @@ -9,10 +9,6 @@ using System.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary; diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index 376b98914..7dae4f6bd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -8,9 +8,6 @@ using System.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Operation; diff --git a/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs index c68d3abea..25fb080f1 100644 --- a/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs @@ -6,9 +6,6 @@ using System.Collections.Generic; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs index edff4e306..68b4d3ea6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Collections.Generic; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Extensions { diff --git a/src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs index 5a9d864c3..acef8fa70 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Collections.Generic; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Extensions { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index 5d5ff3997..1614fad40 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index b2b606e53..d98abb24e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 40ea8a048..dbc0db4c5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -4,17 +4,11 @@ // ------------------------------------------------------------ using System; -using System.Collections.Generic; using System.Diagnostics; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models.References; -using Microsoft.OpenApi.Models.Interfaces; using System.Globalization; namespace Microsoft.OpenApi.OData.Generator diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index 346362259..a46f4e901 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -6,13 +6,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.MicrosoftExtensions; -using Microsoft.OpenApi.Models.References; -using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index 1315f99e3..9f76da055 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -3,12 +3,9 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs index 70d0f4c57..b99d7cdd4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs @@ -9,9 +9,6 @@ using System.Reflection; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs index 6ff25dafc..527cfcac0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs @@ -6,10 +6,8 @@ using System.Collections.Generic; using Microsoft.OData.Edm; using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using System.Linq; -using Microsoft.OpenApi.Models.Interfaces; using System; namespace Microsoft.OpenApi.OData.Generator diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 9e7cb8ab2..06087925a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.OData.Edm; @@ -14,10 +13,6 @@ using System.Diagnostics; using System; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Models.References; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Extensions; namespace Microsoft.OpenApi.OData.Generator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index 69f824475..8833cc84c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -6,11 +6,8 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; -using Microsoft.OpenApi.OData.PathItem; namespace Microsoft.OpenApi.OData.Generator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs index dfb0661d4..80cf7b661 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index 2e23c398a..9be25fe65 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -6,11 +6,8 @@ using System.Linq; using System.Collections.Generic; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.Models.References; -using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 293c6ceab..2c5f193c5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -3,13 +3,9 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Core; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index f36023f93..fcd814f2d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -8,19 +8,13 @@ using System.Diagnostics; using Microsoft.OData.Edm; using Microsoft.OpenApi.OData.Properties; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.Exceptions; using System.Linq; -using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.MicrosoftExtensions; using Microsoft.OpenApi.OData.Vocabulary.Core; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models.References; using System.Globalization; -using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -105,7 +99,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume }; document.AddComponent(Constants.BaseCollectionPaginationCountResponse, responseSchema); - responseSchema.Properties ??= []; + responseSchema.Properties ??= new Dictionary(); if (context.Settings.EnableCount) responseSchema.Properties.Add(ODataConstants.OdataCount.Key, ODataConstants.OdataCount.Value); if (context.Settings.EnablePagination) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs index 5a6c39257..56b4fc99e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs @@ -5,11 +5,9 @@ using System.Linq; using System.Collections.Generic; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; -using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs index 5c3469351..476e36d7e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs @@ -6,7 +6,6 @@ using System; using System.Diagnostics; using System.Linq; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiServerGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiServerGenerator.cs index afac502ac..5cf3a5f75 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiServerGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiServerGenerator.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Collections.Generic; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs index 74a70bf06..39c52932a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs @@ -5,9 +5,6 @@ using System.Collections.Generic; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiTagGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiTagGenerator.cs index 059996c05..76d9ad0cf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiTagGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiTagGenerator.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Diagnostics; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; 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 028e4d7e9..d863723fc 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 diff --git a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs index e42fdcdac..d8aec5fb4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs @@ -3,8 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; using System.Collections.Generic; namespace Microsoft.OpenApi.OData diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs index 2c7f93d81..82096cc06 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs @@ -3,9 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Core; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index f6455b269..c5c736f7d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -8,11 +8,6 @@ using System.Net.Http; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs index a79a42eeb..bda8192ee 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 2bb2e2cf0..e213bff9e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -8,8 +8,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs index e8793d0e4..7e50f017c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index 59532cf66..2455530b3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index b555fdb9d..de59fad99 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -3,15 +3,11 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs index 0054295fc..19888081c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs @@ -6,9 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index df3b254bb..4de9825ee 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -6,10 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index 8ed3a0d22..41a3b614b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -6,9 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs index 503e3cb0e..5d34c2432 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs @@ -6,9 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index aa903706b..19eb4bea3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -3,14 +3,9 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index 23460f796..5135d5c14 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -8,10 +8,6 @@ using System.Linq; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs index 16f8f7f3b..023ef442c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index 8507cd40a..37ed31b49 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -5,14 +5,11 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; using Microsoft.OpenApi.OData.Edm; -using Microsoft.OpenApi.Models.References; -using Microsoft.OpenApi.Models.Interfaces; using System.Net.Http; namespace Microsoft.OpenApi.OData.Operation diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs index aa003143b..44bdae824 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs index be418dbd8..6689fd48d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index f0d1f9d1e..0ff499229 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -3,16 +3,11 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs index cf6ea4d40..601b834e6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs @@ -4,10 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Core; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index c867f6576..9a4ac62f2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 8a1ec04b8..7d17f30d5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandler.cs index 1faef29ab..2a3116754 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Operation diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs index 4d812c1c7..62b0739d5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Operation diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs index bacd851e2..41d84982b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs @@ -1,5 +1,4 @@ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs index e44471ed4..6d71c3698 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs @@ -5,7 +5,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 6ab09dabf..e131d1e13 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -4,9 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Core; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index 66db24322..e964d22c2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -8,8 +8,6 @@ using System.Net.Http; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs index f3114b698..c15aa8020 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; namespace Microsoft.OpenApi.OData.Operation diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs index 51f2cb085..4917015e0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 1438ba8aa..5e420c735 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -9,11 +9,6 @@ using System.Net.Http; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 58af4dac8..f06baede9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -4,11 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs index 98218ea40..2702a2fca 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs index de3e656bb..9b596d45c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs index 62ed631a6..4e3d048dd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs index 566196258..4c1a5e720 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs @@ -3,11 +3,9 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Collections.Generic; using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 6832f3f8f..33cbcda54 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -10,11 +10,6 @@ using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index f09ff552b..b78958d16 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Net.Http; -using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.MicrosoftExtensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs index ebb420d37..55a70ddb7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs @@ -3,9 +3,7 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Collections.Generic; using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Operation diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs index dab9aadb0..aff3fcbe5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index 9a2a2ae4a..516aadcea 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -8,11 +8,6 @@ using System.Net.Http; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index 228019c3a..028e403f7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -5,8 +5,6 @@ using System.Linq; using System.Net.Http; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index 4d0e85cee..ffc6c507c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -5,8 +5,6 @@ using System.Linq; using System.Net.Http; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 9d5e1b838..5a7f9b647 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs index c22a9e0f4..8202860ec 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs @@ -4,10 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Core; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index cd4f56dea..f086c0409 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs index c83d881ef..6596750e4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs index c68d044dd..540b4b426 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs index 22f91287a..0487f7872 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs @@ -5,9 +5,6 @@ using System.Collections.Generic; using System.Net.Http; -using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs index 403250959..5b945e86d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandler.cs index 2b5029fb7..40ac6e27e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandler.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs index 8a1aa0660..e32f67db8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs index 7498243f3..4aa7fd0a0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs @@ -5,7 +5,6 @@ using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs index 5862ad1c0..7e8ede2fd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs index b92b191af..a1c33b153 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs @@ -7,15 +7,12 @@ using System.Linq; using System.Collections.Generic; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; using System.Text.Json.Nodes; using System.Net.Http; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Extensions; namespace Microsoft.OpenApi.OData.PathItem { diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs index 36cdd7cd5..d7f6ec010 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs index a7a53286d..7f4682ac2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs index 1b5af9523..6c8990037 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs @@ -8,9 +8,6 @@ using System.Net.Http; using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index 0d20abedc..8dd00ca41 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs index 51fdd24fc..3a633d41d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs index f54a88702..4d3d3aa81 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs @@ -4,10 +4,8 @@ // ------------------------------------------------------------ using System; -using System.Diagnostics; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs index d3fb7937b..b4a210f49 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/ApiKey.cs b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/ApiKey.cs index d41e96dcf..d00b57a2d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/ApiKey.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/ApiKey.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Vocabulary.Authorization diff --git a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Authorization.cs b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Authorization.cs index 520c99732..0263b9bac 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Authorization.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Authorization.cs @@ -6,8 +6,6 @@ using System; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; diff --git a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Http.cs b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Http.cs index 8a44d4361..d05dfccad 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Http.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/Http.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Vocabulary.Authorization diff --git a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OAuthAuthorization.cs b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OAuthAuthorization.cs index 79434342f..a767f334e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OAuthAuthorization.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OAuthAuthorization.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Vocabulary.Authorization diff --git a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OpenIDConnect.cs b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OpenIDConnect.cs index d444119db..fd42a1b33 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OpenIDConnect.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Vocabulary/Authorization/OpenIDConnect.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.Vocabulary.Authorization diff --git a/src/OoasGui/MainForm.cs b/src/OoasGui/MainForm.cs index 1a1c55e29..6129a53dc 100644 --- a/src/OoasGui/MainForm.cs +++ b/src/OoasGui/MainForm.cs @@ -13,8 +13,6 @@ using System.Collections.Generic; using Microsoft.OData.Edm.Validation; using System.Text; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData; using System.Xml; using System.Threading.Tasks; @@ -25,7 +23,10 @@ namespace OoasGui [System.Runtime.Versioning.SupportedOSPlatform("windows")] public partial class MainForm : Form { - private OpenApiFormat Format { get; set; } = OpenApiFormat.Json; + private const string Json = "Json"; + private const string Yaml = "Yaml"; + + private string Format { get; set; } = Json; private OpenApiSpecVersion Version { get; set; } = OpenApiSpecVersion.OpenApi3_1; @@ -58,7 +59,7 @@ public MainForm() private async void jsonRadioBtn_CheckedChanged(object sender, EventArgs e) #pragma warning restore VSTHRD100 { - Format = OpenApiFormat.Json; + Format = Json; await ConvertAsync(); } @@ -66,7 +67,7 @@ private async void jsonRadioBtn_CheckedChanged(object sender, EventArgs e) private async void yamlRadioBtn_CheckedChanged(object sender, EventArgs e) #pragma warning restore VSTHRD100 { - Format = OpenApiFormat.Yaml; + Format = Yaml; await ConvertAsync(); } @@ -205,7 +206,7 @@ private async Task ConvertAsync() using var stream = new MemoryStream(); if (_document is not null) { - await _document.SerializeAsync(stream, Version, Format); + await _document.SerializeAsync(stream, Version, Format, null); await stream.FlushAsync(); stream.Position = 0; @@ -236,7 +237,7 @@ private async void saveBtn_Click(object sender, EventArgs e) #pragma warning restore VSTHRD100 { SaveFileDialog saveFileDialog = new SaveFileDialog(); - if (Format == OpenApiFormat.Json) + if (Format == Json) { saveFileDialog.Filter = "JSON files (*.json)|*.json|All files (*.*)|*.*"; } @@ -251,7 +252,7 @@ private async void saveBtn_Click(object sender, EventArgs e) { string output = saveFileDialog.FileName; using FileStream fs = File.Create(output); - await _document.SerializeAsync(fs, Version, Format); + await _document.SerializeAsync(fs, Version, Format, null); await fs.FlushAsync(); MessageBox.Show("Saved successfully!"); diff --git a/src/OoasGui/OoasGui.csproj b/src/OoasGui/OoasGui.csproj index 7a89a874f..995476ef6 100644 --- a/src/OoasGui/OoasGui.csproj +++ b/src/OoasGui/OoasGui.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/OoasUtil/OpenApiGenerator.cs b/src/OoasUtil/OpenApiGenerator.cs index 5448965a1..b30695c2d 100644 --- a/src/OoasUtil/OpenApiGenerator.cs +++ b/src/OoasUtil/OpenApiGenerator.cs @@ -8,8 +8,6 @@ using System.IO; using Microsoft.OData.Edm; using Microsoft.OpenApi; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData; using System.Threading.Tasks; using System.Threading; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs index 860780d67..b45d136a2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.OpenApi.Models; using Xunit; using Microsoft.OpenApi.OData.Common; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/RecordExpressionExtensionsTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/RecordExpressionExtensionsTests.cs index 0d0960092..2b8eca32c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/RecordExpressionExtensionsTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/RecordExpressionExtensionsTests.cs @@ -125,7 +125,7 @@ public void GetRecordWorks() new EdmPropertyConstructor("RestrictedProperties", new EdmStringConstant("*"))))); // Act - ScopeType actual = record.GetRecord("prop"); + Vocabulary.Capabilities.ScopeType actual = record.GetRecord("prop"); // Assert Assert.NotNull(actual); @@ -164,7 +164,7 @@ public void GetCollectionForRecordWorks() new EdmPropertyConstructor("RestrictedProperties", new EdmStringConstant("restrictedProperties2")))))); // Act - IList actual = record.GetCollection("prop"); + IList actual = record.GetCollection("prop"); // Assert Assert.NotNull(actual); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index 2d01e1dc4..3c1326e97 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -8,8 +8,6 @@ using System.Text.Json.Nodes; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Writers; using Xunit; using Xunit.Abstractions; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs index 5e52da5bc..09f2bbd65 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs @@ -5,7 +5,6 @@ using System; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Moq; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 562cc2c1a..52bc0a8e4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -8,9 +8,6 @@ using System.Text.Json.Nodes; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs index 0ab48b130..fd59f29a4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs index 3d630d7c8..2296f4ad8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 3301782b5..ba60bbd8a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -11,8 +11,6 @@ using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Moq; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs index 187c36bd5..22bb9c506 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs @@ -9,7 +9,6 @@ using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OData.Edm.Vocabularies.Community.V1; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs index f658bfdac..a8734d48d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs @@ -5,7 +5,6 @@ using System; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Moq; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index c778f904d..3e2555aa7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -8,9 +8,6 @@ using System.Text.Json.Nodes; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 0a780099c..b2269d471 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -6,15 +6,12 @@ using System; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.OData.Tests; -using Microsoft.OpenApi.Models; using Xunit; using Microsoft.OpenApi.OData.Edm; using System.Text.Json.Nodes; using System.Threading.Tasks; using Moq; -using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator.Tests { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 09de27362..b9698650a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -8,9 +8,6 @@ using System.Text.Json.Nodes; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -394,7 +391,6 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns ""$ref"": ""#/components/schemas/microsoft.graph.userInsightsSettings"" }, { - ""type"": ""object"", ""nullable"": true } ], @@ -407,7 +403,6 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns ""$ref"": ""#/components/schemas/microsoft.graph.contactMergeSuggestions"" }, { - ""type"": ""object"", ""nullable"": true } ], @@ -420,7 +415,6 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns ""$ref"": ""#/components/schemas/microsoft.graph.regionalAndLanguageSettings"" }, { - ""type"": ""object"", ""nullable"": true } ], @@ -433,7 +427,6 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns ""$ref"": ""#/components/schemas/microsoft.graph.shiftPreferences"" }, { - ""type"": ""object"", ""nullable"": true } ], @@ -929,7 +922,6 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp "$ref": "#/components/schemas/DefaultNs.Color" }, { - "type": "object", "nullable": true } ], diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs index 6686ea29a..80d0567d1 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs @@ -9,8 +9,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs index 7699e3d27..7b534cc89 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs index e4d8d916a..53b00bc93 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs @@ -5,7 +5,6 @@ using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs index 8d2f39871..bf88d593d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs @@ -8,7 +8,6 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; -using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation.Tests { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs index 985c89221..0642f5637 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs @@ -3,14 +3,12 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ +using System.Collections.Generic; using System.Linq; -using System.Reflection.Metadata; using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -29,7 +27,7 @@ public EdmActionImportOperationHandlerTests() openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - openApiDocument.Tags ??= []; + openApiDocument.Tags ??= new HashSet(); openApiDocument.Tags.Add(new OpenApiTag { Name = "ResetDataSource" }); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index 5459c1bd1..88b6f29b4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -3,18 +3,15 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Linq; -using System.Reflection.Metadata; -using System.Threading.Tasks; -using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Xml.Linq; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -29,7 +26,7 @@ public EdmActionOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "me.user.Actions" }); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index e271fc104..b42c08b97 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -3,16 +3,15 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Linq; -using System.Threading.Tasks; -using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Xml.Linq; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -27,7 +26,7 @@ public EdmFunctionImportOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "GetNearestAirport" }); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index 16cfdff54..e87328531 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -9,8 +9,6 @@ using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -28,7 +26,7 @@ public EdmFunctionOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "me.user.Functions" }); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index c6e88b7c9..a7def38f5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -3,14 +3,13 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Linq; -using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -25,7 +24,7 @@ public EntityDeleteOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); @@ -173,7 +172,7 @@ public async Task CreateEntityDeleteReturnsSecurityForDeleteRestrictions(bool en } ],".ChangeLineBreaks(), json); - Assert.Contains(delete.Parameters, p => p.Name == "odata-debug" && p.In == Models.ParameterLocation.Query); + Assert.Contains(delete.Parameters, p => p.Name == "odata-debug" && p.In == ParameterLocation.Query); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index 2d412ee13..d0484f8a9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -4,11 +4,10 @@ // ------------------------------------------------------------ using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -26,7 +25,7 @@ public EntityGetOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); @@ -225,7 +224,7 @@ public async Task CreateEntityGetOperationReturnsSecurityForReadRestrictions(boo } ],".ChangeLineBreaks(), json); - Assert.Contains(get.Parameters, p => p.Name == "odata-debug" && p.In == Models.ParameterLocation.Header); + Assert.Contains(get.Parameters, p => p.Name == "odata-debug" && p.In == ParameterLocation.Header); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index 7095defe8..2028e2a51 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -3,11 +3,10 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -25,7 +24,7 @@ public EntityPatchOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); @@ -187,7 +186,7 @@ public async Task CreateEntityPatchReturnsSecurityForUpdateRestrictions(bool ena } ],".ChangeLineBreaks(), json); - Assert.Contains(patch.Parameters, p => p.Name == "odata-debug" && p.In == Models.ParameterLocation.Header); + Assert.Contains(patch.Parameters, p => p.Name == "odata-debug" && p.In == ParameterLocation.Header); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index f78aa19b0..318a44da0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -3,11 +3,10 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -25,7 +24,7 @@ public EntityPutOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); @@ -187,7 +186,7 @@ public async Task CreateEntityPutReturnsSecurityForUpdateRestrictions(bool enabl } ],".ChangeLineBreaks(), json); - Assert.Contains(putOperation.Parameters, p => p.Name == "odata-debug" && p.In == Models.ParameterLocation.Header); + Assert.Contains(putOperation.Parameters, p => p.Name == "odata-debug" && p.In == ParameterLocation.Header); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index ecef75469..a9d567c41 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -3,19 +3,17 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System; -using System.Linq; -using System.Threading.Tasks; -using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Xml.Linq; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -30,7 +28,7 @@ public EntitySetGetOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index e13fdb0a3..22e258ae0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -5,13 +5,12 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; using Microsoft.OpenApi.OData.Vocabulary.Core; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; @@ -29,7 +28,7 @@ public EntitySetPostOperationHandlerTests() _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { Type = SecuritySchemeType.OAuth2, }); - _openApiDocument.Tags ??= []; + _openApiDocument.Tags ??= new HashSet(); _openApiDocument.Tags.Add(new OpenApiTag { Name = "Customers.Customer" }); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs index 78a879287..dad497bab 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs @@ -5,7 +5,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index 9eff3a36c..5719a489d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -5,7 +5,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index f8ca1e30f..fdaa14b22 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -4,12 +4,9 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; -using Microsoft.OpenApi.OData.Vocabulary.Core; using System.Linq; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs index e2bde0a1d..8ad526334 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index fc01b99cd..318287fd8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -7,8 +7,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.PathItem.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index 10ef8d2fa..16e788c6c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -4,8 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.PathItem.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index 8a3b7d7fb..7031f26f0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -4,8 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.PathItem.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index 16a85d4a6..942a6ac77 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -4,8 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.PathItem.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index b552e310a..afcc8460e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -5,7 +5,6 @@ using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs index c282de6db..1f16de389 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs @@ -5,7 +5,6 @@ using System; using System.Net.Http; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs index 2c35873cc..f88f12298 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs @@ -5,7 +5,6 @@ using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs index 9fc114f3f..724b73c94 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs @@ -5,7 +5,6 @@ using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs index d6c617d9f..e813bb1fc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs @@ -4,8 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -65,7 +63,7 @@ public void CreateNavigationRefPostOperationReturnsCorrectOperation(bool enableO Assert.NotNull(operation.RequestBody); var requestBodyReference = Assert.IsType(operation.RequestBody); - Assert.Equal(Models.ReferenceType.RequestBody, requestBodyReference.Reference.Type); + Assert.Equal(ReferenceType.RequestBody, requestBodyReference.Reference.Type); Assert.Equal(Common.Constants.ReferencePostRequestBodyName, requestBodyReference.Reference.Id); Assert.Equal(2, operation.Responses.Count); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs index e565ca0b0..438e1a53a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs @@ -4,8 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; @@ -64,7 +62,7 @@ public void CreateNavigationRefPutOperationReturnsCorrectOperation(bool enableOp Assert.Single(operation.Parameters); var requestBodyReference = Assert.IsType(operation.RequestBody); - Assert.Equal(Models.ReferenceType.RequestBody, requestBodyReference.Reference.Type); + Assert.Equal(ReferenceType.RequestBody, requestBodyReference.Reference.Type); Assert.Equal(Common.Constants.ReferencePutRequestBodyName, requestBodyReference.Reference.Id); Assert.Equal(2, operation.Responses.Count); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index 53c314f0b..3db99ca37 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -11,8 +11,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index 6869a5d2f..b169c631f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -6,8 +6,6 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Reader.Vocabulary.Capabilities.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs index 6a61e26ca..0a413cd11 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs @@ -6,9 +6,6 @@ using System; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs index 10fc0f951..7d6c6c613 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs index 0590f9008..0e63ab37e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs @@ -11,8 +11,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs index 75667e4fa..e22a0642f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs @@ -5,7 +5,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using System; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs index 032a30785..32c456d79 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs @@ -11,8 +11,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs index 6cddfaafb..2c6423314 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs @@ -8,8 +8,6 @@ using Microsoft.OpenApi.OData.Edm; using System.Linq; using Xunit; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Extensions; namespace Microsoft.OpenApi.OData.PathItem.Tests { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs index 946bc834d..30d3b641d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs @@ -9,9 +9,6 @@ using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs index d04a97169..cb7c8ae21 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs @@ -7,9 +7,6 @@ using System.Linq; using System.Net.Http; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs index 1754701aa..31dd6fa6f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs index 24b7dc430..f82d8e5a5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs @@ -11,8 +11,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Validation; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Tests; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml index 81966d75c..39aac1212 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml @@ -680,11 +680,11 @@ definitions: type: object ReferenceNumeric: type: string - x-nullable: true enum: - '-INF' - INF - NaN + x-nullable: true DefaultNs.Color: type: string description: Enum type 'Color' description. diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.yaml index 9692922eb..6b6a987a8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.yaml @@ -71,11 +71,11 @@ definitions: type: object ReferenceNumeric: type: string - x-nullable: true enum: - '-INF' - INF - NaN + x-nullable: true parameters: top: in: query diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml index e3782d6f4..e8d9a89cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml @@ -3173,11 +3173,11 @@ definitions: type: object ReferenceNumeric: type: string - x-nullable: true enum: - '-INF' - INF - NaN + x-nullable: true Siterra.Documents.App.DTO.DocumentDto: type: object title: DocumentDto @@ -3209,15 +3209,15 @@ definitions: minimum: -2147483648 ModificationDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true ModifiedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Tags: type: array items: @@ -3261,10 +3261,10 @@ definitions: x-nullable: true LibraryTemplateId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ParentTypeId: type: number format: int32 @@ -3300,15 +3300,15 @@ definitions: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' ModifiedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ModificationDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true Documents: type: array items: @@ -3348,10 +3348,10 @@ definitions: minimum: -2147483648 DocumentId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true DocumentName: type: string x-nullable: true @@ -3371,41 +3371,41 @@ definitions: type: boolean ReviewedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ReviewedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true IsApproved: type: boolean ApprovedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ApprovedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true IsRejected: type: boolean RejectedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true RejectedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true DomainId: type: number format: int32 @@ -3530,10 +3530,10 @@ definitions: minimum: -2147483648 LibraryId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true OwnerUserId: type: number format: int32 @@ -3545,32 +3545,32 @@ definitions: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' LastRevisionId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true CheckoutDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true CheckoutPath: type: string x-nullable: true CheckoutUserId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Number: type: string x-nullable: true OriginalDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true FileSized: type: number format: decimal @@ -3579,10 +3579,10 @@ definitions: x-nullable: true LastRevisionFileId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsDeleted: type: number format: int32 @@ -3590,16 +3590,16 @@ definitions: minimum: -2147483648 IsNa: type: number - x-nullable: true format: decimal + x-nullable: true IsRejected: type: number - x-nullable: true format: decimal + x-nullable: true IsReviewed: type: number - x-nullable: true format: decimal + x-nullable: true NaDescription: type: string x-nullable: true @@ -3617,58 +3617,58 @@ definitions: x-nullable: true SourceDocumentId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ScraperMapId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true LastDownloadedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true SmsId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsApprovedOld: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Suffix: type: string x-nullable: true ScrapeResultId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsApproved: type: number - x-nullable: true format: decimal + x-nullable: true CategoryId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true SectionId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true VersionCount: type: number format: int32 @@ -3884,10 +3884,10 @@ definitions: x-nullable: true ParentFolderId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Number: type: string x-nullable: true @@ -3934,28 +3934,28 @@ definitions: minimum: -2147483648 ProjectId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true SearchRingId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true SiteId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true AssetId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true AllowMultiple: type: boolean AutoCreate: @@ -3967,28 +3967,28 @@ definitions: type: boolean ProgramId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true SourceFolderId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true TemplateClassId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true TemplateSubType: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsHidden: type: boolean IsDeleted: @@ -3998,46 +3998,46 @@ definitions: minimum: -2147483648 StatusId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true SmsId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ContractId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true VendorId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true OrganizationUnitId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IncidentId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true EventId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ClassInstance: type: number format: int32 @@ -4151,10 +4151,10 @@ definitions: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' DomainId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Description: type: string x-nullable: true @@ -4163,16 +4163,16 @@ definitions: x-nullable: true MasterId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Number: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ClassId: type: number format: int32 @@ -4180,10 +4180,10 @@ definitions: minimum: -2147483648 ParentId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true HasChanged: type: boolean MasterLibraryType: @@ -4269,16 +4269,16 @@ definitions: minimum: -2147483648 SourceClassId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ContentTypeId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ClientPath: type: string x-nullable: true @@ -4289,18 +4289,18 @@ definitions: minimum: -32768 SmsId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true Latitude: type: number - x-nullable: true format: decimal + x-nullable: true Longitude: type: number - x-nullable: true format: decimal + x-nullable: true Documents: type: array items: @@ -4454,10 +4454,10 @@ definitions: minimum: -2147483648 DocumentId: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ModificationDate: type: string format: date-time @@ -4531,10 +4531,10 @@ definitions: x-nullable: true ReviewedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsRejected: type: boolean RejectedReason: @@ -4545,33 +4545,33 @@ definitions: x-nullable: true RejectedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true IsApproved: type: boolean ApprovedBy: type: number - x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 + x-nullable: true ReviewedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true RejectedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true ApprovedDate: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true Document: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' example: 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 7b0a4a467..b99bebf50 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 @@ -4610,6 +4610,117 @@ }, "components": { "schemas": { + "Default.ODataErrors.ODataError": { + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/Default.ODataErrors.MainError" + } + } + }, + "Default.ODataErrors.MainError": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": "string", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Default.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/components/schemas/Default.ODataErrors.InnerError" + } + } + }, + "Default.ODataErrors.ErrorDetails": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": "string", + "nullable": true + } + } + }, + "Default.ODataErrors.InnerError": { + "type": "object", + "description": "The structure of this object is service-specific" + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "StringCollectionResponse": { + "title": "Collection of string", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": "string", + "nullable": true + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": "string", + "nullable": true + }, "Siterra.Documents.App.DTO.DocumentDto": { "title": "DocumentDto", "type": "object", @@ -4911,7 +5022,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": "object", "nullable": true } ], @@ -5260,7 +5370,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": "object", "nullable": true } ], @@ -5272,7 +5381,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" }, { - "type": "object", "nullable": true } ], @@ -5284,7 +5392,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": "object", "nullable": true } ], @@ -5434,7 +5541,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": "object", "nullable": true } ], @@ -5505,7 +5611,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": "object", "nullable": true } ], @@ -5517,7 +5622,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" }, { - "type": "object", "nullable": true } ], @@ -5766,7 +5870,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": "object", "nullable": true } ], @@ -5778,7 +5881,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": "object", "nullable": true } ], @@ -5790,7 +5892,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": "object", "nullable": true } ], @@ -5969,7 +6070,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": "object", "nullable": true } ], @@ -5981,7 +6081,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": "object", "nullable": true } ], @@ -6497,7 +6596,6 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": "object", "nullable": true } ], @@ -6542,73 +6640,6 @@ } } }, - "Default.ODataErrors.ODataError": { - "required": [ - "error" - ], - "type": "object", - "properties": { - "error": { - "$ref": "#/components/schemas/Default.ODataErrors.MainError" - } - } - }, - "Default.ODataErrors.MainError": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string", - "x-ms-primary-error-message": true - }, - "target": { - "type": "string", - "nullable": true - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Default.ODataErrors.ErrorDetails" - } - }, - "innerError": { - "$ref": "#/components/schemas/Default.ODataErrors.InnerError" - } - } - }, - "Default.ODataErrors.ErrorDetails": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string", - "nullable": true - } - } - }, - "Default.ODataErrors.InnerError": { - "type": "object", - "description": "The structure of this object is service-specific" - }, - "ODataCountResponse": { - "type": "number", - "format": "int64" - }, "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { "title": "Collection of DocumentDto", "type": "object", @@ -6740,50 +6771,6 @@ } } } - }, - "StringCollectionResponse": { - "title": "Collection of string", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ReferenceUpdate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - }, - "@odata.type": { - "type": "string", - "nullable": true - } - } - }, - "ReferenceCreate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - } - }, - "additionalProperties": { - "type": "object" - } - }, - "ReferenceNumeric": { - "enum": [ - "-INF", - "INF", - "NaN" - ], - "type": "string", - "nullable": true } }, "responses": { @@ -6993,83 +6980,83 @@ "examples": { "Siterra.Documents.App.DTO.DocumentDto": { "value": { + "Id": 0, + "Name": "string", "Description": "string", - "DomainId": 0, "Filename": "string", - "Id": 0, + "NumberOfRevisions": "string", + "Suffix": "string", + "DomainId": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "string", - "NumberOfRevisions": "string", - "Revisions": [ + "Tags": [ { - "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" + "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" } ], - "Suffix": "string", - "Tags": [ + "Revisions": [ { - "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" + "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" } ] } }, "Siterra.Documents.App.DTO.LibraryDto": { "value": { - "AllowMultiple": true, - "AutoCreate": true, - "CreatedBy": 0, - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "Id": 0, + "Name": "string", + "Number": "string", "Description": "string", + "LibraryTemplateId": 0, + "ParentTypeId": 0, + "ParentId": 0, + "AllowMultiple": true, + "AutoCreate": true, + "TypeId": 0, + "DomainId": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentDto" } - ], - "DomainId": 0, - "Id": 0, - "LibraryTemplateId": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string", - "Number": "string", - "ParentId": 0, - "ParentTypeId": 0, - "TypeId": 0 + ] } }, "Siterra.Documents.App.DTO.RevisionDto": { "value": { - "ApprovedBy": 0, - "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", - "CreatedBy": 0, - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Document": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" - }, - "DocumentDescription": "string", + "Id": 0, + "Number": 0, "DocumentId": 0, "DocumentName": "string", - "DomainId": 0, - "Id": 0, + "DocumentDescription": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreatedBy": 0, + "IsReviewed": true, + "ReviewedBy": 0, + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", "IsApproved": true, + "ApprovedBy": 0, + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", "IsRejected": true, - "IsReviewed": true, - "Number": 0, "RejectedBy": 0, "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", - "ReviewedBy": 0, - "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00" + "DomainId": 0, + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } } }, "Siterra.Documents.App.DTO.CategoryDto": { "value": { - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", - "DomainId": 0, "Id": 0, + "Name": "string", + "Description": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "Name": "string" + "DomainId": 0 } }, "Siterra.Documents.App.DTO.DocumentTagRelDto": { @@ -7079,60 +7066,66 @@ }, "Siterra.Documents.BusinessLogic.Entities.Document.Document": { "value": { - "CategoryId": 0, + "Id": 0, + "Name": "string", + "Description": "string", + "StatusId": 0, + "TypeId": 0, + "Keywords": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreatedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "DomainId": 0, + "LibraryId": 0, + "OwnerUserId": 0, + "StatusDate": "0001-01-01T00:00:00.0000000+00:00", + "LastRevisionId": 0, "CheckoutDate": "0001-01-01T00:00:00.0000000+00:00", "CheckoutPath": "string", "CheckoutUserId": 0, - "CreatedBy": 0, - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", - "DocumentClasses": [ - { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" - } - ], - "DomainId": 0, - "FileClientPath": "string", + "Number": "string", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", "FileSized": 0, - "Id": 0, - "IsApproved": 0, - "IsApprovedOld": 0, + "FileClientPath": "string", + "LastRevisionFileId": 0, "IsDeleted": 0, "IsNa": 0, "IsRejected": 0, "IsReviewed": 0, - "Keywords": "string", - "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", - "LastFileName": "string", - "LastRevisionFile": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" - }, - "LastRevisionFileId": 0, - "LastRevisionId": 0, - "Library": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" - }, - "LibraryId": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, "NaDescription": "string", - "Name": "string", "NaReason": "string", - "Number": "string", - "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", - "OwnerUserId": 0, "RejectedDescription": "string", "RejectedReason": "string", "ReviewDescription": "string", - "Revisions": [ + "SourceDocumentId": 0, + "ScraperMapId": 0, + "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", + "SmsId": 0, + "IsApprovedOld": 0, + "Suffix": "string", + "ScrapeResultId": 0, + "IsApproved": 0, + "CategoryId": 0, + "SectionId": 0, + "VersionCount": 0, + "LastFileName": "string", + "DocumentClasses": [ { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" } ], - "ScrapeResultId": 0, - "ScraperMapId": 0, - "SectionId": 0, - "SmsId": 0, + "Tags": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + ], + "Library": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "LastRevisionFile": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" + }, "SourceDocument": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" }, @@ -7141,276 +7134,270 @@ "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } ], - "SourceDocumentId": 0, - "StatusDate": "0001-01-01T00:00:00.0000000+00:00", - "StatusId": 0, - "Suffix": "string", - "Tags": [ + "Revisions": [ { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" } - ], - "TypeId": 0, - "VersionCount": 0 + ] } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass": { "value": { - "ClassId": 0, "ClassInstance": 0, + "ClassId": 0, + "DocumentId": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "IsPrimary": true, "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" - }, - "DocumentId": 0, - "IsPrimary": true, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0 + } } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel": { "value": { + "DocumentId": 0, + "TagId": 0, + "DomainId": 0, "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" }, - "DocumentId": 0, - "DomainId": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, "Tag": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Tags.Tag" - }, - "TagId": 0 + } } }, "Siterra.Documents.BusinessLogic.Entities.Library.Library": { "value": { - "AllowMultiple": true, + "Id": 0, + "DomainId": 0, + "Name": "string", + "ParentFolderId": 0, + "Number": "string", + "TypeId": 0, + "OwnerUserId": 0, + "TotalSize": 0, + "FilesCounter": 0, + "FoldersCounter": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, + "ProjectId": 0, + "SearchRingId": 0, + "SiteId": 0, "AssetId": 0, + "AllowMultiple": true, "AutoCreate": true, - "ClassId": 0, - "ClassInstance": 0, - "ContractId": 0, - "CreatedBy": 0, - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "Description": "string", + "IsTemplate": true, + "ProgramId": 0, + "SourceFolderId": 0, + "TemplateClassId": 0, + "TemplateSubType": 0, + "IsHidden": true, + "IsDeleted": 0, + "StatusId": 0, + "SmsId": 0, + "ContractId": 0, + "VendorId": 0, + "OrganizationUnitId": 0, + "IncidentId": 0, + "EventId": 0, + "ClassInstance": 0, + "ClassId": 0, + "LibraryParent": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "Type": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "SourceFolder": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } ], - "DomainId": 0, - "EventId": 0, - "FilesCounter": 0, - "FoldersCounter": 0, - "Id": 0, - "IncidentId": 0, - "IsDeleted": 0, - "IsHidden": true, - "IsTemplate": true, "LibraryChildren": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" } ], - "LibraryParent": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" - }, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string", - "Number": "string", - "OrganizationUnitId": 0, - "OwnerUserId": 0, - "ParentFolderId": 0, - "ProgramId": 0, - "ProjectId": 0, - "SearchRingId": 0, - "SiteId": 0, - "SmsId": 0, - "SourceFolder": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" - }, - "SourceFolderId": 0, "SourceLibraryChildren": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" } - ], - "StatusId": 0, - "TemplateClassId": 0, - "TemplateSubType": 0, - "TotalSize": 0, - "Type": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" - }, - "TypeId": 0, - "VendorId": 0 + ] } }, "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType": { "value": { - "ChildrenLibraryTypes": [ - { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" - } - ], - "ClassId": 0, + "Id": 0, + "Name": "string", + "ModifiedBy": 0, "CreatedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", "DomainId": 0, - "HasChanged": true, - "Id": 0, + "Description": "string", + "XmlName": "string", "MasterId": 0, + "Number": 0, + "ClassId": 0, + "ParentId": 0, + "HasChanged": true, "MasterLibraryType": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, + "ParentLibraryTypes": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, "MasterLibraryTypeChildren": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" } ], - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string", - "Number": 0, - "ParentId": 0, - "ParentLibraryTypes": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" - }, - "XmlName": "string" + "ChildrenLibraryTypes": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + ] } }, "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile": { "value": { - "ActualName": "string", - "ClientPath": "string", - "ContentTypeId": 0, + "Id": 0, + "Name": "string", + "Path": "string", + "ModifiedBy": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Documents": [ - { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" - } - ], + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Sized": 0, + "ActualName": "string", "DomainId": 0, - "Id": 0, + "SourceClassId": 0, + "ContentTypeId": 0, + "ClientPath": "string", "IsSelfHosted": 0, + "SmsId": 0, "Latitude": 0, "Longitude": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string", - "Path": "string", - "Sized": 0, - "SmsId": 0, - "SourceClassId": 0 + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] } }, "Siterra.Documents.BusinessLogic.Entities.Tags.Tag": { "value": { - "CreatedBy": 0, - "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", - "DomainId": 0, "Id": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, "ModifiedBy": 0, - "Name": "string" + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00" } }, "Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag": { "value": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" } - ], - "DomainId": 0, - "Id": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string" + ] } }, "Siterra.Documents.BusinessLogic.Entities.Tags.Section": { "value": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } - ], - "DomainId": 0, - "Id": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string" + ] } }, "Siterra.Documents.BusinessLogic.Entities.Tags.Category": { "value": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "string", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } - ], - "DomainId": 0, - "Id": 0, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Name": "string" + ] } }, "Siterra.Documents.BusinessLogic.Entities.Revision.Revision": { "value": { - "ApprovedBy": 0, - "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", - "CreatedBy": 0, + "Id": 0, + "Number": 0, + "DocumentId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Document": { - "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" - }, + "ModifiedBy": 0, + "CreatedBy": 0, + "Remarks": "string", + "FileId": 0, + "DocumentOwnerContact": 0, "DocumentDescription": "string", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", "DocumentFolder": "string", - "DocumentId": 0, "DocumentKeywords": "string", - "DocumentName": "string", - "DocumentNumber": "string", - "DocumentOwnerContact": 0, "DocumentStatus": "string", - "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", "DocumentType": "string", + "DocumentName": "string", + "DocumentNumber": "string", "DomainId": 0, - "FileId": 0, - "Id": 0, - "IsApproved": true, "IsDeleted": 0, - "IsRejected": true, "IsReviewed": true, - "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": 0, - "Number": 0, - "RejectedBy": 0, - "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", - "RejectedDescription": "string", - "RejectedReason": "string", - "Remarks": "string", "ReviewDescription": "string", "ReviewedBy": 0, - "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00" + "IsRejected": true, + "RejectedReason": "string", + "RejectedDescription": "string", + "RejectedBy": 0, + "IsApproved": true, + "ApprovedBy": 0, + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } } } }, 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 122dee965..15f72b151 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 @@ -3330,14 +3330,14 @@ components: ModificationDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true ModifiedBy: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Tags: type: array items: @@ -3383,8 +3383,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ParentTypeId: maximum: 2147483647 minimum: -2147483648 @@ -3422,13 +3422,13 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ModificationDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true Documents: type: array items: @@ -3470,8 +3470,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true DocumentName: type: string nullable: true @@ -3493,39 +3493,39 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ReviewedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ApprovedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true IsRejected: type: boolean RejectedBy: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true RejectedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true DomainId: maximum: 2147483647 minimum: -2147483648 @@ -3535,7 +3535,6 @@ components: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - nullable: true - type: object x-ms-navigationProperty: true example: Id: 0 @@ -3656,8 +3655,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true OwnerUserId: maximum: 2147483647 minimum: -2147483648 @@ -3671,13 +3670,13 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true CheckoutDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true CheckoutPath: type: string nullable: true @@ -3685,16 +3684,16 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Number: type: string nullable: true OriginalDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true FileSized: type: number format: decimal @@ -3705,8 +3704,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsDeleted: maximum: 2147483647 minimum: -2147483648 @@ -3714,16 +3713,16 @@ components: format: int32 IsNa: type: number - nullable: true format: decimal + nullable: true IsRejected: type: number - nullable: true format: decimal + nullable: true IsReviewed: type: number - nullable: true format: decimal + nullable: true NaDescription: type: string nullable: true @@ -3743,31 +3742,31 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ScraperMapId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true LastDownloadedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true SmsId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsApprovedOld: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Suffix: type: string nullable: true @@ -3775,24 +3774,24 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsApproved: type: number - nullable: true format: decimal + nullable: true CategoryId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true SectionId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true VersionCount: maximum: 2147483647 minimum: -2147483648 @@ -3813,19 +3812,16 @@ components: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - nullable: true - type: object x-ms-navigationProperty: true LastRevisionFile: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' - nullable: true - type: object x-ms-navigationProperty: true SourceDocument: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - nullable: true - type: object x-ms-navigationProperty: true SourceDocumentChildren: type: array @@ -3939,7 +3935,6 @@ components: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - nullable: true - type: object x-ms-navigationProperty: true example: ClassInstance: 0 @@ -3993,13 +3988,11 @@ components: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - nullable: true - type: object x-ms-navigationProperty: true Tag: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - nullable: true - type: object x-ms-navigationProperty: true example: DocumentId: 0 @@ -4034,8 +4027,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Number: type: string nullable: true @@ -4084,26 +4077,26 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true SearchRingId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true SiteId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true AssetId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true AllowMultiple: type: boolean AutoCreate: @@ -4117,26 +4110,26 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true SourceFolderId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true TemplateClassId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true TemplateSubType: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsHidden: type: boolean IsDeleted: @@ -4148,44 +4141,44 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true SmsId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ContractId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true VendorId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true OrganizationUnitId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IncidentId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true EventId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ClassInstance: maximum: 2147483647 minimum: -2147483648 @@ -4200,19 +4193,16 @@ components: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - nullable: true - type: object x-ms-navigationProperty: true Type: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - nullable: true - type: object x-ms-navigationProperty: true SourceFolder: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - nullable: true - type: object x-ms-navigationProperty: true Documents: type: array @@ -4313,8 +4303,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Description: type: string nullable: true @@ -4325,14 +4315,14 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Number: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ClassId: maximum: 2147483647 minimum: -2147483648 @@ -4342,21 +4332,19 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true HasChanged: type: boolean MasterLibraryType: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - nullable: true - type: object x-ms-navigationProperty: true ParentLibraryTypes: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - nullable: true - type: object x-ms-navigationProperty: true MasterLibraryTypeChildren: type: array @@ -4439,14 +4427,14 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ContentTypeId: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ClientPath: type: string nullable: true @@ -4459,16 +4447,16 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true Latitude: type: number - nullable: true format: decimal + nullable: true Longitude: type: number - nullable: true format: decimal + nullable: true Documents: type: array items: @@ -4624,8 +4612,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ModificationDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string @@ -4701,8 +4689,8 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsRejected: type: boolean RejectedReason: @@ -4715,36 +4703,35 @@ components: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 type: number - nullable: true format: int32 + nullable: true ReviewedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true RejectedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true ApprovedDate: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - nullable: true - type: object x-ms-navigationProperty: true example: Id: 0 diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml index 50e9d8485..a66392901 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml @@ -21751,9 +21751,9 @@ definitions: properties: Date: type: string - x-nullable: true format: date-time pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' + x-nullable: true RequestId: type: string x-nullable: true @@ -21785,11 +21785,11 @@ definitions: type: object ReferenceNumeric: type: string - x-nullable: true enum: - '-INF' - INF - NaN + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: type: object title: Person @@ -21810,8 +21810,8 @@ definitions: format: int64 allOf: - type: number - x-nullable: true format: int64 + x-nullable: true Emails: type: array items: @@ -21831,8 +21831,8 @@ definitions: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Photo: type: string - x-nullable: true format: base64url + x-nullable: true Friends: type: array description: Friends of person @@ -21931,8 +21931,8 @@ definitions: format: float allOf: - type: number - x-nullable: true format: float + x-nullable: true Description: type: string x-nullable: true @@ -22027,8 +22027,8 @@ definitions: format: int64 allOf: - type: number - x-nullable: true format: int64 + x-nullable: true Peers: type: array items: @@ -22044,8 +22044,8 @@ definitions: format: int64 allOf: - type: number - x-nullable: true format: int64 + x-nullable: true BossOffice: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' DirectReports: 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 d99c4fe6d..9f930ed60 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -1378,8 +1378,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "double" + "format": "double", + "nullable": true }, { "type": "string", @@ -1399,8 +1399,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "double" + "format": "double", + "nullable": true }, { "type": "string", @@ -1424,8 +1424,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -1459,8 +1458,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -7560,7 +7558,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -11728,8 +11726,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -11895,7 +11892,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -12935,7 +12932,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -17015,8 +17012,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -17376,7 +17372,7 @@ "$ref": "#/components/responses/error" } }, - "security": [ ], + "security": [], "x-ms-docs-operation-type": "operation" } }, @@ -25762,7 +25758,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -30800,8 +30796,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -30989,7 +30984,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -32232,7 +32227,7 @@ } }, "deprecated": true, - "security": [ ], + "security": [], "x-ms-deprecation": { "removalDate": "2023-03-15T00:00:00.0000000+00:00", "date": "2021-08-24T00:00:00.0000000+00:00", @@ -33710,8 +33705,8 @@ "Date": { "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$", "type": "string", - "nullable": true, - "format": "date-time" + "format": "date-time", + "nullable": true }, "RequestId": { "type": "string", @@ -33792,8 +33787,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "int64" + "format": "int64", + "nullable": true }, { "type": "string", @@ -33820,8 +33815,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, { - "nullable": true, - "type": "object" + "nullable": true } ] }, @@ -33836,8 +33830,8 @@ }, "Photo": { "type": "string", - "nullable": true, - "format": "base64url" + "format": "base64url", + "nullable": true }, "Friends": { "type": "array", @@ -33853,8 +33847,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ], "description": "The best friend.", @@ -33904,8 +33897,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -33925,8 +33917,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -33968,8 +33959,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "nullable": true, - "type": "object" + "nullable": true } ], "description": "The person to contact in case of a crisis at this location.", @@ -34019,8 +34009,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "float" + "format": "float", + "nullable": true }, { "type": "string", @@ -34042,10 +34032,10 @@ "nullable": true } }, - "TripData": { }, + "TripData": {}, "DestinationInfo": { "type": "array", - "items": { } + "items": {} }, "StartsAt": { "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$", @@ -34112,8 +34102,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" }, { - "nullable": true, - "type": "object" + "nullable": true } ] }, @@ -34161,8 +34150,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" }, { - "nullable": true, - "type": "object" + "nullable": true } ], "x-ms-navigationProperty": true @@ -34173,8 +34161,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "nullable": true, - "type": "object" + "nullable": true } ], "x-ms-navigationProperty": true @@ -34185,8 +34172,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "nullable": true, - "type": "object" + "nullable": true } ], "x-ms-navigationProperty": true @@ -34208,8 +34194,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "int64" + "format": "int64", + "nullable": true }, { "type": "string", @@ -34241,8 +34227,8 @@ "oneOf": [ { "type": "number", - "nullable": true, - "format": "int64" + "format": "int64", + "nullable": true }, { "type": "string", @@ -34256,8 +34242,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, { - "nullable": true, - "type": "object" + "nullable": true } ] }, @@ -34600,8 +34585,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" }, { - "nullable": true, - "type": "object" + "nullable": true } ] } @@ -34823,9 +34807,9 @@ "Tags": [ "string" ], - "TripData": { }, + "TripData": {}, "DestinationInfo": [ - { } + {} ], "StartsAt": "0001-01-01T00:00:00.0000000+00:00", "EndsAt": "0001-01-01T00:00:00.0000000+00:00", 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 ba04824c7..a37ce4a48 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -894,8 +894,8 @@ paths: schema: oneOf: - type: number - nullable: true format: double + nullable: true - type: string nullable: true - $ref: '#/components/schemas/ReferenceNumeric' @@ -905,8 +905,8 @@ paths: schema: oneOf: - type: number - nullable: true format: double + nullable: true - type: string nullable: true - $ref: '#/components/schemas/ReferenceNumeric' @@ -919,7 +919,6 @@ paths: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - nullable: true - type: object default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -940,7 +939,6 @@ paths: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -7820,7 +7818,6 @@ paths: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object required: true responses: '204': @@ -11340,7 +11337,6 @@ paths: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object required: true responses: '204': @@ -20612,7 +20608,6 @@ paths: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object required: true responses: '204': @@ -22574,8 +22569,8 @@ components: Date: pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$' type: string - nullable: true format: date-time + nullable: true RequestId: type: string nullable: true @@ -22631,8 +22626,8 @@ components: Age: oneOf: - type: number - nullable: true format: int64 + nullable: true - type: string nullable: true Emails: @@ -22648,7 +22643,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - nullable: true - type: object FavoriteFeature: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Features: @@ -22657,8 +22651,8 @@ components: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Photo: type: string - nullable: true format: base64url + nullable: true Friends: type: array items: @@ -22669,7 +22663,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object description: The best friend. x-ms-navigationProperty: true Trips: @@ -22703,7 +22696,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - nullable: true - type: object Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object @@ -22715,7 +22707,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - nullable: true - type: object Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: title: City type: object @@ -22741,7 +22732,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - nullable: true - type: object description: The person to contact in case of a crisis at this location. x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: @@ -22772,8 +22762,8 @@ components: Budget: oneOf: - type: number - nullable: true format: float + nullable: true - type: string nullable: true - $ref: '#/components/schemas/ReferenceNumeric' @@ -22836,7 +22826,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' - nullable: true - type: object Description: type: string nullable: true @@ -22862,19 +22851,16 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - nullable: true - type: object x-ms-navigationProperty: true From: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - nullable: true - type: object x-ms-navigationProperty: true To: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - nullable: true - type: object x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: @@ -22885,8 +22871,8 @@ components: Cost: oneOf: - type: number - nullable: true format: int64 + nullable: true - type: string nullable: true Peers: @@ -22903,15 +22889,14 @@ components: Budget: oneOf: - type: number - nullable: true format: int64 + nullable: true - type: string nullable: true BossOffice: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - nullable: true - type: object DirectReports: type: array items: @@ -23129,7 +23114,6 @@ components: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - nullable: true - type: object GetFriendsTripsResponse: description: Success content: diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/ApiKeyTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/ApiKeyTests.cs index e4e1c9c88..fbb0c36fd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/ApiKeyTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/ApiKeyTests.cs @@ -9,7 +9,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/AuthorizationTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/AuthorizationTests.cs index 22a103b30..3aefe26da 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/AuthorizationTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/AuthorizationTests.cs @@ -6,7 +6,6 @@ using System; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Exceptions; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/HttpTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/HttpTests.cs index f775dc537..06b242be5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/HttpTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/HttpTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2AuthCodeTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2AuthCodeTests.cs index 420098b20..baf560842 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2AuthCodeTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2AuthCodeTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ClientCredentialsTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ClientCredentialsTests.cs index 898cd414c..b5321213b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ClientCredentialsTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ClientCredentialsTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ImplicitTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ImplicitTests.cs index 51ac1b6b9..a88f01aff 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ImplicitTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2ImplicitTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2PasswordTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2PasswordTests.cs index 166e364dc..1c16d0f60 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2PasswordTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OAuth2PasswordTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OpenIDConnectTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OpenIDConnectTests.cs index f97f97bd3..2dbed7b5d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OpenIDConnectTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Authorization/OpenIDConnectTests.cs @@ -8,7 +8,6 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Xunit; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/PermissionTypeTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/PermissionTypeTests.cs index 8a1dff001..be1d4f6fb 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/PermissionTypeTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/PermissionTypeTests.cs @@ -109,7 +109,7 @@ private static void VerifyPermissionType(PermissionType permission) Assert.Equal("scheme name", permission.SchemeName); Assert.NotNull(permission.Scopes); - ScopeType scope = Assert.Single(permission.Scopes); + OData.Vocabulary.Capabilities.ScopeType scope = Assert.Single(permission.Scopes); Assert.Equal("scope name", scope.Scope); Assert.Null(scope.RestrictedProperties); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/ScopeTypeTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/ScopeTypeTests.cs index 2190e4a86..40afb6ad5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/ScopeTypeTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/ScopeTypeTests.cs @@ -20,7 +20,7 @@ public class ScopeTypeTests public void DefaultPropertyAsNull() { // Arrange & Act - ScopeType scope = new ScopeType(); + OData.Vocabulary.Capabilities.ScopeType scope = new(); // Assert Assert.Null(scope.Scope); @@ -31,7 +31,7 @@ public void DefaultPropertyAsNull() public void InitializeWithNullRecordThrows() { // Arrange & Act - ScopeType scope = new ScopeType(); + OData.Vocabulary.Capabilities.ScopeType scope = new(); // Assert Assert.Throws("record", () => scope.Initialize(record: null)); @@ -46,7 +46,7 @@ public void InitializeWithScopeTypeRecordSuccess() new EdmPropertyConstructor("RestrictedProperties", new EdmStringConstant("abc,xyz"))); // Act - ScopeType scope = new ScopeType(); + OData.Vocabulary.Capabilities.ScopeType scope = new(); scope.Initialize(record); // Assert @@ -72,7 +72,7 @@ public void ScopeTypeTermValueInitializeWorksForScopeType() Assert.NotNull(model); // guard // Act - ScopeType scope = model.GetRecord(model.EntityContainer, "NS.MyTerm"); + OData.Vocabulary.Capabilities.ScopeType scope = model.GetRecord(model.EntityContainer, "NS.MyTerm"); // Assert Assert.NotNull(scope); diff --git a/tool/UpdateDocs/Program.cs b/tool/UpdateDocs/Program.cs index ddfcf2f00..22cad7999 100644 --- a/tool/UpdateDocs/Program.cs +++ b/tool/UpdateDocs/Program.cs @@ -11,7 +11,6 @@ using Microsoft.OData.Edm.Csdl; using Microsoft.OpenApi; using Microsoft.OpenApi.OData; -using Microsoft.OpenApi.Extensions; using System.Threading.Tasks; namespace UpdateDocs diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj index fbf2d587e..bbac53798 100644 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ b/tool/UpdateDocs/UpdateDocs.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file