From 288224f5f9fb428cbcdfe271d0076da874f64e8d Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 13 Nov 2024 11:32:38 +0300 Subject: [PATCH 001/103] Replace OpenApiReference with a proxy reference equivalent --- .../Common/EdmModelHelper.cs | 21 +- .../OpenApiEdmTypeSchemaGenerator.cs | 24 +-- .../Generator/OpenApiErrorSchemaGenerator.cs | 3 +- .../Generator/OpenApiParameterGenerator.cs | 32 +-- .../Generator/OpenApiRequestBodyGenerator.cs | 23 +-- .../Generator/OpenApiResponseGenerator.cs | 85 +------- .../Generator/OpenApiSchemaGenerator.cs | 39 +--- .../OpenApiSecurityRequirementGenerator.cs | 21 +- .../OpenApiSpatialTypeSchemaGenerator.cs | 189 ++++++------------ .../ComplexPropertyPostOperationHandler.cs | 13 +- .../ComplexPropertyUpdateOperationHandler.cs | 15 +- .../Operation/EdmActionOperationHandler.cs | 13 +- .../Operation/EntityGetOperationHandler.cs | 11 +- .../Operation/EntitySetGetOperationHandler.cs | 10 +- .../EntitySetPostOperationHandler.cs | 16 +- .../Operation/EntityUpdateOperationHandler.cs | 11 +- .../MediaEntityPutOperationHandler.cs | 11 +- .../NavigationPropertyGetOperationHandler.cs | 23 +-- .../NavigationPropertyOperationHandler.cs | 11 +- .../ODataTypeCastGetOperationHandler.cs | 10 +- .../Operation/OperationHandler.cs | 12 +- .../Operation/RefGetOperationHandler.cs | 12 +- .../Operation/RefPostOperationHandler.cs | 11 +- .../Operation/RefPutOperationHandler.cs | 11 +- .../Operation/SingletonGetOperationHandler.cs | 14 +- .../SingletonPatchOperationHandler.cs | 11 +- 26 files changed, 138 insertions(+), 514 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs index 7bd5df68c..8ef0dbf35 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs @@ -10,6 +10,7 @@ using Microsoft.OData.Edm.Csdl; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; @@ -39,28 +40,12 @@ internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType OneOf = new List() }; - OpenApiSchema baseTypeSchema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = schemaElement.FullName() - } - }; + OpenApiSchema baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), null); schema.OneOf.Add(baseTypeSchema); foreach (IEdmSchemaElement derivedType in derivedTypes) { - OpenApiSchema derivedTypeSchema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = derivedType.FullName() - } - }; + OpenApiSchema derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), null); schema.OneOf.Add(derivedTypeSchema); }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 1144abf3e..4a3c9fdee 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -455,12 +455,7 @@ private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEd { schema.Type = null; schema.AnyOf = null; - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = typeReference.Definition.FullTypeName() - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null); schema.Nullable = typeReference.IsNullable; } @@ -504,12 +499,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex { schema.Type = null; schema.AnyOf = null; - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = typeReference.Definition.FullTypeName() - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null); schema.Nullable = typeReference.IsNullable; } @@ -548,15 +538,9 @@ private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext contex { schema.Type = null; schema.AnyOf = null; - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = reference.Definition.FullTypeName() - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference(reference.Definition.FullTypeName(), null); schema.Nullable = reference.IsNullable; - } - + } return schema; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index beeaa1d1d..d2f5e0138 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -11,6 +11,7 @@ using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.MicrosoftExtensions; +using Microsoft.OpenApi.Models.References; 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 eaceb8700..9bc7b7afe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -362,11 +362,7 @@ public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabula bool? top = context.Model.GetBoolean(target, CapabilitiesConstants.TopSupported); if (top == null || top.Value) { - return new OpenApiParameter - { - UnresolvedReference = true, - Reference = new OpenApiReference { Type = ReferenceType.Parameter, Id = "top" } - }; + return new OpenApiParameterReference("top", null); } return null; @@ -404,11 +400,7 @@ public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabul bool? skip = context.Model.GetBoolean(target, CapabilitiesConstants.SkipSupported); if (skip == null || skip.Value) { - return new OpenApiParameter - { - UnresolvedReference = true, - Reference = new OpenApiReference { Type = ReferenceType.Parameter, Id = "skip" } - }; + return new OpenApiParameterReference("skip", null); } return null; @@ -446,11 +438,7 @@ public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocab SearchRestrictionsType search = context.Model.GetRecord(target, CapabilitiesConstants.SearchRestrictions); if (search == null || search.IsSearchable) { - return new OpenApiParameter - { - UnresolvedReference = true, - Reference = new OpenApiReference { Type = ReferenceType.Parameter, Id = "search" } - }; + return new OpenApiParameterReference("search", null); } return null; @@ -487,11 +475,7 @@ public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabu CountRestrictionsType count = context.Model.GetRecord(target, CapabilitiesConstants.CountRestrictions); if (count == null || count.IsCountable) { - return new OpenApiParameter - { - UnresolvedReference = true, - Reference = new OpenApiReference { Type = ReferenceType.Parameter, Id = "count" } - }; + return new OpenApiParameterReference("count", null); } return null; @@ -529,11 +513,7 @@ public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocab FilterRestrictionsType filter = context.Model.GetRecord(target, CapabilitiesConstants.FilterRestrictions); if (filter == null || filter.IsFilterable) { - return new OpenApiParameter - { - UnresolvedReference = true, - Reference = new OpenApiReference { Type = ReferenceType.Parameter, Id = "filter" } - }; + return new OpenApiParameterReference("filter", null); } return null; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index 04418da50..93e7a3dde 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -9,6 +9,7 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Common; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator { @@ -125,15 +126,7 @@ public static IDictionary CreateRequestBodies(this O /// The created private static OpenApiRequestBody CreateRefPostRequestBody() { - OpenApiSchema schema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Constants.ReferenceCreateSchemaName - } - }; + OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, null); return new OpenApiRequestBody { Required = true, @@ -156,15 +149,7 @@ private static OpenApiRequestBody CreateRefPostRequestBody() /// The created private static OpenApiRequestBody CreateRefPutRequestBody() { - OpenApiSchema schema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Constants.ReferenceUpdateSchemaName - } - }; + OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, null); return new OpenApiRequestBody { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 4c044bb59..91dda776b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -7,6 +7,7 @@ using System.Linq; 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.Vocabulary.Core; @@ -22,40 +23,14 @@ internal static class OpenApiResponseGenerator new Dictionary { { Constants.StatusCodeDefault, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Response, - Id = Constants.Error - } - } + new OpenApiResponseReference(Constants.Error, null) }, { Constants.StatusCode204, new OpenApiResponse { Description = Constants.Success} }, { Constants.StatusCode201, new OpenApiResponse { Description = Constants.Created} }, { Constants.StatusCodeClass2XX, new OpenApiResponse { Description = Constants.Success} }, - { Constants.StatusCodeClass4XX, new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Response, - Id = Constants.Error - } - } - }, - { Constants.StatusCodeClass5XX, new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Response, - Id = Constants.Error - } - } - } + { Constants.StatusCodeClass4XX, new OpenApiResponseReference(Constants.Error, null)}, + { Constants.StatusCodeClass5XX, new OpenApiResponseReference(Constants.Error, null)} }; /// @@ -156,15 +131,7 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp { responses.Add( context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Type = ReferenceType.Response, - Id = $"{operation.Name}Response" - } - } + new OpenApiResponseReference($"{operation.Name}Response", null) ); } else @@ -212,16 +179,9 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, { AllOf = new List { - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = operation.IsDeltaFunction() ? Constants.BaseDeltaFunctionResponse // @odata.nextLink + @odata.deltaLink - : Constants.BaseCollectionPaginationCountResponse // @odata.nextLink + @odata.count - } - }, + new OpenApiSchemaReference(operation.IsDeltaFunction() ? Constants.BaseDeltaFunctionResponse // @odata.nextLink + @odata.deltaLink + : Constants.BaseCollectionPaginationCountResponse // @odata.nextLink + @odata.count) + ,null), baseSchema } }; @@ -315,15 +275,7 @@ private static OpenApiResponse CreateCollectionResponse(string typeName) Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = $"{typeName}{Constants.CollectionSchemaSuffix}" - } - } + Schema = new OpenApiSchemaReference($"{typeName}{Constants.CollectionSchemaSuffix}", null) } } } @@ -332,14 +284,7 @@ private static OpenApiResponse CreateCollectionResponse(string typeName) private static OpenApiResponse CreateCountResponse() { - OpenApiSchema schema = new() - { - UnresolvedReference = true, - Reference = new() { - Type = ReferenceType.Schema, - Id = Constants.DollarCountSchemaName - } - }; + OpenApiSchema schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, null); return new OpenApiResponse { Description = "The count of the resource", @@ -368,15 +313,7 @@ private static OpenApiResponse CreateErrorResponse(this ODataContext context) Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = $"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}" - } - } + Schema = new OpenApiSchemaReference($"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}", null) } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 2834322ed..1455befbe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -216,15 +216,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmSt if (schema == null) { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = entityType?.FullName() ?? structuredType.FullTypeName() - } - }; + schema = new OpenApiSchemaReference(entityType?.FullName() ?? structuredType.FullTypeName(), null); } return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName()); } @@ -254,15 +246,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp if (context.Settings.EnableODataAnnotationReferencesForResponses) { // @odata.nextLink + @odata.count - OpenApiSchema paginationCountSchema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Constants.BaseCollectionPaginationCountResponse - } - }; + OpenApiSchema paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, null); collectionSchema = new OpenApiSchema { @@ -515,15 +499,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex AllOf = new List { // 1. a JSON Reference to the Schema Object of the base type - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = structuredType.BaseType.FullTypeName() - } - }, + new OpenApiSchemaReference(structuredType.BaseType.FullTypeName(), null), // 2. a Schema Object describing the derived type context.CreateStructuredTypeSchema(structuredType, false, false, derivedTypes) @@ -542,14 +518,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex if (context.Settings.EnableDiscriminatorValue && derivedTypes.Any()) { Dictionary mapping = derivedTypes - .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchema - { - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = x.FullTypeName() - } - }.Reference.ReferenceV3); + .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchemaReference(x.FullTypeName(), null).Reference.ReferenceV3); discriminator = new OpenApiDiscriminator { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs index 8df137aea..8cd78094c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs @@ -10,6 +10,7 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary.Authorization; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator { @@ -36,15 +37,7 @@ public static IEnumerable CreateSecurityRequirements yield return new OpenApiSecurityRequirement { [ - new OpenApiSecurityScheme - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = securityScheme.Authorization - } - } + new OpenApiSecuritySchemeReference(securityScheme.Authorization, null) ] = new List(securityScheme.RequiredScopes ?? new List()) }; } @@ -69,15 +62,7 @@ public static IEnumerable CreateSecurityRequirements yield return new OpenApiSecurityRequirement { [ - new OpenApiSecurityScheme - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = permission.SchemeName - } - } + new OpenApiSecuritySchemeReference(permission.SchemeName, null) ] = new List(permission.Scopes?.Select(c => c.Scope) ?? new List()) }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs index 3fcd31680..a3b560456 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs @@ -4,8 +4,9 @@ // ------------------------------------------------------------ using System.Collections.Generic; -using Microsoft.OpenApi.Any; +using System.Text.Json.Nodes; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -75,15 +76,7 @@ public static IDictionary CreateSpatialSchemas(this OData /// The created . public static OpenApiSchema CreateEdmGeographySchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.Geometry" - } - }; + return new OpenApiSchemaReference("Edm.Geometry", null); } /// @@ -92,15 +85,7 @@ public static OpenApiSchema CreateEdmGeographySchema() /// The created . public static OpenApiSchema CreateEdmGeographyPointSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryPoint" - } - }; + return new OpenApiSchemaReference("Edm.GeometryPoint", null); } /// @@ -109,15 +94,7 @@ public static OpenApiSchema CreateEdmGeographyPointSchema() /// The created . public static OpenApiSchema CreateEdmGeographyLineStringSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryLineString" - } - }; + return new OpenApiSchemaReference("Edm.GeometryLineString", null); } /// @@ -126,15 +103,7 @@ public static OpenApiSchema CreateEdmGeographyLineStringSchema() /// The created . public static OpenApiSchema CreateEdmGeographyPolygonSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryPolygon" - } - }; + return new OpenApiSchemaReference("Edm.GeometryPolygon", null); } /// @@ -143,15 +112,7 @@ public static OpenApiSchema CreateEdmGeographyPolygonSchema() /// The created . public static OpenApiSchema CreateEdmGeographyMultiPointSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiPoint" - } - }; + return new OpenApiSchemaReference("Edm.GeometryMultiPoint", null); } /// @@ -160,15 +121,7 @@ public static OpenApiSchema CreateEdmGeographyMultiPointSchema() /// The created . public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiLineString" - } - }; + return new OpenApiSchemaReference("Edm.GeometryMultiLineString", null); } /// @@ -177,15 +130,7 @@ public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema() /// The created . public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiPolygon" - } - }; + return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null); } /// @@ -194,15 +139,7 @@ public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema() /// The created . public static OpenApiSchema CreateEdmGeographyCollectionSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryCollection" - } - }; + return new OpenApiSchemaReference("Edm.GeometryCollection", null); } /// @@ -213,17 +150,17 @@ public static OpenApiSchema CreateEdmGeometrySchema() { return new OpenApiSchema { - Type = "object", - OneOf = new List - { - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryPoint" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryLineString" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryPolygon" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryMultiPoint" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryMultiLineString" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryMultiPolygon" } }, - new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.GeometryCollection" } } - } + Type = JsonSchemaType.Object, + OneOf = + [ + new OpenApiSchemaReference("Edm.GeometryPoint", null), + new OpenApiSchemaReference("Edm.GeometryLineString", null), + new OpenApiSchemaReference("Edm.GeometryPolygon", null), + new OpenApiSchemaReference("Edm.GeometryMultiPoint", null), + new OpenApiSchemaReference("Edm.GeometryMultiLineString", null), + new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null), + new OpenApiSchemaReference("Edm.GeometryCollection", null) + ] }; } @@ -235,20 +172,20 @@ public static OpenApiSchema CreateEdmGeometryPointSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Type = "string", - Enum = new List + Type = JsonSchemaType.String, + Enum = new List { - new OpenApiString("Point") + "Point" }, - Default = new OpenApiString("Point") + Default = "Point" } }, - { "coordinates", new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" } } } + { "coordinates", new OpenApiSchemaReference("GeoJSON.position", null) } }, Required = new HashSet { @@ -266,21 +203,21 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("LineString") + "LineString" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" }}, + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("GeoJSON.position", null), MinItems = 2 } } @@ -301,24 +238,24 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("Polygon") + "Polygon" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" } } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("GeoJSON.position", null) }, MinItems = 4 } @@ -340,21 +277,21 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("MultiPoint") + "MultiPoint" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" }} + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("GeoJSON.position", null) } } }, @@ -374,24 +311,24 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("MultiLineString") + "MultiLineString" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" } } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("GeoJSON.position", null) }, MinItems = 2 } @@ -413,27 +350,27 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("MultiPolygon") + "MultiPolygon" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "GeoJSON.position" } } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("GeoJSON.position", null) } }, MinItems = 4 @@ -456,21 +393,21 @@ public static OpenApiSchema CreateEdmGeometryCollectionSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { "type", new OpenApiSchema { - Enum = new List + Enum = new List { - new OpenApiString("GeometryCollection") + "GeometryCollection" }, } }, { "coordinates", new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { UnresolvedReference = true, Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = "Edm.Geometry" } } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference("Edm.Geometry", null) } } }, @@ -490,8 +427,8 @@ public static OpenApiSchema CreateGeoJsonPointSchema() { return new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema { Type = "number" }, + Type = JsonSchemaType.Array, + Items = new OpenApiSchema { Type = JsonSchemaType.Number }, MinItems = 2 }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 6fd736c64..2882c91eb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -8,6 +8,7 @@ using System.Linq; 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; @@ -128,16 +129,8 @@ private OpenApiSchema GetOpenApiSchema() { return new() { - Type = "array", - Items = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = ComplexPropertySegment.ComplexType.FullName() - } - } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null) }; } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index cb9e616f1..b6eacbef8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -102,28 +103,20 @@ protected override void AppendCustomParameters(OpenApiOperation operation) private OpenApiSchema GetOpenApiSchema() { - var schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = ComplexPropertySegment.ComplexType.FullName() - } - }; + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); if (ComplexPropertySegment.Property.Type.IsCollection()) { return new OpenApiSchema { - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Properties = new Dictionary { { "value", new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = schema } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index e099e3714..bdaccc007 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -45,15 +46,7 @@ protected override void SetRequestBody(OpenApiOperation operation) { if (Context.Model.OperationTargetsMultiplePaths(action)) { - operation.RequestBody = new OpenApiRequestBody - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.RequestBody, - Id = $"{action.Name}RequestBody" - } - }; + operation.RequestBody = new OpenApiRequestBodyReference($"{action.Name}RequestBody", null); } else { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index 8a506cf82..98e9fc415 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Operation { @@ -104,15 +105,7 @@ protected override void SetResponses(OpenApiOperation operation) if (schema == null) { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = EntitySet.EntityType.FullName() - } - }; + schema = new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); } operation.Responses = new OpenApiResponses diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index 96b967d38..77aeb5d83 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -145,15 +145,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Type = ReferenceType.Response, - Id = $"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}" - }, - } + new OpenApiResponseReference($"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}", null) } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 4367beacf..91ae901d2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -190,18 +191,7 @@ private OpenApiSchema GetEntitySchema() schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); } - if (schema == null) - { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = EntitySet.EntityType.FullName() - } - }; - } + schema ??= new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); return schema; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 3595b30b7..1a4290837 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -145,15 +146,7 @@ private OpenApiSchema GetOpenApiSchema() return EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); } - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = EntitySet.EntityType.FullName() - } - }; + return new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index 20f810b84..d50f33480 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -8,6 +8,7 @@ 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; @@ -90,15 +91,7 @@ protected override void SetResponses(OpenApiOperation operation) // Get the entity type declaring this stream property. (var entityType, _) = GetStreamElements(); - OpenApiSchema schema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = entityType.FullName() - } - }; + OpenApiSchema schema = new OpenApiSchemaReference(entityType.FullName(), null); operation.AddErrorResponses(Context.Settings, addNoContent: true, schema: schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index fd94a4f50..2909cd446 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -96,14 +96,8 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse + new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}", null) { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Type = ReferenceType.Response, - Id = $"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}" - }, Links = links } } @@ -119,18 +113,7 @@ protected override void SetResponses(OpenApiOperation operation) schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, Context.Model); } - if (schema == null) - { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = entityType.FullName() - } - }; - } + schema ??= new OpenApiSchemaReference(entityType.FullName(), null); operation.Responses = new OpenApiResponses { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 743a10e88..bb065a6e0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary; @@ -214,15 +215,7 @@ protected IDictionary GetContent(OpenApiSchema schema protected OpenApiSchema GetOpenApiSchema() { - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = NavigationProperty.ToEntityType().FullName() - } - }; + return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), null); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 8c3231e52..864497746 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -207,15 +207,7 @@ protected override void SetResponses(OpenApiOperation operation) if (schema == null) { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = TargetSchemaElement.FullName() - } - }; + schema = new OpenApiSchemaReference(TargetSchemaElement.FullName(), null); } SetSingleResponse(operation, schema); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index 43cdc43cb..215e064ee 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; using System.Linq; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.MicrosoftExtensions; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -305,15 +305,7 @@ internal void SetCollectionResponse(OpenApiOperation operation, string targetEle { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Type = ReferenceType.Response, - Id = $"{targetElementFullName}{Constants.CollectionSchemaSuffix}" - } - } + new OpenApiResponseReference($"{targetElementFullName}{Constants.CollectionSchemaSuffix}", null) } }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index bf07dcf74..a1f4ae2ac 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -81,15 +81,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Response, - Id = $"String{Constants.CollectionSchemaSuffix}" - }, - } + new OpenApiResponseReference($"String{Constants.CollectionSchemaSuffix}", null) } }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index bafaad2d0..592844c32 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -5,6 +5,7 @@ using System.Linq; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -47,15 +48,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBody - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.RequestBody, - Id = Constants.ReferencePostRequestBodyName - } - }; + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePostRequestBodyName, null); base.SetRequestBody(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index 08c3aa9e9..b3bc77e0d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -5,6 +5,7 @@ using System.Linq; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -47,15 +48,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBody - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.RequestBody, - Id = Constants.ReferencePutRequestBodyName - } - }; + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePutRequestBodyName, null); base.SetRequestBody(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 758c94ee8..1b7811a63 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -89,18 +90,7 @@ protected override void SetResponses(OpenApiOperation operation) entityKind: Singleton.ContainerElementKind.ToString(), path: Path, parameters: PathParameters); } - if (schema == null) - { - schema = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Singleton.EntityType.FullName() - } - }; - } + schema ??= new OpenApiSchemaReference(Singleton.EntityType.FullName(), null); operation.Responses = new OpenApiResponses { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index 03c0b47bb..11c0a605c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -117,15 +118,7 @@ private OpenApiSchema GetOpenApiSchema() return EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model); } - return new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Singleton.EntityType.FullName() - } - }; + return new OpenApiSchemaReference(Singleton.EntityType.FullName(), null); } } } From 92d7721aab9d5d19899818487ad03e37e28d02d4 Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 13 Nov 2024 11:36:53 +0300 Subject: [PATCH 002/103] Upgrade OpenApi lib to v2 --- .../Microsoft.OpenAPI.OData.Reader.csproj | 2 +- src/OoasGui/OoasGui.csproj | 2 +- .../Microsoft.OpenAPI.OData.Reader.Tests.csproj | 2 +- tool/UpdateDocs/UpdateDocs.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 76e2b97b0..d7f17b215 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -53,7 +53,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/OoasGui/OoasGui.csproj b/src/OoasGui/OoasGui.csproj index 73be9d4cd..1ad466905 100644 --- a/src/OoasGui/OoasGui.csproj +++ b/src/OoasGui/OoasGui.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index 3e672e2ba..397746cb3 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -73,7 +73,7 @@ all - + all diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj index 307103051..4ab0afc8d 100644 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ b/tool/UpdateDocs/UpdateDocs.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file From ab7602e225a2973fe39b7f5a2436cba592024db3 Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 13 Nov 2024 11:45:25 +0300 Subject: [PATCH 003/103] Replace type with the corresponding JsonSchemaType enum value --- .../OpenApiEdmTypeSchemaGenerator.cs | 223 ++++-------------- .../Generator/OpenApiErrorSchemaGenerator.cs | 54 ++--- .../Generator/OpenApiParameterGenerator.cs | 28 +-- .../Generator/OpenApiRequestBodyGenerator.cs | 4 +- .../Generator/OpenApiResponseGenerator.cs | 6 +- .../Generator/OpenApiSchemaGenerator.cs | 44 ++-- .../OData/ODataConstants.cs | 7 +- .../ComplexPropertyPostOperationHandler.cs | 2 +- .../Operation/EntityDeleteOperationHandler.cs | 2 +- .../EntitySetPostOperationHandler.cs | 4 +- .../MediaEntityDeleteOperationHandler.cs | 2 +- .../MediaEntityOperationalHandler.cs | 4 +- .../Operation/MetadataGetOperationHandler.cs | 3 +- ...avigationPropertyDeleteOperationHandler.cs | 2 +- .../Operation/OperationHandler.cs | 2 +- .../Operation/RefDeleteOperationHandler.cs | 4 +- .../Operation/RefGetOperationHandler.cs | 2 +- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 20 +- .../OpenApiErrorSchemaGeneraratorTests.cs | 5 +- .../Generator/OpenApiLinkGeneratorTests.cs | 2 +- .../OpenApiRequestBodyGeneratorTests.cs | 9 +- .../OpenApiResponseGeneratorTests.cs | 3 +- .../Generator/OpenApiSchemaGeneratorTests.cs | 47 ++-- ...ComplexPropertyPutOperationHandlerTests.cs | 5 +- .../MediaEntityGetOperationHandlerTests.cs | 3 +- 25 files changed, 172 insertions(+), 315 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 4a3c9fdee..c471240ea 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -7,12 +7,13 @@ using System.Collections.Generic; using System.Diagnostics; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Any; 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; namespace Microsoft.OpenApi.OData.Generator { @@ -46,7 +47,7 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT return new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = schema }; @@ -134,7 +135,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv // Nullable properties are marked with the keyword nullable and a value of true. // nullable cannot be true when type is empty, often common in anyof/allOf since individual entries are nullable - schema.Nullable = !string.IsNullOrEmpty(schema.Type) && primitiveType.IsNullable; + schema.Nullable = !string.IsNullOrEmpty(schema.Type.ToIdentifier()) && primitiveType.IsNullable; } return schema; @@ -162,19 +163,19 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv switch (primitiveType.PrimitiveKind) { case EdmPrimitiveTypeKind.Binary: // binary - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "base64url"; break; case EdmPrimitiveTypeKind.Boolean: // boolean - schema.Type = "boolean"; - schema.Default = new OpenApiBoolean(false); + schema.Type = JsonSchemaType.Boolean; + schema.Default = false; break; case EdmPrimitiveTypeKind.Byte: // byte - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = "uint8"; break; case EdmPrimitiveTypeKind.DateTimeOffset: // datetime offset - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "date-time"; schema.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])$"; break; @@ -183,61 +184,45 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv { schema.OneOf = new List { - new OpenApiSchema { Type = Constants.NumberType, Format = Constants.DecimalFormat, Nullable = true }, - new OpenApiSchema { Type = Constants.StringType, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.DecimalFormat, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, }; } else { - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = Constants.DecimalFormat; } break; case EdmPrimitiveTypeKind.Double: // double schema.OneOf = new List { - new OpenApiSchema { Type = Constants.NumberType, Format = "double", Nullable = true }, - new OpenApiSchema { Type = Constants.StringType, Nullable = true }, - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Constants.ReferenceNumericName - } - } + new OpenApiSchema { Type = JsonSchemaType.Number, Format = "double", Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + new OpenApiSchemaReference(Constants.ReferenceNumericName, null) }; break; case EdmPrimitiveTypeKind.Single: // single schema.OneOf = new List { - new OpenApiSchema { Type = Constants.NumberType, Format = "float", Nullable = true }, - new OpenApiSchema { Type = Constants.StringType, Nullable = true }, - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = Constants.ReferenceNumericName - } - } + new OpenApiSchema { Type = JsonSchemaType.String, Format = "float", Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + new OpenApiSchemaReference(Constants.ReferenceNumericName, null) }; break; case EdmPrimitiveTypeKind.Guid: // guid - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "uuid"; schema.Pattern = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"; break; case EdmPrimitiveTypeKind.Int16: - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = "int16"; schema.Minimum = Int16.MinValue; // -32768 schema.Maximum = Int16.MaxValue; // 32767 break; case EdmPrimitiveTypeKind.Int32: - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = "int32"; schema.Minimum = Int32.MinValue; // -2147483648 schema.Maximum = Int32.MaxValue; // 2147483647 @@ -247,172 +232,92 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv { schema.OneOf = new List { - new OpenApiSchema { Type = Constants.NumberType, Format = Constants.Int64Format, Nullable = true }, - new OpenApiSchema { Type = Constants.StringType, Nullable = true } + new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.Int64Format, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } }; } else { - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = Constants.Int64Format; } break; case EdmPrimitiveTypeKind.SByte: - schema.Type = Constants.NumberType; + schema.Type = JsonSchemaType.Number; schema.Format = "int8"; schema.Minimum = SByte.MinValue; // -128 schema.Maximum = SByte.MaxValue; // 127 break; case EdmPrimitiveTypeKind.String: // string - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; break; case EdmPrimitiveTypeKind.Stream: // stream - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "base64url"; break; case EdmPrimitiveTypeKind.Duration: // duration - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "duration"; schema.Pattern = "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$"; break; case EdmPrimitiveTypeKind.Date: - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "date"; schema.Pattern = "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"; break; case EdmPrimitiveTypeKind.TimeOfDay: - schema.Type = Constants.StringType; + schema.Type = JsonSchemaType.String; schema.Format = "time"; schema.Pattern = "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?$"; break; case EdmPrimitiveTypeKind.Geography: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.Geography" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.Geography", null); break; case EdmPrimitiveTypeKind.GeographyPoint: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyPoint" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyPoint", null); break; case EdmPrimitiveTypeKind.GeographyLineString: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyLineString" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyLineString", null); break; case EdmPrimitiveTypeKind.GeographyPolygon: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyPolygon" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyPolygon", null); break; case EdmPrimitiveTypeKind.GeographyCollection: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyCollection" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyCollection", null); break; case EdmPrimitiveTypeKind.GeographyMultiPolygon: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyMultiPolygon" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyMultiPolygon", null); break; case EdmPrimitiveTypeKind.GeographyMultiLineString: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyMultiLineString" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyMultiLineString", null); break; case EdmPrimitiveTypeKind.GeographyMultiPoint: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeographyMultiPoint" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeographyMultiPoint", null); break; case EdmPrimitiveTypeKind.Geometry: // Geometry - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.Geometry" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.Geometry", null); break; case EdmPrimitiveTypeKind.GeometryPoint: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryPoint" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryPoint", null); break; case EdmPrimitiveTypeKind.GeometryLineString: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryLineString" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryLineString", null); break; case EdmPrimitiveTypeKind.GeometryPolygon: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryPolygon" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryPolygon", null); break; case EdmPrimitiveTypeKind.GeometryCollection: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryCollection" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryCollection", null); break; case EdmPrimitiveTypeKind.GeometryMultiPolygon: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiPolygon" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null); break; case EdmPrimitiveTypeKind.GeometryMultiLineString: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiLineString" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryMultiLineString", null); break; case EdmPrimitiveTypeKind.GeometryMultiPoint: - schema.Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = "Edm.GeometryMultiPoint" - }; - schema.UnresolvedReference = true; + schema = new OpenApiSchemaReference("Edm.GeometryMultiPoint", null); break; case EdmPrimitiveTypeKind.None: @@ -435,18 +340,10 @@ private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEd { schema.AnyOf = new List { + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null), new OpenApiSchema { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = typeReference.Definition.FullTypeName() - } - }, - new OpenApiSchema - { - Type = "object", + Type = JsonSchemaType.Object, Nullable = true } }; @@ -479,18 +376,10 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex schema.Reference = null; schema.AnyOf = new List { + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null), new OpenApiSchema { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = typeReference.Definition.FullTypeName() - } - }, - new OpenApiSchema - { - Type = "object", + Type = JsonSchemaType.Object, Nullable = true } }; @@ -518,18 +407,10 @@ private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext contex { schema.AnyOf = new List { + new OpenApiSchemaReference(reference.Definition.FullTypeName(), null), new OpenApiSchema { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = reference.Definition.FullTypeName() - } - }, - new OpenApiSchema - { - Type = "object", + Type = JsonSchemaType.Object, Nullable = true } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index d2f5e0138..407813a68 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -68,7 +68,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Required = new HashSet { "error" @@ -77,15 +77,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) { { "error", - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = $"{rootNamespaceName}{MainErrorClassName}" - } - } + new OpenApiSchemaReference($"{rootNamespaceName}{MainErrorClassName}", null) } } }; @@ -111,7 +103,7 @@ public static OpenApiSchema CreateInnerErrorSchema(ODataContext context) return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Description = "The structure of this object is service-specific" }; } @@ -125,7 +117,7 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName) { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Required = new HashSet { "code", "message" @@ -133,42 +125,26 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName) Properties = new Dictionary { { - "code", new OpenApiSchema { Type = "string", Nullable = false } + "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false } }, { - "message", new OpenApiSchema { Type = "string", Nullable = false, Extensions = new Dictionary + "message", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, Extensions = new Dictionary { { OpenApiPrimaryErrorMessageExtension.Name, new OpenApiPrimaryErrorMessageExtension { IsPrimaryErrorMessage = true } } } } }, { - "target", new OpenApiSchema { Type = "string", Nullable = true } + "target", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } }, { "details", new OpenApiSchema { - Type = "array", - Items = new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = $"{rootNamespaceName}{ErrorDetailsClassName}" - } - } + Type = JsonSchemaType.Array, + Items = new OpenApiSchemaReference($"{rootNamespaceName}{ErrorDetailsClassName}", null) } }, { "innerError", - new OpenApiSchema - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = $"{rootNamespaceName}{InnerErrorClassName}" - } - } + new OpenApiSchemaReference($"{rootNamespaceName}{InnerErrorClassName}", null) } } }; @@ -182,7 +158,7 @@ public static OpenApiSchema CreateErrorDetailSchema() { return new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Required = new HashSet { "code", "message" @@ -190,13 +166,13 @@ public static OpenApiSchema CreateErrorDetailSchema() Properties = new Dictionary { { - "code", new OpenApiSchema { Type = "string", Nullable = false, } + "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, } }, { - "message", new OpenApiSchema { Type = "string", Nullable = false, } + "message", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, } }, { - "target", new OpenApiSchema { Type = "string", Nullable = true, } + "target", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true, } } } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 9bc7b7afe..8fbe18f37 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -103,10 +103,10 @@ public static IList CreateParameters(this ODataContext context { Schema = new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String }, // These Parameter Objects optionally can contain the field description, @@ -641,11 +641,11 @@ public static OpenApiParameter CreateOrderBy(this ODataContext context, IEdmVoca Description = "Order items by property values", Schema = new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, UniqueItems = true, Items = new OpenApiSchema { - Type = "string", + Type = JsonSchemaType.String, Enum = context.Settings.UseStringArrayForQueryOptionsSchema ? null : orderByItems } }, @@ -747,11 +747,11 @@ public static OpenApiParameter CreateSelect(this ODataContext context, IEdmVocab Description = "Select properties to be returned", Schema = new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, UniqueItems = true, Items = new OpenApiSchema { - Type = "string", + Type = JsonSchemaType.String, Enum = context.Settings.UseStringArrayForQueryOptionsSchema ? null : selectItems } }, @@ -851,11 +851,11 @@ public static OpenApiParameter CreateExpand(this ODataContext context, IEdmVocab Description = "Expand related entities", Schema = new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, UniqueItems = true, Items = new OpenApiSchema { - Type = "string", + Type = JsonSchemaType.String, Enum = context.Settings.UseStringArrayForQueryOptionsSchema ? null : expandItems } }, @@ -874,10 +874,10 @@ private static OpenApiParameter CreateTop(int topExample) Description = "Show only the first n items", Schema = new OpenApiSchema { - Type = "integer", + Type = JsonSchemaType.Integer, Minimum = 0, }, - Example = new OpenApiInteger(topExample), + Example = topExample, Style = ParameterStyle.Form, Explode = false }; @@ -893,7 +893,7 @@ private static OpenApiParameter CreateSkip() Description = "Skip the first n items", Schema = new OpenApiSchema { - Type = "integer", + Type = JsonSchemaType.Integer, Minimum = 0, }, Style = ParameterStyle.Form, @@ -911,7 +911,7 @@ private static OpenApiParameter CreateCount() Description = "Include count of items", Schema = new OpenApiSchema { - Type = "boolean" + Type = JsonSchemaType.Boolean }, Style = ParameterStyle.Form, Explode = false @@ -928,7 +928,7 @@ private static OpenApiParameter CreateFilter() Description = "Filter items by property values", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String }, Style = ParameterStyle.Form, Explode = false @@ -945,7 +945,7 @@ private static OpenApiParameter CreateSearch() Description = "Search items by search phrases", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String }, Style = ParameterStyle.Form, Explode = false diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index 93e7a3dde..e963215c7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -63,7 +63,7 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE OpenApiSchema parametersSchema = new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary() }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 91dda776b..79c1881a3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -163,7 +163,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, { OpenApiSchema baseSchema = new() { - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Properties = new Dictionary { { @@ -207,7 +207,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, schema.Title = operation.ReturnType.Definition.AsElementType() is not IEdmEntityType entityType ? null : $"Collection of {entityType.Name}"; - schema.Type = "object"; + schema.Type = JsonSchemaType.Object; } else if (operation.ReturnType.IsPrimitive()) { @@ -215,7 +215,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, // whose name is value and whose value is a primitive value. schema = new OpenApiSchema { - Type = "object", + Type = JsonSchemaType.Object, Properties = new Dictionary { { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 1455befbe..cf473fa08 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -78,7 +78,7 @@ public static IDictionary CreateSchemas(this ODataContext if(context.Settings.EnableDollarCountPath) schemas[Constants.DollarCountSchemaName] = new OpenApiSchema { - Type = "integer", + Type = JsonSchemaType.Integer, Format = "int32" }; @@ -96,38 +96,38 @@ public static IDictionary CreateSchemas(this ODataContext if(context.HasAnyNonContainedCollections()) { - schemas[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionSchema(context, new OpenApiSchema { Type = Constants.StringType }, Constants.StringType); + schemas[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType); } schemas[Constants.ReferenceUpdateSchemaName] = new() { - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Properties = new Dictionary { - {Constants.OdataId, new OpenApiSchema { Type = Constants.StringType, Nullable = false }}, - {Constants.OdataType, new OpenApiSchema { Type = Constants.StringType, Nullable = true }}, + {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }}, + {Constants.OdataType, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }}, } }; schemas[Constants.ReferenceCreateSchemaName] = new() { - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Properties = new Dictionary { - {Constants.OdataId, new OpenApiSchema { Type = Constants.StringType, Nullable = false }} + {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }} }, - AdditionalProperties = new OpenApiSchema { Type = Constants.ObjectType } + AdditionalProperties = new OpenApiSchema { Type = JsonSchemaType.Object } }; schemas[Constants.ReferenceNumericName] = new() { - Type = Constants.StringType, + Type = JsonSchemaType.String, Nullable = true, Enum = [ - new OpenApiString("-INF"), - new OpenApiString("INF"), - new OpenApiString("NaN") + "-INF", + "INF", + "NaN" ] }; @@ -139,7 +139,7 @@ public static IDictionary CreateSchemas(this ODataContext schemas[Constants.BaseCollectionPaginationCountResponse] = new() { Title = "Base collection pagination and count responses", - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, }; if (context.Settings.EnableCount) @@ -154,7 +154,7 @@ public static IDictionary CreateSchemas(this ODataContext schemas[Constants.BaseDeltaFunctionResponse] = new() { Title = "Base delta function response", - Type = Constants.ObjectType + Type = JsonSchemaType.Object }; schemas[Constants.BaseDeltaFunctionResponse].Properties.Add(ODataConstants.OdataNextLink); schemas[Constants.BaseDeltaFunctionResponse].Properties.Add(ODataConstants.OdataDeltaLink); @@ -228,7 +228,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp "value", new OpenApiSchema { - Type = "array", + Type = JsonSchemaType.Array, Items = schema } } @@ -236,7 +236,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp OpenApiSchema baseSchema = new() { - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Properties = properties }; @@ -274,7 +274,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp } collectionSchema.Title = $"Collection of {typeName}"; - collectionSchema.Type = Constants.ObjectType; + collectionSchema.Type = JsonSchemaType.Object; return collectionSchema; } @@ -294,10 +294,10 @@ public static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdm OpenApiSchema schema = new() { // An enumeration type is represented as a Schema Object of type string - Type = Constants.StringType, + Type = JsonSchemaType.String, // containing the OpenAPI Specification enum keyword. - Enum = new List(), + Enum = new List(), // It optionally can contain the field description, // whose value is the value of the unqualified annotation Core.Description of the enumeration type. @@ -532,7 +532,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex { Title = (structuredType as IEdmSchemaElement)?.Name, - Type = Constants.ObjectType, + Type = JsonSchemaType.Object, Discriminator = discriminator, @@ -556,12 +556,12 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex isBaseTypeAbstractNonEntity || context.Model.IsBaseTypeReferencedAsTypeInModel(structuredType.BaseType)) { - defaultValue = new("#" + structuredType.FullTypeName()); + defaultValue = "#" + structuredType.FullTypeName(); } if (!schema.Properties.TryAdd(Constants.OdataType, new OpenApiSchema() { - Type = Constants.StringType, + Type = JsonSchemaType.String, Default = defaultValue, })) { diff --git a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs index 2344f3880..f75b535b8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.OData.Common; using System.Collections.Generic; namespace Microsoft.OpenApi.OData @@ -24,16 +23,16 @@ internal static class ODataConstants /// /// @odata.nextLink KeyValue pair /// - public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = Constants.StringType, Nullable = true }); + public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); /// /// @odata.count KeyValue pair /// - public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = "integer", Format = "int64", Nullable = true }); + public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Integer, Format = "int64", Nullable = true }); /// /// @odata.deltaLink KeyValue pair /// - public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = Constants.StringType, Nullable = true }); + public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 2882c91eb..b2acd31d1 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -66,7 +66,7 @@ protected override void SetParameters(OpenApiOperation operation) Description = "ETag", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String } }); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs index f34d83450..83933ba56 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs @@ -76,7 +76,7 @@ protected override void SetParameters(OpenApiOperation operation) Description = "ETag", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String } }); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 91ae901d2..99ac49f11 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -145,7 +145,7 @@ private IDictionary GetContentDescription() { Schema = new OpenApiSchema { - Type = "string", + Type = JsonSchemaType.String, Format = "binary" } }); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs index 54e712a2c..bcd947aa8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs @@ -73,7 +73,7 @@ protected override void SetParameters(OpenApiOperation operation) Description = "ETag", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String } }); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 3a159ace6..7bdd6dcf6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -166,7 +166,7 @@ protected IDictionary GetContentDescription() OpenApiSchema schema = new() { - Type = "string", + Type = JsonSchemaType.String, Format = "binary" }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs index f12e9fa98..22d600a30 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.OData.Generator; namespace Microsoft.OpenApi.OData.Operation { @@ -46,7 +45,7 @@ protected override void SetResponses(OpenApiOperation operation) { OpenApiSchema schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String }; operation.Responses = new OpenApiResponses diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs index 11e852053..ad0ac7eaa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs @@ -61,7 +61,7 @@ protected override void SetParameters(OpenApiOperation operation) Description = "ETag", Schema = new OpenApiSchema { - Type = "string" + Type = JsonSchemaType.String } }); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index 215e064ee..bdbc0decc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -244,7 +244,7 @@ protected static void AppendCustomParameters(OpenApiOperation operation, IList links = null; if (Context.Settings.ShowLinks) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 9dbae3953..06c4eae15 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -204,7 +204,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS Assert.Equal(enumType.FullTypeName(), anyOfRef.Reference.Id); var anyOfNull = schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal("object", anyOfNull.Type); + Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); Assert.True(anyOfNull.Nullable); } else @@ -299,7 +299,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp Assert.Equal(entity.FullTypeName(), anyOfRef.Reference.Id); var anyOfNull = schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal("object", anyOfNull.Type); + Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); Assert.True(anyOfNull.Nullable); } } @@ -401,17 +401,17 @@ public void CreateEdmTypeSchemaReturnSchemaForDecimal(bool isNullable, bool IEEE Assert.Null(schema.Type); Assert.NotNull(schema.OneOf); Assert.Equal(2, schema.OneOf.Count); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("number", StringComparison.OrdinalIgnoreCase)); + var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); Assert.NotNull(numberSchema); Assert.True(numberSchema.Nullable); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("string", StringComparison.OrdinalIgnoreCase)); + var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); Assert.NotNull(stringSchema); Assert.True(stringSchema.Nullable); Assert.False(schema.Nullable); } else { - Assert.Equal("number", schema.Type); + Assert.Equal(JsonSchemaType.Number, schema.Type); Assert.Null(schema.OneOf); Assert.Equal(isNullable, schema.Nullable); } @@ -444,17 +444,17 @@ public void CreateEdmTypeSchemaReturnSchemaForInt64(bool isNullable, bool IEEE75 Assert.Null(schema.Type); Assert.NotNull(schema.OneOf); Assert.Equal(2, schema.OneOf.Count); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("number", StringComparison.OrdinalIgnoreCase)); + var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); Assert.NotNull(numberSchema); Assert.True(numberSchema.Nullable); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("string", StringComparison.OrdinalIgnoreCase)); + var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); Assert.NotNull(stringSchema); Assert.True(stringSchema.Nullable); Assert.False(schema.Nullable); } else { - Assert.Equal("number", schema.Type); + Assert.Equal(JsonSchemaType.Number, schema.Type); Assert.Null(schema.AnyOf); Assert.Equal(isNullable, schema.Nullable); } @@ -512,12 +512,12 @@ public void CreateEdmTypeSchemaReturnSchemaForDouble(bool isNullable) // & Assert Assert.Null(schema.Type); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("number", StringComparison.OrdinalIgnoreCase)); + var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); Assert.NotNull(numberSchema); Assert.True(numberSchema.Nullable); Assert.Equal("double", numberSchema.Format, StringComparer.OrdinalIgnoreCase); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("string", StringComparison.OrdinalIgnoreCase)); + var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); Assert.NotNull(stringSchema); Assert.True(stringSchema.Nullable); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs index f4a761a45..6898c61ed 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; @@ -23,7 +24,7 @@ public void AddsEmptyInnerErrorWhenNoComplexTypeIsProvided() var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Empty(schema.Properties); } [Fact] @@ -38,7 +39,7 @@ public void AddsInnerErrorPropertiesWhenComplexTypeIsProvided() var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.NotEmpty(schema.Properties); Assert.Contains("Date", schema.Properties.Keys); Assert.Contains("RequestId", schema.Properties.Keys); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs index 8110f075a..92e8f0d4e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs @@ -215,7 +215,7 @@ public void CreateLinksForEntities() Required = true, Schema = new OpenApiSchema() { - Type = "string" + Type = JsonSchemaType.String } } }; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index 6abc39ee7..cd0142659 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -7,6 +7,7 @@ using System.Linq; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -87,11 +88,11 @@ public void CreateRequestBodyForActionImportReturnCorrectRequestBody() Assert.NotNull(content.Value.Schema); var schema = content.Value.Schema; - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.NotNull(schema.Properties); var parameter = Assert.Single(schema.Properties); Assert.Equal("param", parameter.Key); - Assert.Equal("string", parameter.Value.Type); + Assert.Equal(JsonSchemaType.String, parameter.Value.Type); } [Fact] @@ -144,11 +145,11 @@ public void CreateRequestBodyForActionReturnCorrectRequestBody() Assert.NotNull(content.Value.Schema); var schema = content.Value.Schema; - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.NotNull(schema.Properties); var parameter = Assert.Single(schema.Properties); Assert.Equal("param", parameter.Key); - Assert.Equal("string", parameter.Value.Type); + Assert.Equal(JsonSchemaType.String, parameter.Value.Type); } [Fact] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 857b2740e..3fc57708e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -221,9 +221,8 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", anyOfRef.Reference.Id); var anyOfNull = mediaType.Schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal("object", anyOfNull.Type); + Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); Assert.True(anyOfNull.Nullable); - } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index de5a38643..5a53cc9da 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -6,7 +6,6 @@ using System; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; @@ -67,17 +66,17 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo }, item => { - Assert.Equal("array", item.Properties["value"].Type); + Assert.Equal(JsonSchemaType.Array, item.Properties["value"].Type); }); - Assert.Equal("array", flightCollectionResponse.AllOf?.FirstOrDefault(x => x.Properties.Any())?.Properties["value"].Type); + Assert.Equal(JsonSchemaType.Array, flightCollectionResponse.AllOf?.FirstOrDefault(x => x.Properties.Any())?.Properties["value"].Type); Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight", flightCollectionResponse.AllOf?.FirstOrDefault(x => x.Properties.Any())?.Properties["value"].Items.Reference.Id); } else { - Assert.Equal("array", stringCollectionResponse.Properties["value"].Type); - Assert.Equal("array", flightCollectionResponse.Properties["value"].Type); + Assert.Equal(JsonSchemaType.Array, stringCollectionResponse.Properties["value"].Type); + Assert.Equal(JsonSchemaType.Array, flightCollectionResponse.Properties["value"].Type); Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight", flightCollectionResponse.Properties["value"].Items.Reference.Id); } } @@ -100,10 +99,10 @@ public void CreatesRefRequestBodySchema() schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out OpenApiSchema refRequestBody); Assert.NotNull(refRequestBody); - Assert.Equal("object", refRequestBody.Type); + Assert.Equal(JsonSchemaType.Object, refRequestBody.Type); Assert.Equal(Constants.OdataId, refRequestBody.Properties.First().Key); - Assert.Equal("string", refRequestBody.Properties.First().Value.Type); - Assert.Equal("object", refRequestBody.AdditionalProperties.Type); + Assert.Equal(JsonSchemaType.String, refRequestBody.Properties.First().Value.Type); + Assert.Equal(JsonSchemaType.Object, refRequestBody.AdditionalProperties.Type); } [Theory] @@ -450,7 +449,7 @@ public void CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Null(schema.AllOf); Assert.NotNull(schema.Properties); @@ -503,7 +502,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.True(String.IsNullOrEmpty(schema.Type)); + Assert.True(String.IsNullOrEmpty(schema.Type.ToIdentifier())); Assert.NotNull(schema.AllOf); Assert.Null(schema.AnyOf); @@ -517,7 +516,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("NS.LandPlant", baseSchema.Reference.Id); var declaredSchema = schema.AllOf.Last(); - Assert.Equal("object", declaredSchema.Type); + Assert.Equal(JsonSchemaType.Object, declaredSchema.Type); Assert.Null(declaredSchema.AllOf); Assert.Null(declaredSchema.AnyOf); Assert.Null(declaredSchema.OneOf); @@ -528,7 +527,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("Price", property.Key); Assert.Equal("decimal", property.Value.OneOf.FirstOrDefault(x => !string.IsNullOrEmpty(x.Format))?.Format); Assert.NotNull(property.Value.OneOf); - Assert.Equal(new string[] { "number", "string" }, property.Value.OneOf.Select(e => e.Type)); + Assert.Equal([JsonSchemaType.Number, JsonSchemaType.String], property.Value.OneOf.Select(e => e.Type)); Assert.Equal("Complex type 'Tree' description.", declaredSchema.Description); Assert.Equal("Tree", declaredSchema.Title); @@ -595,7 +594,7 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Null(schema.AllOf); Assert.NotNull(schema.Properties); @@ -656,7 +655,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.True(String.IsNullOrEmpty(schema.Type)); + Assert.True(String.IsNullOrEmpty(schema.Type.ToIdentifier())); Assert.NotNull(schema.AllOf); Assert.Null(schema.AnyOf); @@ -670,7 +669,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("NS.Animal", baseSchema.Reference.Id); var declaredSchema = schema.AllOf.Last(); - Assert.Equal("object", declaredSchema.Type); + Assert.Equal(JsonSchemaType.Object, declaredSchema.Type); Assert.Null(declaredSchema.AllOf); Assert.Null(declaredSchema.AnyOf); Assert.Null(declaredSchema.OneOf); @@ -679,7 +678,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.Single(declaredSchema.Properties); var property = Assert.Single(declaredSchema.Properties); Assert.Equal("Name", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal(JsonSchemaType.String, property.Value.Type); Assert.Null(property.Value.OneOf); Assert.Equal("Entity type 'Human' description.", declaredSchema.Description); @@ -732,7 +731,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.True(String.IsNullOrEmpty(schema.Type)); + Assert.True(String.IsNullOrEmpty(schema.Type.ToIdentifier())); Assert.NotNull(schema.AllOf); Assert.Null(schema.AnyOf); @@ -746,7 +745,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() Assert.Equal("SubNS.CustomerBase", baseSchema.Reference.Id); var declaredSchema = schema.AllOf.Last(); - Assert.Equal("object", declaredSchema.Type); + Assert.Equal(JsonSchemaType.Object, declaredSchema.Type); Assert.Null(declaredSchema.AllOf); Assert.Null(declaredSchema.AnyOf); Assert.Null(declaredSchema.OneOf); @@ -755,7 +754,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() Assert.Single(declaredSchema.Properties); var property = Assert.Single(declaredSchema.Properties); Assert.Equal("Extra", property.Key); - Assert.Equal("number", property.Value.Type); + Assert.Equal(JsonSchemaType.Number, property.Value.Type); Assert.Null(property.Value.OneOf); Assert.Equal("Customer", declaredSchema.Title); @@ -823,13 +822,13 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.Equal("string", schema.Type); + Assert.Equal(JsonSchemaType.String, schema.Type); Assert.Equal("Enum type 'Color' description.", schema.Description); Assert.Equal("Color", schema.Title); Assert.NotNull(schema.Enum); Assert.Equal(2, schema.Enum.Count); - Assert.Equal(new string[] { "Blue", "White" }, schema.Enum.Select(e => ((OpenApiString)e).Value)); + Assert.Equal([ "Blue", "White" ], schema.Enum.Select(e => e)); // Act string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -1023,7 +1022,7 @@ public void NonNullableBooleanPropertyWithDefaultValueWorks() // Assert Assert.NotNull(schema); - Assert.Equal("boolean", schema.Type); + Assert.Equal(JsonSchemaType.Boolean, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); Assert.Equal(@"{ @@ -1048,7 +1047,7 @@ public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() // Assert Assert.NotNull(schema); - Assert.Equal("string", schema.Type); + Assert.Equal(JsonSchemaType.String, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); Assert.Equal(@"{ @@ -1073,7 +1072,7 @@ public void NonNullableIntegerPropertyWithDefaultValueWorks() // Assert Assert.NotNull(schema); - Assert.Equal("number", schema.Type); + Assert.Equal(JsonSchemaType.Number, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); Assert.Equal(@"{ diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs index bde8ab378..84f7e9fa2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System.Linq; using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; @@ -102,9 +103,9 @@ public void CreateComplexPropertyPutOperationReturnsCorrectOperationForCollectio var schema = put.RequestBody?.Content.FirstOrDefault().Value?.Schema; Assert.NotNull(schema); - Assert.Equal("object", schema.Type); + Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Equal("value", schema.Properties.FirstOrDefault().Key); - Assert.Equal("array", schema.Properties.FirstOrDefault().Value.Type); + Assert.Equal(JsonSchemaType.Array, schema.Properties.FirstOrDefault().Value.Type); if (enableOperationId) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index 09951b336..527149f71 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -5,6 +5,7 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using System.Linq; @@ -109,7 +110,7 @@ private void VerifyMediaEntityGetOperation(string annotation, bool enableOperati foreach (var item in getOperation.Responses[statusCode].Content) { Assert.Equal("binary", item.Value.Schema.Format); - Assert.Equal("string", item.Value.Schema.Type); + Assert.Equal(JsonSchemaType.String, item.Value.Schema.Type); } if (!string.IsNullOrEmpty(annotation)) From 62f71bb33aed0d34a233ba29dc5352fc97980267 Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 13 Nov 2024 11:48:46 +0300 Subject: [PATCH 004/103] Use OpenApiAny() for extensions and JsonNodes for examples --- .../Common/Utils.cs | 2 +- .../EdmModelOpenApiExtensions.cs | 4 +- .../Generator/OpenApiExampleGenerator.cs | 47 ++++++------ .../Generator/OpenApiInfoGenerator.cs | 9 ++- .../Generator/OpenApiLinkGenerator.cs | 3 +- .../Generator/OpenApiParameterGenerator.cs | 33 ++++----- .../Generator/OpenApiSchemaGenerator.cs | 73 ++++++++++--------- .../ComplexPropertyBaseOperationHandler.cs | 2 +- .../ComplexPropertyGetOperationHandler.cs | 21 ++---- .../DollarCountGetOperationHandler.cs | 13 +--- .../EdmActionImportOperationHandler.cs | 2 +- .../Operation/EdmActionOperationHandler.cs | 4 +- .../EdmFunctionImportOperationHandler.cs | 2 +- .../Operation/EdmFunctionOperationHandler.cs | 2 +- .../EdmOperationImportOperationHandler.cs | 2 +- .../Operation/EdmOperationOperationHandler.cs | 11 +-- .../Operation/EntitySetGetOperationHandler.cs | 10 ++- .../Operation/EntitySetOperationHandler.cs | 4 +- .../MediaEntityOperationalHandler.cs | 4 +- .../NavigationPropertyGetOperationHandler.cs | 12 +-- .../NavigationPropertyOperationHandler.cs | 4 +- .../ODataTypeCastGetOperationHandler.cs | 12 +-- .../Operation/OperationHandler.cs | 2 +- .../Operation/RefGetOperationHandler.cs | 12 +-- .../Operation/SingletonOperationHandler.cs | 4 +- .../NavigationPropertyPathItemHandler.cs | 7 +- .../PathItem/OperationPathItemHandler.cs | 7 +- .../ComplexPropertyPathItemHandlerTests.cs | 4 +- .../PathItem/EntityPathItemHandlerTests.cs | 4 +- .../PathItem/EntitySetPathItemHandlerTests.cs | 2 +- .../NavigationPropertyPathItemHandlerTests.cs | 2 +- .../ODataTypeCastPathItemHandlerTests.cs | 4 +- .../OperationImportPathItemHandlerTests.cs | 2 +- .../PathItem/OperationPathItemHandlerTests.cs | 4 +- .../PathItem/SingletonPathItemHandlerTests.cs | 2 +- 35 files changed, 166 insertions(+), 166 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs index d653de0ea..1033fb509 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs @@ -158,7 +158,7 @@ internal static void AddCustomAttributesToExtensions(this IDictionary k.Name == property.Name)) { propertyValue += " (identifier)"; @@ -102,7 +101,7 @@ private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType str { propertyValue += " (timestamp)"; } - item = new OpenApiString(propertyValue); + item = propertyValue; } value.Add(property.Name, item); @@ -111,7 +110,7 @@ private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType str return example; } - private static IOpenApiAny GetTypeNameForExample(IEdmTypeReference edmTypeReference) + private static JsonNode GetTypeNameForExample(IEdmTypeReference edmTypeReference) { switch (edmTypeReference.TypeKind()) { @@ -119,58 +118,60 @@ private static IOpenApiAny GetTypeNameForExample(IEdmTypeReference edmTypeRefere if (edmTypeReference.IsBinary()) { // return new OpenApiBinary(new byte[] { 0x00 }); issue on binary writing - return new OpenApiString(Convert.ToBase64String(new byte[] { 0x00 })); + return Convert.ToBase64String(new byte[] { 0x00 }); } else if (edmTypeReference.IsBoolean()) { - return new OpenApiBoolean(true); + return true; } else if (edmTypeReference.IsByte()) { - return new OpenApiByte(0x00); + return 0x00; } else if (edmTypeReference.IsDate()) { - return new OpenApiDate(DateTime.MinValue); + return DateTime.MinValue; } else if (edmTypeReference.IsDateTimeOffset()) { - return new OpenApiDateTime(DateTimeOffset.MinValue); + return DateTimeOffset.MinValue; } else if (edmTypeReference.IsDecimal() || edmTypeReference.IsDouble()) { - return new OpenApiDouble(0D); + return 0D; } else if (edmTypeReference.IsFloating()) { - return new OpenApiFloat(0F); + return 0F; } else if (edmTypeReference.IsGuid()) { - return new OpenApiString(Guid.Empty.ToString()); + return Guid.Empty.ToString(); } else if (edmTypeReference.IsInt16() || edmTypeReference.IsInt32()) { - return new OpenApiInteger(0); + return 0; } else if (edmTypeReference.IsInt64()) { - return new OpenApiLong(0L); + return 0L; } else { - return new OpenApiString(edmTypeReference.AsPrimitive().PrimitiveDefinition().Name); + return edmTypeReference.AsPrimitive().PrimitiveDefinition().Name; } case EdmTypeKind.Entity: case EdmTypeKind.Complex: case EdmTypeKind.Enum: - OpenApiObject obj = new OpenApiObject(); - obj["@odata.type"] = new OpenApiString(edmTypeReference.FullName()); + JsonObject obj = new() + { + ["@odata.type"] = edmTypeReference.FullName() + }; return obj; case EdmTypeKind.Collection: - OpenApiArray array = new OpenApiArray(); + JsonArray array = []; IEdmTypeReference elementType = edmTypeReference.AsCollection().ElementType(); array.Add(GetTypeNameForExample(elementType)); return array; @@ -180,7 +181,7 @@ private static IOpenApiAny GetTypeNameForExample(IEdmTypeReference edmTypeRefere return GetTypeNameForExample(new EdmPrimitiveTypeReference(typedef.UnderlyingType, edmTypeReference.IsNullable)); case EdmTypeKind.Untyped: - return new OpenApiObject(); + return new JsonObject(); case EdmTypeKind.EntityReference: default: diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs index 3aa432e30..085cb5bb8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.Linq; using System.Reflection; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Interfaces; @@ -109,11 +110,11 @@ private static Dictionary GetExtensions(this ODataCon { { "x-ms-generated-by", - new OpenApiObject + new OpenApiAny(new JsonObject { - { "toolName", new OpenApiString("Microsoft.OpenApi.OData") }, - { "toolVersion", new OpenApiString(Assembly.GetExecutingAssembly().GetName().Version.ToString()) } - } + { "toolName", "Microsoft.OpenApi.OData" }, + { "toolVersion", Assembly.GetExecutingAssembly().GetName().Version.ToString() } + }) } }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs index 1f92f02a8..9da525a7d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs @@ -7,7 +7,6 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.OData.Edm; using System.Linq; @@ -97,7 +96,7 @@ public static IDictionary CreateLinks(this ODataContext con { link.Parameters[pathKeyName] = new RuntimeExpressionAnyWrapper { - Any = new OpenApiString("$request.path." + pathKeyName) + Any = "$request.path." + pathKeyName }; } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 8fbe18f37..fad3e40a5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OData.Edm.Vocabularies; @@ -14,6 +13,9 @@ using Microsoft.OpenApi.OData.Vocabulary.Capabilities; using System.Diagnostics; using System; +using System.Text.Json.Nodes; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator { @@ -187,7 +189,7 @@ public static IList CreateKeyParameters(this ODataContext cont Schema = context.CreateEdmTypeSchema(keys.First().Type) }; - parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiString(entityType.Name)); + parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiAny(entityType.Name)); parameters.Add(parameter); } else @@ -212,7 +214,7 @@ public static IList CreateKeyParameters(this ODataContext cont parameter.Description += $", {keyProperty.Name}={quote}{{{parameter.Name}}}{quote}"; } - parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiString(entityType.Name)); + parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiAny(entityType.Name)); parameters.Add(parameter); } } @@ -606,7 +608,7 @@ public static OpenApiParameter CreateOrderBy(this ODataContext context, IEdmVoca return null; } - IList orderByItems = new List(); + IList orderByItems = new List(); foreach (var property in structuredType.StructuralProperties()) { if (sort != null && sort.IsNonSortableProperty(property.Name)) @@ -620,17 +622,17 @@ public static OpenApiParameter CreateOrderBy(this ODataContext context, IEdmVoca { if (isAscOnly) { - orderByItems.Add(new OpenApiString(property.Name)); + orderByItems.Add(property.Name); } else { - orderByItems.Add(new OpenApiString(property.Name + " desc")); + orderByItems.Add(property.Name + " desc"); } } else { - orderByItems.Add(new OpenApiString(property.Name)); - orderByItems.Add(new OpenApiString(property.Name + " desc")); + orderByItems.Add(property.Name); + orderByItems.Add(property.Name + " desc"); } } @@ -723,11 +725,11 @@ public static OpenApiParameter CreateSelect(this ODataContext context, IEdmVocab return null; } - IList selectItems = new List(); + IList selectItems = new List(); foreach (var property in structuredType.StructuralProperties()) { - selectItems.Add(new OpenApiString(property.Name)); + selectItems.Add(property.Name); } foreach (var property in structuredType.NavigationProperties()) @@ -737,7 +739,7 @@ public static OpenApiParameter CreateSelect(this ODataContext context, IEdmVocab continue; } - selectItems.Add(new OpenApiString(property.Name)); + selectItems.Add(property.Name); } return new OpenApiParameter @@ -829,10 +831,7 @@ public static OpenApiParameter CreateExpand(this ODataContext context, IEdmVocab return null; } - IList expandItems = new List - { - new OpenApiString("*") - }; + IList expandItems = [ "*" ]; foreach (var property in structuredType.NavigationProperties()) { @@ -841,7 +840,7 @@ public static OpenApiParameter CreateExpand(this ODataContext context, IEdmVocab continue; } - expandItems.Add(new OpenApiString(property.Name)); + expandItems.Add(property.Name); } return new OpenApiParameter diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index cf473fa08..16f4ce583 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Diagnostics; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.OData.Properties; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; @@ -17,6 +16,10 @@ using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.MicrosoftExtensions; using Microsoft.OpenApi.OData.Vocabulary.Core; +using System.Text.Json.Nodes; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Extensions; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator { @@ -315,7 +318,8 @@ public static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdm } var extension = (context.Settings.OpenApiSpecVersion == OpenApiSpecVersion.OpenApi2_0 || - context.Settings.OpenApiSpecVersion == OpenApiSpecVersion.OpenApi3_0 ) && + context.Settings.OpenApiSpecVersion == OpenApiSpecVersion.OpenApi3_0 || + context.Settings.OpenApiSpecVersion == OpenApiSpecVersion.OpenApi3_1) && context.Settings.AddEnumDescriptionExtension ? new OpenApiEnumValuesDescriptionExtension { EnumName = enumType.Name, @@ -325,7 +329,7 @@ public static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdm // Enum value is an array that contains a string with the member name for each enumeration member. foreach (IEdmEnumMember member in enumType.Members) { - schema.Enum.Add(new OpenApiString(member.Name)); + schema.Enum.Add(member.Name); AddEnumDescription(member, extension, context); } @@ -426,7 +430,7 @@ public static IDictionary CreateStructuredTypePropertiesS OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); - propertySchema.Extensions.Add(Constants.xMsNavigationProperty, new OpenApiBoolean(true)); + propertySchema.Extensions?.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); properties.Add(property.Name, propertySchema); } @@ -467,7 +471,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex Debug.Assert(context != null); Debug.Assert(structuredType != null); - IOpenApiAny example = null; + JsonNode example = null; if (context.Settings.ShowSchemaExamples) { example = CreateStructuredTypePropertiesExample(context, structuredType); @@ -486,7 +490,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex { extension = new Dictionary { - { Constants.xMsDiscriminatorValue, new OpenApiString("#" + structuredType.FullTypeName()) } + { Constants.xMsDiscriminatorValue, new OpenApiAny("#" + structuredType.FullTypeName()) } }; } @@ -548,7 +552,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex if (context.Settings.EnableDiscriminatorValue) { - OpenApiString defaultValue = null; + JsonNode defaultValue = null; bool isBaseTypeEntity = Constants.EntityName.Equals(structuredType.BaseType?.FullTypeName().Split('.').Last(), StringComparison.OrdinalIgnoreCase); bool isBaseTypeAbstractNonEntity = (structuredType.BaseType?.IsAbstract ?? false) && !isBaseTypeEntity; @@ -593,26 +597,23 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex } } - private static IOpenApiAny CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType) + private static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType) { - OpenApiObject example = new OpenApiObject(); - - IEdmEntityType entityType = structuredType as IEdmEntityType; + JsonObject example = []; // properties foreach (var property in structuredType.Properties()) { - // IOpenApiAny item; + // IOpenApiAny item; IEdmTypeReference propertyType = property.Type; - IOpenApiAny item = GetTypeNameForExample(context, propertyType); + JsonNode item = GetTypeNameForExample(context, propertyType); EdmTypeKind typeKind = propertyType.TypeKind(); - if (typeKind == EdmTypeKind.Primitive && item is OpenApiString) + if (typeKind == EdmTypeKind.Primitive && item is JsonValue jsonValue && jsonValue.TryGetValue(out string stringAny)) { - OpenApiString stringAny = item as OpenApiString; - string value = stringAny.Value; - if (entityType != null && entityType.Key().Any(k => k.Name == property.Name)) + string value = stringAny; + if (structuredType is IEdmEntityType entityType && entityType.Key().Any(k => k.Name == property.Name)) { value += " (identifier)"; } @@ -620,7 +621,7 @@ private static IOpenApiAny CreateStructuredTypePropertiesExample(ODataContext co { value += " (timestamp)"; } - item = new OpenApiString(value); + item = value; } example.Add(property.Name, item); @@ -629,7 +630,7 @@ private static IOpenApiAny CreateStructuredTypePropertiesExample(ODataContext co return example; } - private static IOpenApiAny GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference) + private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference) { switch (edmTypeReference.TypeKind()) { @@ -639,39 +640,41 @@ private static IOpenApiAny GetTypeNameForExample(ODataContext context, IEdmTypeR if (edmTypeReference.IsBoolean()) { - return new OpenApiBoolean(true); + return true; } else { if (schema.Reference != null) { - return new OpenApiString(schema.Reference.Id); + return schema.Reference.Id; } else { - return new OpenApiString(schema.Type ?? + return schema.Type.ToIdentifier() ?? (schema.AnyOf ?? Enumerable.Empty()) .Union(schema.AllOf ?? Enumerable.Empty()) .Union(schema.OneOf ?? Enumerable.Empty()) - .FirstOrDefault(static x => !string.IsNullOrEmpty(x.Format))?.Format ?? schema.Format); + .FirstOrDefault(static x => !string.IsNullOrEmpty(x.Format))?.Format ?? schema.Format; } } case EdmTypeKind.Entity: case EdmTypeKind.Complex: case EdmTypeKind.Enum: - OpenApiObject obj = new OpenApiObject(); - obj[Constants.OdataType] = new OpenApiString(edmTypeReference.FullName()); + JsonObject obj = new() + { + [Constants.OdataType] = edmTypeReference.FullName() + }; return obj; case EdmTypeKind.Collection: - OpenApiArray array = new OpenApiArray(); + JsonArray array = []; IEdmTypeReference elementType = edmTypeReference.AsCollection().ElementType(); array.Add(GetTypeNameForExample(context, elementType)); return array; case EdmTypeKind.Untyped: - return new OpenApiObject(); + return new JsonObject(); case EdmTypeKind.TypeDefinition: case EdmTypeKind.EntityReference: @@ -680,7 +683,7 @@ private static IOpenApiAny GetTypeNameForExample(ODataContext context, IEdmTypeR } } - private static IOpenApiAny CreateDefault(this IEdmStructuralProperty property) + private static JsonNode CreateDefault(this IEdmStructuralProperty property) { if (property == null || property.DefaultValueString == null) @@ -690,7 +693,7 @@ private static IOpenApiAny CreateDefault(this IEdmStructuralProperty property) if (property.Type.IsEnum()) { - return new OpenApiString(property.DefaultValueString); + return property.DefaultValueString; } if (!property.Type.IsPrimitive()) @@ -703,10 +706,9 @@ private static IOpenApiAny CreateDefault(this IEdmStructuralProperty property) { case EdmPrimitiveTypeKind.Boolean: { - bool result; - if (Boolean.TryParse(property.DefaultValueString, out result)) + if (bool.TryParse(property.DefaultValueString, out bool result)) { - return new OpenApiBoolean(result); + return result; } } break; @@ -714,10 +716,9 @@ private static IOpenApiAny CreateDefault(this IEdmStructuralProperty property) case EdmPrimitiveTypeKind.Int16: case EdmPrimitiveTypeKind.Int32: { - int result; - if (Int32.TryParse(property.DefaultValueString, out result)) + if (int.TryParse(property.DefaultValueString, out int result)) { - return new OpenApiInteger(result); + return result; } } break; @@ -738,7 +739,7 @@ private static IOpenApiAny CreateDefault(this IEdmStructuralProperty property) break; } - return new OpenApiString(property.DefaultValueString); + return property.DefaultValueString; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs index 426386b2b..1bbb583db 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs @@ -34,7 +34,7 @@ protected override void SetTags(OpenApiOperation operation) Name = tagName }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); Context.AppendTag(tag); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index 1f8d3124f..cb8599186 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -3,11 +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.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -130,12 +131,12 @@ protected override void SetExtensions(OpenApiOperation operation) { if (Context.Settings.EnablePagination && ComplexPropertySegment.Property.Type.IsCollection()) { - OpenApiObject extension = new() + JsonObject extension = new() { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + { "nextLinkName", "@odata.nextLink"}, + { "operationName", Context.Settings.PageableOperationName} }; - operation.Extensions.Add(Constants.xMsPageable, extension); + operation.Extensions.Add(Constants.xMsPageable, new OpenApiAny(extension)); base.SetExtensions(operation); } @@ -149,15 +150,7 @@ protected override void SetResponses(OpenApiOperation operation) } else { - OpenApiSchema schema = new() - { - UnresolvedReference = true, - Reference = new OpenApiReference - { - Type = ReferenceType.Schema, - Id = ComplexPropertySegment.ComplexType.FullName() - } - }; + OpenApiSchema schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); SetSingleResponse(operation, schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 69b76302b..04550745f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -3,11 +3,13 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ +using System; using System.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -93,7 +95,7 @@ protected override void SetTags(OpenApiOperation operation) }; // Use an extension for TOC (Table of Content) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); @@ -152,14 +154,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponse - { - UnresolvedReference = true, - Reference = new OpenApiReference() { - Type = ReferenceType.Response, - Id = Constants.DollarCountSchemaName - } - } + new OpenApiResponseReference(Constants.DollarCountSchemaName, null) } }; operation.AddErrorResponses(Context.Settings, false); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs index f2f0424a9..2f27652d7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs @@ -33,7 +33,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("actionImport")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("actionImport")); base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index bdaccc007..e74e3bc19 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -60,7 +60,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("action")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("action")); base.SetExtensions(operation); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index 9e36f21f4..f344f4882 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -47,7 +47,7 @@ protected override void SetParameters(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("functionImport")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("functionImport")); base.SetExtensions(operation); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs index 60184c8fe..995e3abaf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs @@ -45,7 +45,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("function")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("function")); base.SetExtensions(operation); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index 91cee642a..a6ae86caf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -130,7 +130,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) protected override void SetTags(OpenApiOperation operation) { operation.Tags = CreateTags(EdmOperationImport); - operation.Tags[0].Extensions.Add(Constants.xMsTocType, new OpenApiString("container")); + operation.Tags[0].Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); Context.AppendTag(operation.Tags[0]); base.SetTags(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index e1f05f39d..e5b01dbba 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; @@ -143,7 +144,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = tagName, }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("container")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); operation.Tags.Add(tag); Context.AppendTag(tag); @@ -320,13 +321,13 @@ protected override void SetExtensions(OpenApiOperation operation) { if (Context.Settings.EnablePagination && EdmOperation.ReturnType?.TypeKind() == EdmTypeKind.Collection) { - OpenApiObject extension = new OpenApiObject + JsonObject extension = new JsonObject { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + { "nextLinkName", "@odata.nextLink"}, + { "operationName", Context.Settings.PageableOperationName} }; - operation.Extensions.Add(Constants.xMsPageable, extension); + operation.Extensions.Add(Constants.xMsPageable, new OpenApiAny(extension)); } base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index 77aeb5d83..eb7dd9b67 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -4,9 +4,11 @@ // ------------------------------------------------------------ using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -57,12 +59,12 @@ protected override void SetExtensions(OpenApiOperation operation) { if (Context.Settings.EnablePagination) { - OpenApiObject extension = new OpenApiObject + JsonObject extension = new JsonObject { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + { "nextLinkName", "@odata.nextLink"}, + { "operationName", Context.Settings.PageableOperationName} }; - operation.Extensions.Add(Constants.xMsPageable, extension); + operation.Extensions.Add(Constants.xMsPageable, new OpenApiAny(extension)); base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs index 58c3f66d9..185c976e7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs @@ -41,7 +41,7 @@ protected override void SetTags(OpenApiOperation operation) Name = EntitySet.Name + "." + EntitySet.EntityType.Name, }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); @@ -53,7 +53,7 @@ protected override void SetTags(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("operation")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("operation")); base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 7bdd6dcf6..21f2a39cc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ @@ -88,7 +88,7 @@ protected override void SetTags(OpenApiOperation operation) }; // Use an extension for TOC (Table of Content) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 2909cd446..0f1198fba 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -1,13 +1,15 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -64,13 +66,13 @@ protected override void SetExtensions(OpenApiOperation operation) { if (!LastSegmentIsKeySegment && NavigationProperty.TargetMultiplicity() == EdmMultiplicity.Many) { - OpenApiObject extension = new OpenApiObject + JsonObject extension = new JsonObject { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + { "nextLinkName", "@odata.nextLink"}, + { "operationName", Context.Settings.PageableOperationName} }; - operation.Extensions.Add(Constants.xMsPageable, extension); + operation.Extensions.Add(Constants.xMsPageable, new OpenApiAny(extension)); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index bb065a6e0..039c38dbb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -90,7 +90,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = name }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); Context.AppendTag(tag); @@ -101,7 +101,7 @@ protected override void SetTags(OpenApiOperation operation) /// protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("operation")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("operation")); base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 864497746..0b16bf523 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -6,10 +6,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -254,7 +256,7 @@ protected override void SetTags(OpenApiOperation operation) }; if (!IsSingleElement) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("page")); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); operation.Tags.Add(tag); @@ -359,13 +361,13 @@ protected override void SetExtensions(OpenApiOperation operation) { if (Context.Settings.EnablePagination && !IsSingleElement) { - OpenApiObject extension = new() + JsonObject extension = new() { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + { "nextLinkName", "@odata.nextLink"}, + { "operationName", Context.Settings.PageableOperationName} }; - operation.Extensions.Add(Constants.xMsPageable, extension); + operation.Extensions.Add(Constants.xMsPageable, new OpenApiAny(extension)); } base.SetExtensions(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index bdbc0decc..30baf1c4d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -261,7 +261,7 @@ protected static void AppendCustomParameters(OpenApiOperation operation, IList protected override void SetExtensions(OpenApiOperation operation) { - operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiString("operation")); + operation.Extensions.Add(Constants.xMsDosOperationType, new OpenApiAny("operation")); base.SetExtensions(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs index e66675f75..19883f171 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs @@ -13,6 +13,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.OData.Vocabulary.Capabilities; +using System.Text.Json.Nodes; namespace Microsoft.OpenApi.OData.PathItem { @@ -313,15 +314,15 @@ protected override void SetExtensions(OpenApiPathItem item) if (samePaths.Any()) { - OpenApiArray array = new(); + JsonArray array = new(); OpenApiConvertSettings settings = Context.Settings.Clone(); settings.EnableKeyAsSegment = Context.KeyAsSegment; foreach (var p in samePaths) { - array.Add(new OpenApiString(p.GetPathItemName(settings))); + array.Add(p.GetPathItemName(settings)); } - item.Extensions.Add(Constants.xMsDosGroupPath, array); + item.Extensions.Add(Constants.xMsDosGroupPath, new OpenApiAny(array)); } base.SetExtensions(item); diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs index f527238e7..484e8cd02 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; @@ -83,15 +84,15 @@ protected override void SetExtensions(OpenApiPathItem item) if (samePaths.Any()) { - OpenApiArray array = new OpenApiArray(); + JsonArray array = new JsonArray(); OpenApiConvertSettings settings = Context.Settings.Clone(); settings.EnableKeyAsSegment = Context.KeyAsSegment; foreach (var p in samePaths) { - array.Add(new OpenApiString(p.GetPathItemName(settings))); + array.Add(p.GetPathItemName(settings)); } - item.Extensions.Add(Constants.xMsDosGroupPath, array); + item.Extensions.Add(Constants.xMsDosGroupPath, new OpenApiAny(array)); } base.SetExtensions(item); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs index 02385b2ed..ea6b3ccdf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs @@ -204,8 +204,8 @@ public void CreateComplexPropertyPathItemAddsCustomAttributeValuesToPathExtensio Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out IOpenApiExtension isHiddenExtension); - string isHiddenValue = (isHiddenExtension as OpenApiString)?.Value; - Assert.Equal("true", isHiddenValue); + string isHiddenValue = (isHiddenExtension as OpenApiAny).Node.GetValue(); + Assert.Equal("true", isHiddenValue); } [Theory] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs index 5a946926e..073c82199 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs @@ -281,11 +281,11 @@ public void CreateEntityPathItemAddsCustomAttributeValuesToPathExtensions() Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out IOpenApiExtension isHiddenExtension); - string isHiddenValue = (isHiddenExtension as OpenApiString)?.Value; + string isHiddenValue = (isHiddenExtension as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); pathItem.Extensions.TryGetValue("x-ms-isOwner", out IOpenApiExtension isOwnerExtension); - string isOwnerValue = (isOwnerExtension as OpenApiString)?.Value; + string isOwnerValue = (isOwnerExtension as OpenApiAny).Node.GetValue(); Assert.Equal("true", isOwnerValue); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs index 8be197a47..70596e5f7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs @@ -173,7 +173,7 @@ public void CreateEntitySetPathItemAddsCustomAttributeValuesToPathExtensions() Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out var value); - string isHiddenValue = (value as OpenApiString)?.Value; + string isHiddenValue = (value as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs index 31eddf464..32806097b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs @@ -597,7 +597,7 @@ public void CreateNavigationPropertyPathItemAddsCustomAttributeValuesToPathExten Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out var value); - string isHiddenValue = (value as OpenApiString)?.Value; + string isHiddenValue = (value as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs index 29fa676c7..5d895365c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs @@ -54,11 +54,11 @@ public void CreateODataTypeCastPathItemAddsCustomAttributeValuesToPathExtensions Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out IOpenApiExtension isHiddenExtension); - string isHiddenValue = (isHiddenExtension as OpenApiString)?.Value; + string isHiddenValue = (isHiddenExtension as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); pathItem.Extensions.TryGetValue("x-ms-workloadName", out IOpenApiExtension isOwnerExtension); - string isOwnerValue = (isOwnerExtension as OpenApiString)?.Value; + string isOwnerValue = (isOwnerExtension as OpenApiAny).Node.GetValue(); Assert.Equal("People", isOwnerValue); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs index af717784a..67591e29e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs @@ -146,7 +146,7 @@ public void CreateOperationImportPathItemAddsCustomAttributeValuesToPathExtensio Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out IOpenApiExtension isHiddenExtension); - string isHiddenValue = (isHiddenExtension as OpenApiString)?.Value; + string isHiddenValue = (isHiddenExtension as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs index 0a39fb51d..6af67477c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs @@ -121,11 +121,11 @@ public void CreateOperationPathItemAddsCustomAttributeValuesToPathExtensions(str Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out IOpenApiExtension isHiddenExtension); - string isHiddenValue = (isHiddenExtension as OpenApiString)?.Value; + string isHiddenValue = (isHiddenExtension as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); pathItem.Extensions.TryGetValue("x-ms-workloadName", out IOpenApiExtension isOwnerExtension); - string isOwnerValue = (isOwnerExtension as OpenApiString)?.Value; + string isOwnerValue = (isOwnerExtension as OpenApiAny).Node.GetValue(); Assert.Equal("People", isOwnerValue); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs index da7ef6ab1..0c2ecc1fd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs @@ -154,7 +154,7 @@ public void CreateSingletonPathItemAddsCustomAttributeValuesToPathExtensions() Assert.NotNull(pathItem.Extensions); pathItem.Extensions.TryGetValue("x-ms-isHidden", out var value); - string isHiddenValue = (value as OpenApiString)?.Value; + string isHiddenValue = (value as OpenApiAny).Node.GetValue(); Assert.Equal("true", isHiddenValue); } From 8c925885b7cd173c3ea335451e7e7e840959ac1a Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Wed, 13 Nov 2024 11:48:56 +0300 Subject: [PATCH 005/103] cleanup usings --- .../EdmModelOpenApiExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs index d3633426b..5fe3f4b07 100644 --- a/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs @@ -1,9 +1,8 @@ -// ------------------------------------------------------------ +// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Collections.Generic; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Validation; using Microsoft.OpenApi.Any; From 7f38be747ae0b9c8a5d235aaad9ef3890287b783 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 13:39:49 -0500 Subject: [PATCH 006/103] chore: updates to the latest preview --- .../Microsoft.OpenAPI.OData.Reader.csproj | 2 +- src/OoasGui/OoasGui.csproj | 2 +- .../Generator/OpenApiEdmTypeSchemaGeneratorTest.cs | 4 ++-- .../Microsoft.OpenAPI.OData.Reader.Tests.csproj | 2 +- tool/UpdateDocs/UpdateDocs.csproj | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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 267adc1ab..570d5fed4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -53,7 +53,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/OoasGui/OoasGui.csproj b/src/OoasGui/OoasGui.csproj index 3a73e7ab3..6489d12d2 100644 --- a/src/OoasGui/OoasGui.csproj +++ b/src/OoasGui/OoasGui.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 06c4eae15..b33b51124 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -546,12 +546,12 @@ public void CreateEdmTypeSchemaReturnSchemaForSingle(bool isNullable) // & Assert Assert.Null(schema.Type); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("number", StringComparison.OrdinalIgnoreCase)); + var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type != null && x.Type.HasValue && (x.Type & JsonSchemaType.Number) is JsonSchemaType.Number); Assert.NotNull(numberSchema); Assert.True(numberSchema.Nullable); Assert.Equal("float", numberSchema.Format, StringComparer.OrdinalIgnoreCase); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals("string", StringComparison.OrdinalIgnoreCase)); + var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type != null && x.Type.HasValue && (x.Type & JsonSchemaType.String) is JsonSchemaType.String); Assert.NotNull(stringSchema); Assert.True(stringSchema.Nullable); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index 212e4d3c4..85de8e598 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -73,7 +73,7 @@ all - + all diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj index fcaaa35c4..1772b839f 100644 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ b/tool/UpdateDocs/UpdateDocs.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file From 610df9bab83d57fb62798f5c6b9f1b438d5b2d3d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 14:13:59 -0500 Subject: [PATCH 007/103] fix: wrong type being emitted for singles Signed-off-by: Vincent Biret --- .../Generator/OpenApiEdmTypeSchemaGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index c471240ea..64a85c3c0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -205,7 +205,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv case EdmPrimitiveTypeKind.Single: // single schema.OneOf = new List { - new OpenApiSchema { Type = JsonSchemaType.String, Format = "float", Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.Number, Format = "float", Nullable = true }, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, new OpenApiSchemaReference(Constants.ReferenceNumericName, null) }; From 2fddd3c458f6d6061199215683fa7bdfd0b909d1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 14:24:24 -0500 Subject: [PATCH 008/103] fix: use number instead of integer Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGenerator.cs | 6 ++++-- .../Generator/OpenApiSchemaGenerator.cs | 4 ++-- src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index fad3e40a5..fbe8ea46b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -873,7 +873,8 @@ private static OpenApiParameter CreateTop(int topExample) Description = "Show only the first n items", Schema = new OpenApiSchema { - Type = JsonSchemaType.Integer, + Type = JsonSchemaType.Number, + Format = "int64", Minimum = 0, }, Example = topExample, @@ -892,7 +893,8 @@ private static OpenApiParameter CreateSkip() Description = "Skip the first n items", Schema = new OpenApiSchema { - Type = JsonSchemaType.Integer, + Type = JsonSchemaType.Number, + Format = "int64", Minimum = 0, }, Style = ParameterStyle.Form, diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 16f4ce583..a31909657 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -81,8 +81,8 @@ public static IDictionary CreateSchemas(this ODataContext if(context.Settings.EnableDollarCountPath) schemas[Constants.DollarCountSchemaName] = new OpenApiSchema { - Type = JsonSchemaType.Integer, - Format = "int32" + Type = JsonSchemaType.Number, + Format = "int64" }; schemas = schemas.Concat(context.GetAllCollectionEntityTypes() diff --git a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs index f75b535b8..9426c5e3e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs @@ -28,7 +28,7 @@ internal static class ODataConstants /// /// @odata.count KeyValue pair /// - public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Integer, Format = "int64", Nullable = true }); + public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64", Nullable = true }); /// /// @odata.deltaLink KeyValue pair From 3a62039c3e848cc66adb045d7d68253b24778f38 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 15:35:18 -0500 Subject: [PATCH 009/103] draft: passes reference to the document Signed-off-by: Vincent Biret --- .../Generator/OpenApiDocumentGenerator.cs | 12 +- .../Generator/OpenApiParameterGenerator.cs | 14 +- .../ComplexPropertyBaseOperationHandler.cs | 8 + .../ComplexPropertyGetOperationHandler.cs | 10 +- .../ComplexPropertyPatchOperationHandler.cs | 8 + .../ComplexPropertyPostOperationHandler.cs | 8 + .../ComplexPropertyPutOperationHandler.cs | 8 + .../ComplexPropertyUpdateOperationHandler.cs | 42 +++--- .../DollarCountGetOperationHandler.cs | 8 + .../EdmActionImportOperationHandler.cs | 8 + .../Operation/EdmActionOperationHandler.cs | 8 + .../EdmFunctionImportOperationHandler.cs | 8 + .../Operation/EdmFunctionOperationHandler.cs | 8 + .../EdmOperationImportOperationHandler.cs | 8 + .../Operation/EdmOperationOperationHandler.cs | 10 +- .../Operation/EntityDeleteOperationHandler.cs | 8 + .../Operation/EntityGetOperationHandler.cs | 8 + .../Operation/EntityPatchOperationHandler.cs | 8 + .../Operation/EntityPutOperationHandler.cs | 8 + .../Operation/EntitySetGetOperationHandler.cs | 10 +- .../Operation/EntitySetOperationHandler.cs | 8 + .../EntitySetPostOperationHandler.cs | 8 + .../Operation/EntityUpdateOperationHandler.cs | 8 + .../MediaEntityDeleteOperationHandler.cs | 8 + .../MediaEntityGetOperationHandler.cs | 56 ++++--- .../MediaEntityOperationalHandler.cs | 8 + .../MediaEntityPutOperationHandler.cs | 42 +++--- .../Operation/MetadataGetOperationHandler.cs | 8 + ...avigationPropertyDeleteOperationHandler.cs | 8 + .../NavigationPropertyGetOperationHandler.cs | 10 +- .../NavigationPropertyOperationHandler.cs | 140 +++++++++--------- ...NavigationPropertyPatchOperationHandler.cs | 8 + .../NavigationPropertyPostOperationHandler.cs | 30 ++-- .../NavigationPropertyPutOperationHandler.cs | 8 + ...avigationPropertyUpdateOperationHandler.cs | 8 + .../ODataTypeCastGetOperationHandler.cs | 14 +- .../Operation/OperationHandler.cs | 10 ++ .../Operation/OperationHandlerProvider.cs | 70 ++++----- .../Operation/RefDeleteOperationHandler.cs | 68 +++++---- .../Operation/RefGetOperationHandler.cs | 10 +- .../Operation/RefPostOperationHandler.cs | 8 + .../Operation/RefPutOperationHandler.cs | 8 + .../Operation/SingletonGetOperationHandler.cs | 8 + .../Operation/SingletonOperationHandler.cs | 8 + .../SingletonPatchOperationHandler.cs | 8 + 45 files changed, 561 insertions(+), 219 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index 4660cfb3c..285d3f7fe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -32,24 +32,22 @@ public static OpenApiDocument CreateDocument(this ODataContext context) // "paths": …, // "components": … // } - OpenApiDocument doc = new OpenApiDocument + OpenApiDocument doc = new() { Info = context.CreateInfo(), Servers = context.CreateServers(), - // Tags = context.CreateTags(), - - Paths = context.CreatePaths(), - Components = context.CreateComponents(), SecurityRequirements = null, - ExternalDocs = null + ExternalDocs = null, + Tags = context.CreateTags() }; - doc.Tags = context.CreateTags(); + doc.Paths = context.CreatePaths(doc); + return doc; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index fbe8ea46b..4bd386009 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -285,7 +285,7 @@ private static IList CreateAlternateKeyParameters(ODataContext /// The created list of public static List CreatePathParameters(this ODataPath path, ODataContext context) { - List pathParameters = new(); + List pathParameters = []; var parameterMappings = path.CalculateParameterMapping(context.Settings); foreach (ODataKeySegment keySegment in path.OfType()) @@ -355,16 +355,18 @@ public static void AppendParameter(this IList parameters, Open /// /// The OData context. /// The Edm annotation target. + /// The Open API document. /// The created or null. - public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target) + public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); + Utils.CheckArgumentNull(document, nameof(document)); bool? top = context.Model.GetBoolean(target, CapabilitiesConstants.TopSupported); if (top == null || top.Value) { - return new OpenApiParameterReference("top", null); + return new OpenApiParameterReference("top", document); } return null; @@ -375,17 +377,19 @@ public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabula /// /// The OData context. /// The string representation of the Edm target path. + /// The Open API document. /// - public static OpenApiParameter CreateTop(this ODataContext context, string targetPath) + public static OpenApiParameter CreateTop(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); + Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateTop(target); + return context.CreateTop(target, document); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs index 1bbb583db..290747f25 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs @@ -13,6 +13,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal abstract class ComplexPropertyBaseOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected ComplexPropertyBaseOperationHandler(OpenApiDocument document) : base(document) + { + + } protected ODataComplexPropertySegment ComplexPropertySegment; /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index cb8599186..3410ce5ab 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -18,6 +18,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyGetOperationHandler : ComplexPropertyBaseOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public ComplexPropertyGetOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; @@ -63,7 +71,7 @@ protected override void SetParameters(OpenApiOperation operation) // Capabilities.TopSupported, Capabilities.SkipSupported, Capabilities.SearchRestrictions, // Capabilities.FilterRestrictions, and Capabilities.CountRestrictions // $top - parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(ComplexPropertySegment.Property); + parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(ComplexPropertySegment.Property, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs index b95cd1c4e..43aeafa43 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs @@ -9,6 +9,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPatchOperationHandler : ComplexPropertyUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public ComplexPropertyPatchOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index b2acd31d1..23298936c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -18,6 +18,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPostOperationHandler : ComplexPropertyBaseOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public ComplexPropertyPostOperationHandler(OpenApiDocument document):base(document) + { + + } /// protected override void Initialize(ODataContext context, ODataPath path) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs index 83241ca74..3ea9d2995 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs @@ -9,6 +9,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPutOperationHandler : ComplexPropertyUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public ComplexPropertyPutOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index b6eacbef8..5a2d00984 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -17,6 +17,14 @@ namespace Microsoft.OpenApi.OData.Operation; internal abstract class ComplexPropertyUpdateOperationHandler : ComplexPropertyBaseOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected ComplexPropertyUpdateOperationHandler(OpenApiDocument document) : base(document) + { + + } private UpdateRestrictionsType _updateRestrictions; @@ -24,9 +32,9 @@ protected override void Initialize(ODataContext context, ODataPath path) { base.Initialize(context, path); - _updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); - var complexPropertyUpdateRestrictions = Context.Model.GetRecord(ComplexPropertySegment.Property, CapabilitiesConstants.UpdateRestrictions); - _updateRestrictions?.MergePropertiesIfNull(complexPropertyUpdateRestrictions); + _updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); + var complexPropertyUpdateRestrictions = Context.Model.GetRecord(ComplexPropertySegment.Property, CapabilitiesConstants.UpdateRestrictions); + _updateRestrictions?.MergePropertiesIfNull(complexPropertyUpdateRestrictions); _updateRestrictions ??= complexPropertyUpdateRestrictions; } @@ -40,7 +48,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) // OperationId if (Context.Settings.EnableOperationId) - { + { string prefix = OperationType == OperationType.Patch ? "Update" : "Set"; operation.OperationId = EdmModelHelper.GenerateComplexPropertyPathOperationId(Path, Context, prefix); } @@ -103,29 +111,29 @@ protected override void AppendCustomParameters(OpenApiOperation operation) private OpenApiSchema GetOpenApiSchema() { - var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); - if (ComplexPropertySegment.Property.Type.IsCollection()) - { + if (ComplexPropertySegment.Property.Type.IsCollection()) + { return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary - { - { + Properties = new Dictionary + { + { "value", new OpenApiSchema { Type = JsonSchemaType.Array, Items = schema - } - } + } + } } - }; - } - else - { - return schema; + }; + } + else + { + return schema; } } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 04550745f..0fa63a2da 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class DollarCountGetOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public DollarCountGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs index 2f27652d7..f85c291ff 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmActionImportOperationHandler : EdmOperationImportOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EdmActionImportOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Post; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index e74e3bc19..9c074df1f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -19,6 +19,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmActionOperationHandler : EdmOperationOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EdmActionOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Post; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index f344f4882..4e31acf92 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmFunctionImportOperationHandler : EdmOperationImportOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EdmFunctionImportOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs index 995e3abaf..559663ebf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs @@ -17,6 +17,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmFunctionOperationHandler : EdmOperationOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EdmFunctionOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index a6ae86caf..a0f5a9fa0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EdmOperationImportOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected EdmOperationImportOperationHandler(OpenApiDocument document):base(document) + { + + } private OperationRestrictionsType _operationRestriction; /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index e5b01dbba..eefa10d93 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EdmOperationOperationHandler : OperationHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use to lookup references. + protected EdmOperationOperationHandler(OpenApiDocument document) : base(document) + { + + } private OperationRestrictionsType _operationRestriction; /// @@ -234,7 +242,7 @@ private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation op if (function.ReturnType.IsCollection()) { // $top - if (Context.CreateTop(function) is OpenApiParameter topParameter) + if (Context.CreateTop(function, _document) is OpenApiParameter topParameter) { operation.Parameters.AppendParameter(topParameter); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs index 83933ba56..4dbce864e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs @@ -20,6 +20,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityDeleteOperationHandler : EntitySetOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntityDeleteOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Delete; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index 98e9fc415..b7c203295 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityGetOperationHandler : EntitySetOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntityGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs index 1110a5ad0..b99f6d559 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs @@ -14,6 +14,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityPatchOperationHandler : EntityUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntityPatchOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs index aaf1b085f..7cb79f953 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs @@ -14,6 +14,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityPutOperationHandler : EntityUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntityPutOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index eb7dd9b67..2b35ff5ae 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -24,6 +24,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntitySetGetOperationHandler : EntitySetOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntitySetGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; @@ -80,7 +88,7 @@ protected override void SetParameters(OpenApiOperation operation) // Capabilities.TopSupported, Capabilities.SkipSupported, Capabilities.SearchRestrictions, // Capabilities.FilterRestrictions, and Capabilities.CountRestrictions // $top - OpenApiParameter parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(EntitySet); + OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs index 185c976e7..7634d05c4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs @@ -17,6 +17,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EntitySetOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected EntitySetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// /// Gets/sets the . /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 99ac49f11..dfe8c3edb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -23,6 +23,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntitySetPostOperationHandler : EntitySetOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public EntitySetPostOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Post; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 1a4290837..3f05a52f3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -20,6 +20,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EntityUpdateOperationHandler : EntitySetOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected EntityUpdateOperationHandler(OpenApiDocument document):base(document) + { + + } private UpdateRestrictionsType _updateRestrictions; protected override void Initialize(ODataContext context, ODataPath path) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs index bcd947aa8..49d79e8c0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs @@ -10,6 +10,14 @@ namespace Microsoft.OpenApi.OData.Operation { internal class MediaEntityDeleteOperationHandler : MediaEntityOperationalHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public MediaEntityDeleteOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Delete; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs index 125141e98..823870fcf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs @@ -19,31 +19,39 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MediaEntityGetOperationHandler : MediaEntityOperationalHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public MediaEntityGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; private ReadRestrictionsType _readRestrictions = null; - protected override void Initialize(ODataContext context, ODataPath path) - { - base.Initialize(context, path); - - if (Property != null) - { - _readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); - if (Property is IEdmNavigationProperty) - { - var navigationReadRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.NavigationRestrictions)? - .RestrictedProperties?.FirstOrDefault()?.ReadRestrictions; - _readRestrictions?.MergePropertiesIfNull(navigationReadRestrictions); - _readRestrictions ??= navigationReadRestrictions; - } - else - { - var propertyReadRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.ReadRestrictions); - _readRestrictions?.MergePropertiesIfNull(propertyReadRestrictions); - _readRestrictions ??= propertyReadRestrictions; - } - } + protected override void Initialize(ODataContext context, ODataPath path) + { + base.Initialize(context, path); + + if (Property != null) + { + _readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); + if (Property is IEdmNavigationProperty) + { + var navigationReadRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.NavigationRestrictions)? + .RestrictedProperties?.FirstOrDefault()?.ReadRestrictions; + _readRestrictions?.MergePropertiesIfNull(navigationReadRestrictions); + _readRestrictions ??= navigationReadRestrictions; + } + else + { + var propertyReadRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.ReadRestrictions); + _readRestrictions?.MergePropertiesIfNull(propertyReadRestrictions); + _readRestrictions ??= propertyReadRestrictions; + } + } } /// @@ -51,7 +59,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) { // Summary string placeholderValue = LastSegmentIsStreamPropertySegment ? Path.LastSegment.Identifier : "media content"; - operation.Summary = _readRestrictions?.Description; + operation.Summary = _readRestrictions?.Description; operation.Summary ??= IsNavigationPropertyPath ? $"Get {placeholderValue} for the navigation property {NavigationProperty.Name} from {NavigationSourceSegment.NavigationSource.Name}" : $"Get {placeholderValue} for {NavigationSourceSegment.EntityType.Name} from {NavigationSourceSegment.Identifier}"; @@ -67,8 +75,8 @@ protected override void SetBasicInfo(OpenApiOperation operation) ?? Context.Model.GetDescriptionAnnotation(Property); } else - { - // Structural property + { + // Structural property description = _readRestrictions?.LongDescription ?? Context.Model.GetDescriptionAnnotation(Property); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 21f2a39cc..7c1e184a8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -19,6 +19,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class MediaEntityOperationalHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected MediaEntityOperationalHandler(OpenApiDocument document) : base(document) + { + + } /// /// Gets/Sets the NavigationSource segment /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index d50f33480..f4dcad98c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -21,6 +21,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MediaEntityPutOperationHandler : MediaEntityOperationalHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public MediaEntityPutOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Put; @@ -30,23 +38,23 @@ protected override void Initialize(ODataContext context, ODataPath path) { base.Initialize(context, path); - if (Property != null) - { - _updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); - if (Property is IEdmNavigationProperty) - { - var navigationUpdateRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.NavigationRestrictions)? - .RestrictedProperties?.FirstOrDefault()?.UpdateRestrictions; - _updateRestrictions?.MergePropertiesIfNull(navigationUpdateRestrictions); - _updateRestrictions ??= navigationUpdateRestrictions; - } - else - { - var propertyUpdateRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.UpdateRestrictions); - _updateRestrictions?.MergePropertiesIfNull(propertyUpdateRestrictions); - _updateRestrictions ??= propertyUpdateRestrictions; - } - } + if (Property != null) + { + _updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); + if (Property is IEdmNavigationProperty) + { + var navigationUpdateRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.NavigationRestrictions)? + .RestrictedProperties?.FirstOrDefault()?.UpdateRestrictions; + _updateRestrictions?.MergePropertiesIfNull(navigationUpdateRestrictions); + _updateRestrictions ??= navigationUpdateRestrictions; + } + else + { + var propertyUpdateRestrictions = Context.Model.GetRecord(Property, CapabilitiesConstants.UpdateRestrictions); + _updateRestrictions?.MergePropertiesIfNull(propertyUpdateRestrictions); + _updateRestrictions ??= propertyUpdateRestrictions; + } + } } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs index 22d600a30..46509783c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs @@ -14,6 +14,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MetadataGetOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public MetadataGetOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs index ad0ac7eaa..aceb4b340 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs @@ -19,6 +19,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyDeleteOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use to lookups references. + public NavigationPropertyDeleteOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Delete; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 0f1198fba..62f064f09 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -24,6 +24,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyGetOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use to lookup references. + public NavigationPropertyGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; @@ -160,7 +168,7 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. - OpenApiParameter parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(NavigationProperty); + OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 039c38dbb..2d2479ea0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class NavigationPropertyOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected NavigationPropertyOperationHandler(OpenApiDocument document):base(document) + { + + } /// /// Gets the navigation property. /// @@ -40,10 +48,10 @@ internal abstract class NavigationPropertyOperationHandler : OperationHandler /// /// Gets a bool value indicating whether the last segment is a key segment. /// - protected bool LastSegmentIsKeySegment { get; private set; } - - /// - /// Gets a bool value indicating whether the second last segment in a $ref path is a key segment + protected bool LastSegmentIsKeySegment { get; private set; } + + /// + /// Gets a bool value indicating whether the second last segment in a $ref path is a key segment /// protected bool SecondLastSegmentIsKeySegment { get; private set; } @@ -61,7 +69,7 @@ protected override void Initialize(ODataContext context, ODataPath path) NavigationSource = navigationSourceSegment.NavigationSource; LastSegmentIsKeySegment = path.LastSegment is ODataKeySegment; - LastSegmentIsRefSegment = path.LastSegment is ODataRefSegment; + LastSegmentIsRefSegment = path.LastSegment is ODataRefSegment; SecondLastSegmentIsKeySegment = Path.Segments.Reverse().Skip(1).Take(1).Single().Kind == ODataSegmentKind.Key; NavigationProperty = path.OfType().Last().NavigationProperty; @@ -117,78 +125,78 @@ protected override void SetExternalDocs(OpenApiOperation operation) if (Context.Settings.ShowExternalDocs) { var externalDocs = Context.Model.GetLinkRecord(TargetPath, CustomLinkRel) ?? - Context.Model.GetLinkRecord(NavigationProperty, CustomLinkRel); - - if (externalDocs != null) - { - operation.ExternalDocs = new OpenApiExternalDocs() - { - Description = CoreConstants.ExternalDocsDescription, - Url = externalDocs.Href - }; + Context.Model.GetLinkRecord(NavigationProperty, CustomLinkRel); + + if (externalDocs != null) + { + operation.ExternalDocs = new OpenApiExternalDocs() + { + Description = CoreConstants.ExternalDocsDescription, + Url = externalDocs.Href + }; } } - } - + } + /// /// Retrieves the CRUD restrictions annotations for the navigation property /// in context, given a capability annotation term. /// /// The fully qualified restriction annotation term. /// The restriction annotation, or null if not available. - protected IRecord GetRestrictionAnnotation(string annotationTerm) - { - switch (annotationTerm) - { - case CapabilitiesConstants.ReadRestrictions: - var readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); - readRestrictions?.MergePropertiesIfNull(Restriction?.ReadRestrictions); - readRestrictions ??= Restriction?.ReadRestrictions; - - var navPropReadRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.ReadRestrictions); - readRestrictions?.MergePropertiesIfNull(navPropReadRestrictions); - readRestrictions ??= navPropReadRestrictions; - - return readRestrictions; - case CapabilitiesConstants.UpdateRestrictions: - var updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); - updateRestrictions?.MergePropertiesIfNull(Restriction?.UpdateRestrictions); - updateRestrictions ??= Restriction?.UpdateRestrictions; - - var navPropUpdateRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.UpdateRestrictions); - updateRestrictions?.MergePropertiesIfNull(navPropUpdateRestrictions); - updateRestrictions ??= navPropUpdateRestrictions; - - return updateRestrictions; - case CapabilitiesConstants.InsertRestrictions: - var insertRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.InsertRestrictions); - insertRestrictions?.MergePropertiesIfNull(Restriction?.InsertRestrictions); - insertRestrictions ??= Restriction?.InsertRestrictions; - - var navPropInsertRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.InsertRestrictions); - insertRestrictions?.MergePropertiesIfNull(navPropInsertRestrictions); - insertRestrictions ??= navPropInsertRestrictions; - - return insertRestrictions; - case CapabilitiesConstants.DeleteRestrictions: - var deleteRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.DeleteRestrictions); - deleteRestrictions?.MergePropertiesIfNull(Restriction?.DeleteRestrictions); - deleteRestrictions ??= Restriction?.DeleteRestrictions; - - var navPropDeleteRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.DeleteRestrictions); - deleteRestrictions?.MergePropertiesIfNull(navPropDeleteRestrictions); - deleteRestrictions ??= navPropDeleteRestrictions; - - return deleteRestrictions; - default: - return null; - - } + protected IRecord GetRestrictionAnnotation(string annotationTerm) + { + switch (annotationTerm) + { + case CapabilitiesConstants.ReadRestrictions: + var readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); + readRestrictions?.MergePropertiesIfNull(Restriction?.ReadRestrictions); + readRestrictions ??= Restriction?.ReadRestrictions; + + var navPropReadRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.ReadRestrictions); + readRestrictions?.MergePropertiesIfNull(navPropReadRestrictions); + readRestrictions ??= navPropReadRestrictions; + + return readRestrictions; + case CapabilitiesConstants.UpdateRestrictions: + var updateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); + updateRestrictions?.MergePropertiesIfNull(Restriction?.UpdateRestrictions); + updateRestrictions ??= Restriction?.UpdateRestrictions; + + var navPropUpdateRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.UpdateRestrictions); + updateRestrictions?.MergePropertiesIfNull(navPropUpdateRestrictions); + updateRestrictions ??= navPropUpdateRestrictions; + + return updateRestrictions; + case CapabilitiesConstants.InsertRestrictions: + var insertRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.InsertRestrictions); + insertRestrictions?.MergePropertiesIfNull(Restriction?.InsertRestrictions); + insertRestrictions ??= Restriction?.InsertRestrictions; + + var navPropInsertRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.InsertRestrictions); + insertRestrictions?.MergePropertiesIfNull(navPropInsertRestrictions); + insertRestrictions ??= navPropInsertRestrictions; + + return insertRestrictions; + case CapabilitiesConstants.DeleteRestrictions: + var deleteRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.DeleteRestrictions); + deleteRestrictions?.MergePropertiesIfNull(Restriction?.DeleteRestrictions); + deleteRestrictions ??= Restriction?.DeleteRestrictions; + + var navPropDeleteRestrictions = Context.Model.GetRecord(NavigationProperty, CapabilitiesConstants.DeleteRestrictions); + deleteRestrictions?.MergePropertiesIfNull(navPropDeleteRestrictions); + deleteRestrictions ??= navPropDeleteRestrictions; + + return deleteRestrictions; + default: + return null; + + } } protected IDictionary GetContent(OpenApiSchema schema = null, IEnumerable mediaTypes = null) { - schema ??= GetOpenApiSchema(); + schema ??= GetOpenApiSchema(); var content = new Dictionary(); if (mediaTypes != null) @@ -215,7 +223,7 @@ protected IDictionary GetContent(OpenApiSchema schema protected OpenApiSchema GetOpenApiSchema() { - return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), null); + return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), null); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs index d018087d8..46eda3a6b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs @@ -14,6 +14,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPatchOperationHandler : NavigationPropertyUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public NavigationPropertyPatchOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs index cebb88c9a..2e0225eea 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs @@ -20,6 +20,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPostOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public NavigationPropertyPostOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Post; @@ -52,14 +60,14 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) - { - OpenApiSchema schema = null; - - if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) - { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); - } - + { + OpenApiSchema schema = null; + + if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) + { + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); + } + operation.RequestBody = new OpenApiRequestBody { Required = true, @@ -72,7 +80,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) - { + { OpenApiSchema schema = null; if (Context.Settings.EnableDerivedTypesReferencesForResponses) @@ -94,8 +102,8 @@ protected override void SetResponses(OpenApiOperation operation) operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); - } - + } + protected override void SetSecurity(OpenApiOperation operation) { if (_insertRestriction == null) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs index 31a741d08..09699293d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs @@ -14,6 +14,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPutOperationHandler : NavigationPropertyUpdateOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public NavigationPropertyPutOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs index 35a47c932..55873f0da 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs @@ -21,6 +21,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class NavigationPropertyUpdateOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected NavigationPropertyUpdateOperationHandler(OpenApiDocument document):base(document) + { + + } private UpdateRestrictionsType _updateRestriction; /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 0b16bf523..0979b89e6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -25,6 +25,14 @@ namespace Microsoft.OpenApi.OData.Operation; /// internal class ODataTypeCastGetOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public ODataTypeCastGetOperationHandler(OpenApiDocument document):base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; @@ -336,13 +344,13 @@ private IEnumerable GetParametersForAnnotableOfMany(IEdmVocabu { // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. - return new OpenApiParameter[] { - Context.CreateTop(annotable), + return [ + Context.CreateTop(annotable, _document), Context.CreateSkip(annotable), Context.CreateSearch(annotable), Context.CreateFilter(annotable), Context.CreateCount(annotable), - }; + ]; } protected override void SetSecurity(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index 30baf1c4d..8f7ac5e7d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -22,6 +22,16 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class OperationHandler : IOperationHandler { + protected readonly OpenApiDocument _document; + /// + /// Creates a new instance of class. + /// + /// Document to use to lookup references. + protected OperationHandler(OpenApiDocument document) + { + Utils.CheckArgumentNull(document, nameof(document)); + _document = document; + } /// public abstract OperationType OperationType { get; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs index a1f89807e..e967239a5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs @@ -14,105 +14,107 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class OperationHandlerProvider : IOperationHandlerProvider { - private readonly IDictionary> _handlers - = new Dictionary>{ + private static Dictionary> GetHandlers(OpenApiDocument document) + => new() + { // entity set (Get/Post) {ODataPathKind.EntitySet, new Dictionary { - {OperationType.Get, new EntitySetGetOperationHandler() }, - {OperationType.Post, new EntitySetPostOperationHandler() } + {OperationType.Get, new EntitySetGetOperationHandler(document) }, + {OperationType.Post, new EntitySetPostOperationHandler(document) } }}, // entity (Get/Patch/Put/Delete) {ODataPathKind.Entity, new Dictionary { - {OperationType.Get, new EntityGetOperationHandler() }, - {OperationType.Patch, new EntityPatchOperationHandler() }, - {OperationType.Put, new EntityPutOperationHandler() }, - {OperationType.Delete, new EntityDeleteOperationHandler() } + {OperationType.Get, new EntityGetOperationHandler(document) }, + {OperationType.Patch, new EntityPatchOperationHandler(document) }, + {OperationType.Put, new EntityPutOperationHandler(document) }, + {OperationType.Delete, new EntityDeleteOperationHandler(document) } }}, // singleton (Get/Patch) {ODataPathKind.Singleton, new Dictionary { - {OperationType.Get, new SingletonGetOperationHandler() }, - {OperationType.Patch, new SingletonPatchOperationHandler() } + {OperationType.Get, new SingletonGetOperationHandler(document) }, + {OperationType.Patch, new SingletonPatchOperationHandler(document) } }}, // edm operation (Get|Post) {ODataPathKind.Operation, new Dictionary { - {OperationType.Get, new EdmFunctionOperationHandler() }, - {OperationType.Post, new EdmActionOperationHandler() } + {OperationType.Get, new EdmFunctionOperationHandler(document) }, + {OperationType.Post, new EdmActionOperationHandler(document) } }}, // edm operation import (Get|Post) {ODataPathKind.OperationImport, new Dictionary { - {OperationType.Get, new EdmFunctionImportOperationHandler() }, - {OperationType.Post, new EdmActionImportOperationHandler() } + {OperationType.Get, new EdmFunctionImportOperationHandler(document) }, + {OperationType.Post, new EdmActionImportOperationHandler(document) } }}, // navigation property (Get/Patch/Put/Post/Delete) {ODataPathKind.NavigationProperty, new Dictionary { - {OperationType.Get, new NavigationPropertyGetOperationHandler() }, - {OperationType.Patch, new NavigationPropertyPatchOperationHandler() }, - {OperationType.Put, new NavigationPropertyPutOperationHandler() }, - {OperationType.Post, new NavigationPropertyPostOperationHandler() }, - {OperationType.Delete, new NavigationPropertyDeleteOperationHandler() } + {OperationType.Get, new NavigationPropertyGetOperationHandler(document) }, + {OperationType.Patch, new NavigationPropertyPatchOperationHandler(document) }, + {OperationType.Put, new NavigationPropertyPutOperationHandler(document) }, + {OperationType.Post, new NavigationPropertyPostOperationHandler(document) }, + {OperationType.Delete, new NavigationPropertyDeleteOperationHandler(document) } }}, // navigation property ref (Get/Post/Put/Delete) {ODataPathKind.Ref, new Dictionary { - {OperationType.Get, new RefGetOperationHandler() }, - {OperationType.Put, new RefPutOperationHandler() }, - {OperationType.Post, new RefPostOperationHandler() }, - {OperationType.Delete, new RefDeleteOperationHandler() } + {OperationType.Get, new RefGetOperationHandler(document) }, + {OperationType.Put, new RefPutOperationHandler(document) }, + {OperationType.Post, new RefPostOperationHandler(document) }, + {OperationType.Delete, new RefDeleteOperationHandler(document) } }}, // media entity operation (Get|Put|Delete) {ODataPathKind.MediaEntity, new Dictionary { - {OperationType.Get, new MediaEntityGetOperationHandler() }, - {OperationType.Put, new MediaEntityPutOperationHandler() }, - {OperationType.Delete, new MediaEntityDeleteOperationHandler() } + {OperationType.Get, new MediaEntityGetOperationHandler(document) }, + {OperationType.Put, new MediaEntityPutOperationHandler(document) }, + {OperationType.Delete, new MediaEntityDeleteOperationHandler(document) } }}, // $metadata operation (Get) {ODataPathKind.Metadata, new Dictionary { - {OperationType.Get, new MetadataGetOperationHandler() } + {OperationType.Get, new MetadataGetOperationHandler(document) } }}, // $count operation (Get) {ODataPathKind.DollarCount, new Dictionary { - {OperationType.Get, new DollarCountGetOperationHandler() } + {OperationType.Get, new DollarCountGetOperationHandler(document) } }}, // .../namespace.typename (cast, get) {ODataPathKind.TypeCast, new Dictionary { - {OperationType.Get, new ODataTypeCastGetOperationHandler() }, + {OperationType.Get, new ODataTypeCastGetOperationHandler(document) }, }}, // .../entity/propertyOfComplexType (Get/Patch/Put/Delete) {ODataPathKind.ComplexProperty, new Dictionary { - {OperationType.Get, new ComplexPropertyGetOperationHandler() }, - {OperationType.Patch, new ComplexPropertyPatchOperationHandler() }, - {OperationType.Put, new ComplexPropertyPutOperationHandler() }, - {OperationType.Post, new ComplexPropertyPostOperationHandler() } + {OperationType.Get, new ComplexPropertyGetOperationHandler(document) }, + {OperationType.Patch, new ComplexPropertyPatchOperationHandler(document) }, + {OperationType.Put, new ComplexPropertyPutOperationHandler(document) }, + {OperationType.Post, new ComplexPropertyPostOperationHandler(document) } }} }; /// public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) { - return _handlers[pathKind][operationType]; + //TODO refactor to avoid dictionary creation on each call + return GetHandlers(document)[pathKind][operationType]; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs index cd3950345..a0118de90 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs @@ -18,6 +18,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefDeleteOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public RefDeleteOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Delete; private DeleteRestrictionsType _deleteRestriction; @@ -40,21 +48,21 @@ protected override void SetBasicInfo(OpenApiOperation operation) // OperationId if (Context.Settings.EnableOperationId) { - string prefix = "DeleteRef"; + string prefix = "DeleteRef"; var segments = GetOperationId().Split('.').ToList(); - if (SecondLastSegmentIsKeySegment) - { - segments[segments.Count - 1] = Utils.ToFirstCharacterLowerCase(segments[segments.Count - 1]); - var lastSegment = prefix + Utils.UpperFirstChar(NavigationProperty.ToEntityType().Name); - segments.Add(lastSegment); - operation.OperationId = string.Join(".", segments); + if (SecondLastSegmentIsKeySegment) + { + segments[segments.Count - 1] = Utils.ToFirstCharacterLowerCase(segments[segments.Count - 1]); + var lastSegment = prefix + Utils.UpperFirstChar(NavigationProperty.ToEntityType().Name); + segments.Add(lastSegment); + operation.OperationId = string.Join(".", segments); } - else - { - var lastSegment = segments.LastOrDefault(); - segments[segments.Count - 1] = prefix + lastSegment; - operation.OperationId = string.Join(".", segments); + else + { + var lastSegment = segments.LastOrDefault(); + segments[segments.Count - 1] = prefix + lastSegment; + operation.OperationId = string.Join(".", segments); } } } @@ -73,24 +81,24 @@ protected override void SetParameters(OpenApiOperation operation) { Type = JsonSchemaType.String } - }); - - // for collection, we should have @id in query - if (NavigationProperty.TargetMultiplicity() == EdmMultiplicity.Many && - Path.Segments.Reverse().Skip(1).First() is ODataNavigationPropertySegment) - { - operation.Parameters.Add(new OpenApiParameter - { - Name = "@id", - In = ParameterLocation.Query, - Description = "The delete Uri", - Required = true, - Schema = new OpenApiSchema - { - Type = JsonSchemaType.String - } - }); - } + }); + + // for collection, we should have @id in query + if (NavigationProperty.TargetMultiplicity() == EdmMultiplicity.Many && + Path.Segments.Reverse().Skip(1).First() is ODataNavigationPropertySegment) + { + operation.Parameters.Add(new OpenApiParameter + { + Name = "@id", + In = ParameterLocation.Query, + Description = "The delete Uri", + Required = true, + Schema = new OpenApiSchema + { + Type = JsonSchemaType.String + } + }); + } } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index c3682fdda..1f5a2f7d8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefGetOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use to lookup references. + public RefGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; private ReadRestrictionsType _readRestriction; @@ -141,7 +149,7 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigaiton source. // So, how about for the navigation property. - OpenApiParameter parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(NavigationProperty); + OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index 592844c32..9032ebd5d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -18,6 +18,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefPostOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public RefPostOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Post; private InsertRestrictionsType _insertRestriction; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index b3bc77e0d..9bd4562b4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -18,6 +18,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefPutOperationHandler : NavigationPropertyOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public RefPutOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Patch; private UpdateRestrictionsType _updateRestriction; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 1b7811a63..f0a4681dc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class SingletonGetOperationHandler : SingletonOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public SingletonGetOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs index ad0b8b112..d9db1428a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs @@ -17,6 +17,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class SingletonOperationHandler : OperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + protected SingletonOperationHandler(OpenApiDocument document):base(document) + { + + } /// /// Gets the . /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index 11c0a605c..c14b7e7fc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class SingletonPatchOperationHandler : SingletonOperationHandler { + /// + /// Initializes a new instance of class. + /// + /// The document to use to lookup references. + public SingletonPatchOperationHandler(OpenApiDocument document) : base(document) + { + + } /// public override OperationType OperationType => OperationType.Patch; From e79ab34d66a8a0ca42dd629d76ca554baa8e6b8a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 15:36:28 -0500 Subject: [PATCH 010/103] chore: typo fix Signed-off-by: Vincent Biret --- .../PathItem/PathItemHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index 5cd00b386..66e8084ac 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -110,8 +110,8 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio } IOperationHandlerProvider provider = Context.OperationHanderProvider; - IOperationHandler operationHander = provider.GetHandler(Path.Kind, operationType); - item.AddOperation(operationType, operationHander.CreateOperation(Context, Path)); + IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType); + item.AddOperation(operationType, operationHandler.CreateOperation(Context, Path)); } /// From ac6ca4476b4e8f55e227ea90a6cafa528b24b7b2 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 15:36:53 -0500 Subject: [PATCH 011/103] chore: typo fix Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs | 4 ++-- .../PathItem/PathItemHandler.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index e7fab01a2..0ce261174 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -48,7 +48,7 @@ public ODataContext(IEdmModel model, OpenApiConvertSettings settings) visitor.Visit(model); IsSpatialTypeUsed = visitor.IsSpatialTypeUsed; - OperationHanderProvider = new OperationHandlerProvider(); + OperationHandlerProvider = new OperationHandlerProvider(); PathItemHanderProvider = new PathItemHandlerProvider(); // If no path provider, use the default path provider. @@ -81,7 +81,7 @@ public ODataContext(IEdmModel model, OpenApiConvertSettings settings) /// /// Gets the operation handler provider. /// - public IOperationHandlerProvider OperationHanderProvider { get; } + public IOperationHandlerProvider OperationHandlerProvider { get; } /// /// Gets the Edm model. diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index 66e8084ac..914003cf2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -109,7 +109,7 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio return; } - IOperationHandlerProvider provider = Context.OperationHanderProvider; + IOperationHandlerProvider provider = Context.OperationHandlerProvider; IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType); item.AddOperation(operationType, operationHandler.CreateOperation(Context, Path)); } From 4cbb05afb2db644073b1d80fcc1809bedba29a97 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 24 Dec 2024 15:50:49 -0500 Subject: [PATCH 012/103] chore: refactor reduces allocs Signed-off-by: Vincent Biret --- .../Operation/OperationHandlerProvider.cs | 136 +++++++----------- 1 file changed, 49 insertions(+), 87 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs index e967239a5..f5e1a4575 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs @@ -14,107 +14,69 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class OperationHandlerProvider : IOperationHandlerProvider { - private static Dictionary> GetHandlers(OpenApiDocument document) - => new() + /// + public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) + { + return (pathKind, operationType) switch { + // entity set (Get/Post) + (ODataPathKind.EntitySet, OperationType.Get) => new EntitySetGetOperationHandler(document), + (ODataPathKind.EntitySet, OperationType.Post) => new EntitySetPostOperationHandler(document), - // entity set (Get/Post) - {ODataPathKind.EntitySet, new Dictionary - { - {OperationType.Get, new EntitySetGetOperationHandler(document) }, - {OperationType.Post, new EntitySetPostOperationHandler(document) } - }}, + // entity (Get/Patch/Put/Delete) + (ODataPathKind.Entity, OperationType.Get) => new EntityGetOperationHandler(document), + (ODataPathKind.Entity, OperationType.Patch) => new EntityPatchOperationHandler(document), + (ODataPathKind.Entity, OperationType.Put) => new EntityPutOperationHandler(document), + (ODataPathKind.Entity, OperationType.Delete) => new EntityDeleteOperationHandler(document), - // entity (Get/Patch/Put/Delete) - {ODataPathKind.Entity, new Dictionary - { - {OperationType.Get, new EntityGetOperationHandler(document) }, - {OperationType.Patch, new EntityPatchOperationHandler(document) }, - {OperationType.Put, new EntityPutOperationHandler(document) }, - {OperationType.Delete, new EntityDeleteOperationHandler(document) } - }}, + // singleton (Get/Patch) + (ODataPathKind.Singleton, OperationType.Get) => new SingletonGetOperationHandler(document), + (ODataPathKind.Singleton, OperationType.Patch) => new SingletonPatchOperationHandler(document), - // singleton (Get/Patch) - {ODataPathKind.Singleton, new Dictionary - { - {OperationType.Get, new SingletonGetOperationHandler(document) }, - {OperationType.Patch, new SingletonPatchOperationHandler(document) } - }}, + // edm operation (Get|Post) + (ODataPathKind.Operation, OperationType.Get) => new EdmFunctionOperationHandler(document), + (ODataPathKind.Operation, OperationType.Post) => new EdmActionOperationHandler(document), - // edm operation (Get|Post) - {ODataPathKind.Operation, new Dictionary - { - {OperationType.Get, new EdmFunctionOperationHandler(document) }, - {OperationType.Post, new EdmActionOperationHandler(document) } - }}, + // edm operation import (Get|Post) + (ODataPathKind.OperationImport, OperationType.Get) => new EdmFunctionImportOperationHandler(document), + (ODataPathKind.OperationImport, OperationType.Post) => new EdmActionImportOperationHandler(document), - // edm operation import (Get|Post) - {ODataPathKind.OperationImport, new Dictionary - { - {OperationType.Get, new EdmFunctionImportOperationHandler(document) }, - {OperationType.Post, new EdmActionImportOperationHandler(document) } - }}, + // navigation property (Get/Patch/Put/Post/Delete) + (ODataPathKind.NavigationProperty, OperationType.Get) => new NavigationPropertyGetOperationHandler(document), + (ODataPathKind.NavigationProperty, OperationType.Patch) => new NavigationPropertyPatchOperationHandler(document), + (ODataPathKind.NavigationProperty, OperationType.Put) => new NavigationPropertyPutOperationHandler(document), + (ODataPathKind.NavigationProperty, OperationType.Post) => new NavigationPropertyPostOperationHandler(document), + (ODataPathKind.NavigationProperty, OperationType.Delete) => new NavigationPropertyDeleteOperationHandler(document), - // navigation property (Get/Patch/Put/Post/Delete) - {ODataPathKind.NavigationProperty, new Dictionary - { - {OperationType.Get, new NavigationPropertyGetOperationHandler(document) }, - {OperationType.Patch, new NavigationPropertyPatchOperationHandler(document) }, - {OperationType.Put, new NavigationPropertyPutOperationHandler(document) }, - {OperationType.Post, new NavigationPropertyPostOperationHandler(document) }, - {OperationType.Delete, new NavigationPropertyDeleteOperationHandler(document) } - }}, + // navigation property ref (Get/Post/Put/Delete) + (ODataPathKind.Ref, OperationType.Get) => new RefGetOperationHandler(document), + (ODataPathKind.Ref, OperationType.Put) => new RefPutOperationHandler(document), + (ODataPathKind.Ref, OperationType.Post) => new RefPostOperationHandler(document), + (ODataPathKind.Ref, OperationType.Delete) => new RefDeleteOperationHandler(document), - // navigation property ref (Get/Post/Put/Delete) - {ODataPathKind.Ref, new Dictionary - { - {OperationType.Get, new RefGetOperationHandler(document) }, - {OperationType.Put, new RefPutOperationHandler(document) }, - {OperationType.Post, new RefPostOperationHandler(document) }, - {OperationType.Delete, new RefDeleteOperationHandler(document) } - }}, + // media entity operation (Get|Put|Delete) + (ODataPathKind.MediaEntity, OperationType.Get) => new MediaEntityGetOperationHandler(document), + (ODataPathKind.MediaEntity, OperationType.Put) => new MediaEntityPutOperationHandler(document), + (ODataPathKind.MediaEntity, OperationType.Delete) => new MediaEntityDeleteOperationHandler(document), - // media entity operation (Get|Put|Delete) - {ODataPathKind.MediaEntity, new Dictionary - { - {OperationType.Get, new MediaEntityGetOperationHandler(document) }, - {OperationType.Put, new MediaEntityPutOperationHandler(document) }, - {OperationType.Delete, new MediaEntityDeleteOperationHandler(document) } - }}, + // $metadata operation (Get) - // $metadata operation (Get) - {ODataPathKind.Metadata, new Dictionary - { - {OperationType.Get, new MetadataGetOperationHandler(document) } - }}, + (ODataPathKind.Metadata, OperationType.Get) => new MetadataGetOperationHandler(document), - // $count operation (Get) - {ODataPathKind.DollarCount, new Dictionary - { - {OperationType.Get, new DollarCountGetOperationHandler(document) } - }}, + // $count operation (Get) + (ODataPathKind.DollarCount, OperationType.Get) => new DollarCountGetOperationHandler(document), - // .../namespace.typename (cast, get) - {ODataPathKind.TypeCast, new Dictionary - { - {OperationType.Get, new ODataTypeCastGetOperationHandler(document) }, - }}, + // .../namespace.typename (cast, get) + (ODataPathKind.TypeCast, OperationType.Get) => new ODataTypeCastGetOperationHandler(document), - // .../entity/propertyOfComplexType (Get/Patch/Put/Delete) - {ODataPathKind.ComplexProperty, new Dictionary - { - {OperationType.Get, new ComplexPropertyGetOperationHandler(document) }, - {OperationType.Patch, new ComplexPropertyPatchOperationHandler(document) }, - {OperationType.Put, new ComplexPropertyPutOperationHandler(document) }, - {OperationType.Post, new ComplexPropertyPostOperationHandler(document) } - }} - }; + // .../entity/propertyOfComplexType (Get/Patch/Put/Delete) + (ODataPathKind.ComplexProperty, OperationType.Get) => new ComplexPropertyGetOperationHandler(document), + (ODataPathKind.ComplexProperty, OperationType.Patch) => new ComplexPropertyPatchOperationHandler(document), + (ODataPathKind.ComplexProperty, OperationType.Put) => new ComplexPropertyPutOperationHandler(document), + (ODataPathKind.ComplexProperty, OperationType.Post) => new ComplexPropertyPostOperationHandler(document), - /// - public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) - { - //TODO refactor to avoid dictionary creation on each call - return GetHandlers(document)[pathKind][operationType]; + (_, _) => null, + }; } } } From e87b64cc71890e94f590873210a4bdee981a595d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 09:31:06 -0500 Subject: [PATCH 013/103] chore: typo fix Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs | 4 ++-- .../Generator/OpenApiPathItemGenerator.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index 0ce261174..d755d4caa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -49,7 +49,7 @@ public ODataContext(IEdmModel model, OpenApiConvertSettings settings) IsSpatialTypeUsed = visitor.IsSpatialTypeUsed; OperationHandlerProvider = new OperationHandlerProvider(); - PathItemHanderProvider = new PathItemHandlerProvider(); + PathItemHandlerProvider = new PathItemHandlerProvider(); // If no path provider, use the default path provider. _pathProvider = settings.PathProvider ?? new ODataPathProvider(); @@ -76,7 +76,7 @@ public ODataContext(IEdmModel model, OpenApiConvertSettings settings) /// /// Gets the path item handler provider. /// - public IPathItemHandlerProvider PathItemHanderProvider { get; } + public IPathItemHandlerProvider PathItemHandlerProvider { get; } /// /// Gets the operation handler provider. diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index 572c95f44..32760d936 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -37,7 +37,7 @@ public static IDictionary CreatePathItems(this ODataCon settings.EnableKeyAsSegment = context.KeyAsSegment; foreach (ODataPath path in context.AllPaths) { - IPathItemHandler handler = context.PathItemHanderProvider.GetHandler(path.Kind); + IPathItemHandler handler = context.PathItemHandlerProvider.GetHandler(path.Kind); if (handler == null) { continue; From 316a0fd5113eec30cdbc36cd9e00130802b21874 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 09:32:53 -0500 Subject: [PATCH 014/103] feat: draft migrates all path item handler to accept document for lookup --- .../PathItem/ComplexPropertyItemHandler.cs | 8 ++ .../PathItem/DollarCountPathItemHandler.cs | 8 ++ .../PathItem/EntityPathItemHandler.cs | 8 ++ .../PathItem/EntitySetPathItemHandler.cs | 8 ++ .../PathItem/MediaEntityPathItemHandler.cs | 8 ++ .../PathItem/MetadataPathItemHandler.cs | 8 ++ .../NavigationPropertyPathItemHandler.cs | 100 ++++++++++-------- .../PathItem/ODataTypeCastPathItemHandler.cs | 8 ++ .../OperationImportPathItemHandler.cs | 8 ++ .../PathItem/OperationPathItemHandler.cs | 8 ++ .../PathItem/PathItemHandler.cs | 12 ++- .../PathItem/RefPathItemHandler.cs | 8 ++ .../PathItem/SingletonPathItemHandler.cs | 8 ++ 13 files changed, 153 insertions(+), 47 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs index b08a22892..a3397eedb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs @@ -13,6 +13,14 @@ namespace Microsoft.OpenApi.OData.PathItem; internal class ComplexPropertyItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public ComplexPropertyItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.ComplexProperty; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs index 91509b68d..f1c124d1c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs @@ -13,6 +13,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class DollarCountPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public DollarCountPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.DollarCount; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs index 0cbbb54ce..02aef7434 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class EntityPathItemHandler : EntitySetPathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public EntityPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.Entity; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs index a6f8cb70b..57d111362 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class EntitySetPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public EntitySetPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.EntitySet; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs index 17dd2d7f1..48613a57c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs @@ -15,6 +15,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class MediaEntityPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public MediaEntityPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.MediaEntity; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs index d76496bb7..28d974e63 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs @@ -13,6 +13,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class MetadataPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public MetadataPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.Metadata; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs index 19883f171..890f24eef 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs @@ -22,6 +22,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class NavigationPropertyPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public NavigationPropertyPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.NavigationProperty; @@ -75,19 +83,19 @@ protected override void SetOperations(OpenApiPathItem item) AddGetOperation(item, restriction); // Update restrictions - UpdateRestrictionsType navPropUpdateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); - navPropUpdateRestrictions?.MergePropertiesIfNull(restriction?.UpdateRestrictions); + UpdateRestrictionsType navPropUpdateRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.UpdateRestrictions); + navPropUpdateRestrictions?.MergePropertiesIfNull(restriction?.UpdateRestrictions); navPropUpdateRestrictions ??= restriction?.UpdateRestrictions; UpdateRestrictionsType updateRestrictions = Context.Model.GetRecord(NavigationProperty); - navPropUpdateRestrictions?.MergePropertiesIfNull(updateRestrictions); + navPropUpdateRestrictions?.MergePropertiesIfNull(updateRestrictions); navPropUpdateRestrictions ??= updateRestrictions; // Insert restrictions - InsertRestrictionsType navPropInsertRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.InsertRestrictions); - navPropInsertRestrictions?.MergePropertiesIfNull(restriction?.InsertRestrictions); + InsertRestrictionsType navPropInsertRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.InsertRestrictions); + navPropInsertRestrictions?.MergePropertiesIfNull(restriction?.InsertRestrictions); navPropInsertRestrictions ??= restriction?.InsertRestrictions; InsertRestrictionsType insertRestrictions = Context.Model.GetRecord(NavigationProperty); - navPropInsertRestrictions?.MergePropertiesIfNull(insertRestrictions); + navPropInsertRestrictions?.MergePropertiesIfNull(insertRestrictions); navPropInsertRestrictions ??= insertRestrictions; // Entity insert restrictions @@ -162,11 +170,11 @@ protected override void SetOperations(OpenApiPathItem item) private void AddGetOperation(OpenApiPathItem item, NavigationPropertyRestriction restriction) { - ReadRestrictionsType navPropReadRestriction = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); - navPropReadRestriction?.MergePropertiesIfNull(restriction?.ReadRestrictions); + ReadRestrictionsType navPropReadRestriction = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); + navPropReadRestriction?.MergePropertiesIfNull(restriction?.ReadRestrictions); navPropReadRestriction ??= restriction?.ReadRestrictions; ReadRestrictionsType readRestrictions = Context.Model.GetRecord(NavigationProperty); - navPropReadRestriction?.MergePropertiesIfNull(readRestrictions); + navPropReadRestriction?.MergePropertiesIfNull(readRestrictions); navPropReadRestriction ??= readRestrictions; ReadRestrictionsType entityReadRestriction = Context.Model.GetRecord(_navPropEntityType); @@ -212,31 +220,31 @@ private void AddDeleteOperation(OpenApiPathItem item, NavigationPropertyRestrict { Debug.Assert(!LastSegmentIsRefSegment); - DeleteRestrictionsType navPropDeleteRestriction = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.DeleteRestrictions); - navPropDeleteRestriction?.MergePropertiesIfNull(restriction?.DeleteRestrictions); + DeleteRestrictionsType navPropDeleteRestriction = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.DeleteRestrictions); + navPropDeleteRestriction?.MergePropertiesIfNull(restriction?.DeleteRestrictions); navPropDeleteRestriction ??= restriction?.DeleteRestrictions; DeleteRestrictionsType insertRestrictions = Context.Model.GetRecord(NavigationProperty); - navPropDeleteRestriction?.MergePropertiesIfNull(insertRestrictions); - navPropDeleteRestriction ??= insertRestrictions; - - if (!(NavigationProperty.TargetMultiplicity() != EdmMultiplicity.Many || LastSegmentIsKeySegment)) - return; - - DeleteRestrictionsType entityDeleteRestriction = Context.Model.GetRecord(_navPropEntityType); - bool isDeletable = - (navPropDeleteRestriction == null && entityDeleteRestriction == null) || - ((entityDeleteRestriction?.IsDeletable ?? true) && - (navPropDeleteRestriction?.IsDeletable ?? true)); - + navPropDeleteRestriction?.MergePropertiesIfNull(insertRestrictions); + navPropDeleteRestriction ??= insertRestrictions; + + if (!(NavigationProperty.TargetMultiplicity() != EdmMultiplicity.Many || LastSegmentIsKeySegment)) + return; + + DeleteRestrictionsType entityDeleteRestriction = Context.Model.GetRecord(_navPropEntityType); + bool isDeletable = + (navPropDeleteRestriction == null && entityDeleteRestriction == null) || + ((entityDeleteRestriction?.IsDeletable ?? true) && + (navPropDeleteRestriction?.IsDeletable ?? true)); + if (NavigationProperty.ContainsTarget && isDeletable) - { - AddOperation(item, OperationType.Delete); + { + AddOperation(item, OperationType.Delete); } - else if (navPropDeleteRestriction?.Deletable ?? false) - { - // Add delete operation for non-contained nav. props only if explicitly set to true via annotation - // Note: Use Deletable and NOT IsDeletable - AddOperation(item, OperationType.Delete); + else if (navPropDeleteRestriction?.Deletable ?? false) + { + // Add delete operation for non-contained nav. props only if explicitly set to true via annotation + // Note: Use Deletable and NOT IsDeletable + AddOperation(item, OperationType.Delete); } return; @@ -244,22 +252,22 @@ private void AddDeleteOperation(OpenApiPathItem item, NavigationPropertyRestrict private void AddUpdateOperation(OpenApiPathItem item, UpdateRestrictionsType updateRestrictionsType) { - if (updateRestrictionsType?.IsUpdatable ?? true) - { - if (updateRestrictionsType?.IsUpdateMethodPutAndPatch == true) - { - AddOperation(item, OperationType.Put); - AddOperation(item, OperationType.Patch); - } - else if (updateRestrictionsType?.IsUpdateMethodPut == true) - { - AddOperation(item, OperationType.Put); - } - else - { - AddOperation(item, OperationType.Patch); - } - } + if (updateRestrictionsType?.IsUpdatable ?? true) + { + if (updateRestrictionsType?.IsUpdateMethodPutAndPatch == true) + { + AddOperation(item, OperationType.Put); + AddOperation(item, OperationType.Patch); + } + else if (updateRestrictionsType?.IsUpdateMethodPut == true) + { + AddOperation(item, OperationType.Put); + } + else + { + AddOperation(item, OperationType.Patch); + } + } } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs index becbb2d65..13f1b406d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs @@ -15,6 +15,14 @@ namespace Microsoft.OpenApi.OData.PathItem; /// internal class ODataTypeCastPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public ODataTypeCastPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.TypeCast; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs index b447fa1c9..e26511d5e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class OperationImportPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public OperationImportPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.OperationImport; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs index 484e8cd02..775816da8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs @@ -19,6 +19,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class OperationPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public OperationPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.Operation; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index 914003cf2..7ab2e4baa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -18,6 +18,16 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal abstract class PathItemHandler : IPathItemHandler { + private readonly OpenApiDocument _document; + /// + /// Initializes a new instance of the class. + /// + /// The document to use to lookup references. + protected PathItemHandler(OpenApiDocument document) + { + Utils.CheckArgumentNull(document, nameof(document)); + _document = document; + } /// /// Gets the handler path kind. /// @@ -110,7 +120,7 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio } IOperationHandlerProvider provider = Context.OperationHandlerProvider; - IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType); + IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType, _document); item.AddOperation(operationType, operationHandler.CreateOperation(Context, Path)); } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs index c5d59673b..6b2450925 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs @@ -19,6 +19,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class RefPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public RefPathItemHandler(OpenApiDocument document) : base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.Ref; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs index 7e38a3912..5715c8cba 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs @@ -16,6 +16,14 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class SingletonPathItemHandler : PathItemHandler { + /// + /// Initializes a new instance of the class. + /// + /// The document to use for references lookup. + public SingletonPathItemHandler(OpenApiDocument document): base(document) + { + + } /// protected override ODataPathKind HandleKind => ODataPathKind.Singleton; From a4df88bce1a79043c1a412b7a2b8ff4cdb1c448a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 09:38:24 -0500 Subject: [PATCH 015/103] feat: lookup document is being passed to all handlers Signed-off-by: Vincent Biret --- .../Generator/OpenApiPathItemGenerator.cs | 5 ++- .../Generator/OpenApiPathsGenerator.cs | 7 ++-- .../Operation/IOperationHandlerProvider.cs | 3 +- .../Operation/OperationHandlerProvider.cs | 2 +- .../PathItem/IPathItemHandlerProvider.cs | 4 +- .../PathItem/PathItemHandlerProvider.cs | 39 +++++++++---------- 6 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index 32760d936..4b3611eef 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -22,8 +22,9 @@ internal static class OpenApiPathItemGenerator /// Create a map of . /// /// The OData context. + /// The Open API document to use to lookup references. /// The created map of . - public static IDictionary CreatePathItems(this ODataContext context) + public static IDictionary CreatePathItems(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); @@ -37,7 +38,7 @@ public static IDictionary CreatePathItems(this ODataCon settings.EnableKeyAsSegment = context.KeyAsSegment; foreach (ODataPath path in context.AllPaths) { - IPathItemHandler handler = context.PathItemHandlerProvider.GetHandler(path.Kind); + IPathItemHandler handler = context.PathItemHandlerProvider.GetHandler(path.Kind, document); if (handler == null) { continue; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs index 49ebe109b..f9b631ced 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs @@ -22,16 +22,17 @@ internal static class OpenApiPathsGenerator /// and whose value is a Path Item Object. /// /// The OData context. + /// The Open API document to use to lookup references. /// The created object. - public static OpenApiPaths CreatePaths(this ODataContext context) + public static OpenApiPaths CreatePaths(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); // Due to the power and flexibility of OData a full representation of all service capabilities // in the Paths Object is typically not feasible, so this mapping only describes the minimum // information desired in the Paths Object. - OpenApiPaths paths = new(); - foreach (var item in context.CreatePathItems()) + OpenApiPaths paths = []; + foreach (var item in context.CreatePathItems(document)) { paths.Add(item.Key, item.Value); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs index ed65dbe27..0c311836c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs @@ -18,7 +18,8 @@ internal interface IOperationHandlerProvider /// /// The path kind. /// The operation type. + /// The Open API document to use to lookup references. /// The corresponding . - IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType); + IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType, OpenApiDocument document); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs index f5e1a4575..92c4f131a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation internal class OperationHandlerProvider : IOperationHandlerProvider { /// - public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) + public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType, OpenApiDocument document) { return (pathKind, operationType) switch { diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs index 7c5b509fe..5e6a39ffb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs @@ -3,6 +3,7 @@ // 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 @@ -16,7 +17,8 @@ internal interface IPathItemHandlerProvider /// Get the based on the path type. /// /// The path kind. + /// The Open API document to use to lookup references. /// The . - IPathItemHandler GetHandler(ODataPathKind pathKind); + IPathItemHandler GetHandler(ODataPathKind pathKind, OpenApiDocument document); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs index a675615c1..90c82c47a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs @@ -3,7 +3,7 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Collections.Generic; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; namespace Microsoft.OpenApi.OData.PathItem @@ -13,52 +13,49 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class PathItemHandlerProvider : IPathItemHandlerProvider { - private readonly IDictionary _handlers = new Dictionary + /// + public IPathItemHandler GetHandler(ODataPathKind pathKind, OpenApiDocument document) { + return pathKind switch { // EntitySet - { ODataPathKind.EntitySet, new EntitySetPathItemHandler() }, + ODataPathKind.EntitySet => new EntitySetPathItemHandler(document), // Entity - { ODataPathKind.Entity, new EntityPathItemHandler() }, + ODataPathKind.Entity => new EntityPathItemHandler(document), // Singleton - { ODataPathKind.Singleton, new SingletonPathItemHandler() }, + ODataPathKind.Singleton => new SingletonPathItemHandler(document), // Navigation property - { ODataPathKind.NavigationProperty, new NavigationPropertyPathItemHandler() }, + ODataPathKind.NavigationProperty => new NavigationPropertyPathItemHandler(document), // Edm Operation - { ODataPathKind.Operation, new OperationPathItemHandler() }, + ODataPathKind.Operation => new OperationPathItemHandler(document), // Edm OperationImport - { ODataPathKind.OperationImport, new OperationImportPathItemHandler() }, + ODataPathKind.OperationImport => new OperationImportPathItemHandler(document), // Edm Ref - { ODataPathKind.Ref, new RefPathItemHandler() }, + ODataPathKind.Ref => new RefPathItemHandler(document), // Media Entity - { ODataPathKind.MediaEntity, new MediaEntityPathItemHandler() }, + ODataPathKind.MediaEntity => new MediaEntityPathItemHandler(document), // $Metadata - { ODataPathKind.Metadata, new MetadataPathItemHandler() }, + ODataPathKind.Metadata => new MetadataPathItemHandler(document), // $count - { ODataPathKind.DollarCount, new DollarCountPathItemHandler() }, + ODataPathKind.DollarCount => new DollarCountPathItemHandler(document), // ~/groups/{id}/members/microsoft.graph.user - { ODataPathKind.TypeCast, new ODataTypeCastPathItemHandler() }, + ODataPathKind.TypeCast => new ODataTypeCastPathItemHandler(document), // ~/users/{id}/mailboxSettings - { ODataPathKind.ComplexProperty, new ComplexPropertyItemHandler() }, + ODataPathKind.ComplexProperty => new ComplexPropertyItemHandler(document), // Unknown - { ODataPathKind.Unknown, null }, - }; - - /// - public IPathItemHandler GetHandler(ODataPathKind pathKind) - { - return _handlers[pathKind]; + _ => null, + }; } } } From 2758496a444713dc1e13849305a22f4a954e7284 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 09:38:48 -0500 Subject: [PATCH 016/103] chore: adds defensive programming Signed-off-by: Vincent Biret --- .../Generator/OpenApiPathsGenerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs index f9b631ced..811fef695 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs @@ -27,6 +27,7 @@ internal static class OpenApiPathsGenerator public static OpenApiPaths CreatePaths(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); // Due to the power and flexibility of OData a full representation of all service capabilities // in the Paths Object is typically not feasible, so this mapping only describes the minimum From b1942fcb191dbcef5f5d2c87ae5f2a91f535eb87 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 09:50:20 -0500 Subject: [PATCH 017/103] feat; passes document to the remaining parameter references methods Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGenerator.cs | 49 ++++++++++++------- .../ComplexPropertyGetOperationHandler.cs | 8 +-- .../DollarCountGetOperationHandler.cs | 4 +- .../Operation/EdmOperationOperationHandler.cs | 8 +-- .../Operation/EntitySetGetOperationHandler.cs | 8 +-- .../NavigationPropertyGetOperationHandler.cs | 8 +-- .../ODataTypeCastGetOperationHandler.cs | 8 +-- .../Operation/RefGetOperationHandler.cs | 8 +-- 8 files changed, 58 insertions(+), 43 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 4bd386009..9274052d9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -377,7 +377,7 @@ public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabula /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document. + /// The Open API document to use to build references. /// public static OpenApiParameter CreateTop(this ODataContext context, string targetPath, OpenApiDocument document) { @@ -397,16 +397,18 @@ public static OpenApiParameter CreateTop(this ODataContext context, string targe /// /// The OData context. /// The Edm annotation target. + /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target) + public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); + Utils.CheckArgumentNull(document, nameof(document)); bool? skip = context.Model.GetBoolean(target, CapabilitiesConstants.SkipSupported); if (skip == null || skip.Value) { - return new OpenApiParameterReference("skip", null); + return new OpenApiParameterReference("skip", document); } return null; @@ -417,17 +419,19 @@ public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabul /// /// The OData context. /// The string representation of the Edm target path. + /// The Open API document to use to build references. /// - public static OpenApiParameter CreateSkip(this ODataContext context, string targetPath) + public static OpenApiParameter CreateSkip(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); + Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateSkip(target); + return context.CreateSkip(target, document); } /// @@ -435,16 +439,18 @@ public static OpenApiParameter CreateSkip(this ODataContext context, string targ /// /// The OData context. /// The Edm annotation target. + /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target) + public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); + Utils.CheckArgumentNull(document, nameof(document)); SearchRestrictionsType search = context.Model.GetRecord(target, CapabilitiesConstants.SearchRestrictions); if (search == null || search.IsSearchable) { - return new OpenApiParameterReference("search", null); + return new OpenApiParameterReference("search", document); } return null; @@ -454,17 +460,19 @@ public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocab /// /// The OData context. /// The string representation of the Edm target path. + /// The Open API document to use to build references. /// - public static OpenApiParameter CreateSearch(this ODataContext context, string targetPath) + public static OpenApiParameter CreateSearch(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); + Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateSearch(target); + return context.CreateSearch(target, document); } /// @@ -472,16 +480,18 @@ public static OpenApiParameter CreateSearch(this ODataContext context, string ta /// /// The OData context. /// The Edm annotation target. + /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target) + public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); + Utils.CheckArgumentNull(document, nameof(document)); CountRestrictionsType count = context.Model.GetRecord(target, CapabilitiesConstants.CountRestrictions); if (count == null || count.IsCountable) { - return new OpenApiParameterReference("count", null); + return new OpenApiParameterReference("count", document); } return null; @@ -492,17 +502,19 @@ public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabu /// /// The OData context. /// The string representation of the Edm target path. + /// The Open API document to use to build references. /// - public static OpenApiParameter CreateCount(this ODataContext context, string targetPath) + public static OpenApiParameter CreateCount(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); + Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateCount(target); + return context.CreateCount(target, document); } /// @@ -510,16 +522,18 @@ public static OpenApiParameter CreateCount(this ODataContext context, string tar /// /// The OData context. /// The Edm annotation target. + /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target) + public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); + Utils.CheckArgumentNull(document, nameof(document)); FilterRestrictionsType filter = context.Model.GetRecord(target, CapabilitiesConstants.FilterRestrictions); if (filter == null || filter.IsFilterable) { - return new OpenApiParameterReference("filter", null); + return new OpenApiParameterReference("filter", document); } return null; @@ -530,8 +544,9 @@ public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocab /// /// The OData context. /// The string representation of the Edm target path. + /// The Open API document to use to build references. /// - public static OpenApiParameter CreateFilter(this ODataContext context, string targetPath) + public static OpenApiParameter CreateFilter(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -540,7 +555,7 @@ public static OpenApiParameter CreateFilter(this ODataContext context, string ta if (target == null) return null; - return context.CreateFilter(target); + return context.CreateFilter(target, document); } public static OpenApiParameter CreateOrderBy(this ODataContext context, string targetPath, IEdmEntityType entityType) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index 3410ce5ab..49ed6fcd3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -78,28 +78,28 @@ protected override void SetParameters(OpenApiOperation operation) } // $skip - parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(ComplexPropertySegment.Property); + parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(ComplexPropertySegment.Property, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $search - parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(ComplexPropertySegment.Property); + parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(ComplexPropertySegment.Property, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $filter - parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(ComplexPropertySegment.Property); + parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(ComplexPropertySegment.Property, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $count - parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(ComplexPropertySegment.Property); + parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(ComplexPropertySegment.Property, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 0fa63a2da..3196bc3b1 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -182,13 +182,13 @@ protected override void SetParameters(OpenApiOperation operation) OpenApiParameter parameter; - parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(annotatable); + parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(annotatable, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(annotatable); + parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(annotatable, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index eefa10d93..813c4deaa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -248,25 +248,25 @@ private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation op } // $skip - if (Context.CreateSkip(function) is OpenApiParameter skipParameter) + if (Context.CreateSkip(function, _document) is OpenApiParameter skipParameter) { operation.Parameters.AppendParameter(skipParameter); } // $search - if (Context.CreateSearch(function) is OpenApiParameter searchParameter) + if (Context.CreateSearch(function, _document) is OpenApiParameter searchParameter) { operation.Parameters.AppendParameter(searchParameter); } // $filter - if (Context.CreateFilter(function) is OpenApiParameter filterParameter) + if (Context.CreateFilter(function, _document) is OpenApiParameter filterParameter) { operation.Parameters.AppendParameter(filterParameter); } // $count - if (Context.CreateCount(function) is OpenApiParameter countParameter) + if (Context.CreateCount(function, _document) is OpenApiParameter countParameter) { operation.Parameters.AppendParameter(countParameter); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index 2b35ff5ae..740653603 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -95,28 +95,28 @@ protected override void SetParameters(OpenApiOperation operation) } // $skip - parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(EntitySet); + parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $search - parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(EntitySet); + parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $filter - parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(EntitySet); + parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); } // $count - parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(EntitySet); + parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 62f064f09..8eb6e73b8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -174,25 +174,25 @@ protected override void SetParameters(OpenApiOperation operation) operation.Parameters.Add(parameter); } - parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(NavigationProperty); + parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(NavigationProperty); + parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(NavigationProperty); + parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(NavigationProperty); + parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 0979b89e6..9404d6db5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -346,10 +346,10 @@ private IEnumerable GetParametersForAnnotableOfMany(IEdmVocabu // So, how about for the navigation property. return [ Context.CreateTop(annotable, _document), - Context.CreateSkip(annotable), - Context.CreateSearch(annotable), - Context.CreateFilter(annotable), - Context.CreateCount(annotable), + Context.CreateSkip(annotable, _document), + Context.CreateSearch(annotable, _document), + Context.CreateFilter(annotable, _document), + Context.CreateCount(annotable, _document), ]; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index 1f5a2f7d8..db0579be4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -155,25 +155,25 @@ protected override void SetParameters(OpenApiOperation operation) operation.Parameters.Add(parameter); } - parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(NavigationProperty); + parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(NavigationProperty); + parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(NavigationProperty); + parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(NavigationProperty); + parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); From 9ffffb0016d5189714ab741d193b61d2c570a875 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 10:01:59 -0500 Subject: [PATCH 018/103] fix: adds missing document references to all unit tests Signed-off-by: Vincent Biret --- .../Generator/OpenApiPathItemGeneratorTests.cs | 16 +++++++++++----- .../Generator/OpenApiPathsGeneratorTests.cs | 16 +++++++++++----- .../ComplexPropertyGetOperationHandlerTests.cs | 2 +- .../ComplexPropertyPatchOperationHandlerTests.cs | 2 +- .../ComplexPropertyPostOperationHandlerTests.cs | 2 +- .../ComplexPropertyPutOperationHandlerTests.cs | 2 +- .../DollarCountGetOperationHandlerTests.cs | 2 +- .../EdmActionImportOperationHandlerTests.cs | 2 +- .../Operation/EdmActionOperationHandlerTests.cs | 2 +- .../EdmFunctionImportOperationHandlerTests.cs | 2 +- .../EdmFunctionOperationHandlerTests.cs | 2 +- .../EntityDeleteOperationHandlerTests.cs | 2 +- .../Operation/EntityGetOperationHandlerTests.cs | 2 +- .../EntityPatchOperationHandlerTests.cs | 2 +- .../Operation/EntityPutOperationHandlerTests.cs | 2 +- .../EntitySetGetOperationHandlerTests.cs | 2 +- .../EntitySetPostOperationHandlerTests.cs | 12 ++++++------ .../MediaEntityDeleteOperationHandlerTests.cs | 2 +- .../MediaEntityGetOperationHandlerTests.cs | 2 +- .../MediaEntityPutOperationHandlerTests.cs | 2 +- ...igationPropertyDeleteOperationHandlerTests.cs | 2 +- ...NavigationPropertyGetOperationHandlerTests.cs | 2 +- ...vigationPropertyPatchOperationHandlerTests.cs | 2 +- ...avigationPropertyPostOperationHandlerTests.cs | 2 +- ...NavigationPropertyPutOperationHandlerTests.cs | 2 +- .../ODataTypeCastGetOperationHandlerTests.cs | 2 +- .../Operation/OperationHandlerProviderTests.cs | 3 ++- .../Operation/RefDeleteOperationHandlerTests.cs | 2 +- .../Operation/RefGetOperationHandlerTests.cs | 2 +- .../Operation/RefPostOperationHandlerTests.cs | 2 +- .../Operation/RefPutOperationHandlerTests.cs | 2 +- .../SingletonGetOperationHandlerTests.cs | 2 +- .../SingletonPatchOperationHandlerTests.cs | 2 +- .../ComplexPropertyPathItemHandlerTests.cs | 2 +- .../PathItem/EntityPathItemHandlerTests.cs | 6 +++++- .../PathItem/EntitySetPathItemHandlerTests.cs | 4 ++-- .../PathItem/MediaEntityPathItemHandlerTests.cs | 4 ++-- .../NavigationPropertyPathItemHandlerTests.cs | 2 +- .../ODataTypeCastPathItemHandlerTests.cs | 2 +- .../OperationImportPathItemHandlerTests.cs | 4 ++-- .../PathItem/OperationPathItemHandlerTests.cs | 2 +- .../PathItem/PathItemHandlerProviderTests.cs | 7 +++++-- .../PathItem/RefPathItemHandlerTests.cs | 2 +- .../PathItem/SingletonPathItemHandlerTests.cs | 6 +++++- 44 files changed, 85 insertions(+), 61 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs index 134befc9a..00ef2f08a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs @@ -9,6 +9,7 @@ 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; @@ -22,10 +23,11 @@ public class OpenApiPathItemGeneratorTest public void CreatePathItemsThrowArgumentNullContext() { // Arrange + OpenApiDocument openApiDocument = new(); ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreatePathItems()); + Assert.Throws("context", () => context.CreatePathItems(openApiDocument)); } [Fact] @@ -33,10 +35,11 @@ public void CreatePathItemsReturnsForEmptyModel() { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; + OpenApiDocument openApiDocument = new(); ODataContext context = new ODataContext(model); // Act - var pathItems = context.CreatePathItems(); + var pathItems = context.CreatePathItems(openApiDocument); // Assert Assert.NotNull(pathItems); @@ -50,6 +53,7 @@ public void CreatePathItemsReturnsForBasicModel(bool useAnnotationToGeneratePath { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new OpenApiConvertSettings { EnableKeyAsSegment = true, @@ -58,7 +62,7 @@ public void CreatePathItemsReturnsForBasicModel(bool useAnnotationToGeneratePath ODataContext context = new ODataContext(model, settings); // Act - var pathItems = context.CreatePathItems(); + var pathItems = context.CreatePathItems(openApiDocument); // Assert Assert.NotNull(pathItems); @@ -115,6 +119,7 @@ public void CreatePathItemsReturnsForEscapeFunctionModel(bool enableEscaped, boo { // Arrange EdmModel model = new EdmModel(); + OpenApiDocument openApiDocument = new(); EdmEntityType customer = new EdmEntityType("NS", "Customer"); customer.AddKeys(customer.AddStructuralProperty("ID", EdmPrimitiveTypeKind.Int32)); model.AddElement(customer); @@ -144,7 +149,7 @@ public void CreatePathItemsReturnsForEscapeFunctionModel(bool enableEscaped, boo ODataContext context = new ODataContext(model, settings); // Act - var pathItems = context.CreatePathItems(); + var pathItems = context.CreatePathItems(openApiDocument); // Assert Assert.NotNull(pathItems); @@ -161,6 +166,7 @@ public void CreatePathItemsDoesNotAddPathItemEntryForPathItemsWithNoOperations() { // Arrange EdmModel model = new(); + OpenApiDocument openApiDocument = new(); EdmEntityType customer = new("NS", "Customer"); customer.AddKeys(customer.AddStructuralProperty("ID", EdmPrimitiveTypeKind.Int32)); model.AddElement(customer); @@ -199,7 +205,7 @@ public void CreatePathItemsDoesNotAddPathItemEntryForPathItemsWithNoOperations() ODataContext context = new(model); // Act - var pathItems = context.CreatePathItems(); + var pathItems = context.CreatePathItems(openApiDocument); // Assert Assert.NotNull(pathItems); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs index d643dc089..351238731 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs @@ -5,6 +5,7 @@ using System; using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -19,10 +20,11 @@ public class OpenApiPathsGeneratorTest public void CreatePathsThrowArgumentNullContext() { // Arrange + OpenApiDocument openApiDocument = new(); ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreatePaths()); + Assert.Throws("context", () => context.CreatePaths(openApiDocument)); } [Fact] @@ -30,10 +32,11 @@ public void CreatePathsReturnsForEmptyModel() { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; + OpenApiDocument openApiDocument = new(); ODataContext context = new ODataContext(model); // Act - var paths = context.CreatePaths(); + var paths = context.CreatePaths(openApiDocument); // Assert Assert.NotNull(paths); @@ -47,6 +50,7 @@ public void CreatePathsReturnsForBasicModel(bool useAnnotationToGeneratePath, in { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new OpenApiConvertSettings { EnableKeyAsSegment = true, @@ -55,7 +59,7 @@ public void CreatePathsReturnsForBasicModel(bool useAnnotationToGeneratePath, in ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(); + var paths = context.CreatePaths(openApiDocument); // Assert Assert.NotNull(paths); @@ -106,6 +110,7 @@ public void CreatePathsReturnsForBasicModelWithPrefix(bool useAnnotationToGenera { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new OpenApiConvertSettings { EnableKeyAsSegment = true, @@ -115,7 +120,7 @@ public void CreatePathsReturnsForBasicModelWithPrefix(bool useAnnotationToGenera ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(); + var paths = context.CreatePaths(openApiDocument); // Assert Assert.NotNull(paths); @@ -164,6 +169,7 @@ public void CreatePathsReturnsForContractModelWithHierarhicalClass() { // Arrange IEdmModel model = EdmModelHelper.ContractServiceModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new OpenApiConvertSettings { EnableKeyAsSegment = true, @@ -172,7 +178,7 @@ public void CreatePathsReturnsForContractModelWithHierarhicalClass() ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(); + var paths = context.CreatePaths(openApiDocument); // Assert Assert.NotNull(paths); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs index 1290934e8..2f784fb9b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyGetOperationHandlerTests { - private readonly ComplexPropertyGetOperationHandler _operationHandler = new(); + private readonly ComplexPropertyGetOperationHandler _operationHandler = new(new()); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs index c1679481a..a7ea353a9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPatchOperationHandlerTests { - private readonly ComplexPropertyPatchOperationHandler _operationHandler = new(); + private readonly ComplexPropertyPatchOperationHandler _operationHandler = new(new()); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs index 20abd2110..908f0b6df 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPostOperationHandlerTests { - private readonly ComplexPropertyPostOperationHandler _operationHandler = new(); + private readonly ComplexPropertyPostOperationHandler _operationHandler = new(new()); [Fact] public void CreateComplexPropertyPostOperationThrowsForSingle() { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs index 84f7e9fa2..a6edc48e6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPutOperationHandlerTests { - private readonly ComplexPropertyPutOperationHandler _operationHandler = new(); + private readonly ComplexPropertyPutOperationHandler _operationHandler = new(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs index f2ca5ddf9..7f093ddbd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class DollarCountGetOperationHandlerTests { - private readonly DollarCountGetOperationHandler _operationHandler = new(); + private readonly DollarCountGetOperationHandler _operationHandler = new(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs index acb5f3a72..2ec163ecf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmActionImportOperationHandlerTests { - private EdmActionImportOperationHandler _operationHandler = new EdmActionImportOperationHandler(); + private EdmActionImportOperationHandler _operationHandler = new EdmActionImportOperationHandler(new()); [Fact] public void CreateOperationForEdmActionImportReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index 0dc4cb819..f5cdd8a01 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmActionOperationHandlerTests { - private EdmActionOperationHandler _operationHandler = new EdmActionOperationHandler(); + private EdmActionOperationHandler _operationHandler = new EdmActionOperationHandler(new()); [Fact] public void CreateOperationForEdmActionReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index 8869dd6df..3315b9c26 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmFunctionImportOperationHandlerTests { - private EdmFunctionImportOperationHandler _operationHandler = new EdmFunctionImportOperationHandler(); + private EdmFunctionImportOperationHandler _operationHandler = new EdmFunctionImportOperationHandler(new()); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index f92a23831..16b954ff1 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmFunctionOperationHandlerTests { - private EdmFunctionOperationHandler _operationHandler = new(); + private EdmFunctionOperationHandler _operationHandler = new(new()); #region OperationHandlerTests [Fact] public void SetsDeprecationInformation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index 8e3590869..bfe83848a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityDeleteOperationHandlerTests { - private EntityDeleteOperationHandler _operationHandler = new EntityDeleteOperationHandler(); + private EntityDeleteOperationHandler _operationHandler = new EntityDeleteOperationHandler(new()); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index b5d275ed4..aea2b617e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityGetOperationHandlerTests { - private EntityGetOperationHandler _operationHandler = new EntityGetOperationHandler(); + private EntityGetOperationHandler _operationHandler = new EntityGetOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index 5534a8713..4d783260c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityPatchOperationHandlerTests { - private EntityPatchOperationHandler _operationHandler = new EntityPatchOperationHandler(); + private EntityPatchOperationHandler _operationHandler = new EntityPatchOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index 96634cd4c..1e3d63192 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityPutOperationHandlerTests { - private EntityPutOperationHandler _operationHandler = new EntityPutOperationHandler(); + private EntityPutOperationHandler _operationHandler = new EntityPutOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index 74e270fec..2f9b4a8a6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntitySetGetOperationHandlerTests { - private EntitySetGetOperationHandler _operationHandler = new EntitySetGetOperationHandler(); + private EntitySetGetOperationHandler _operationHandler = new EntitySetGetOperationHandler(new()); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index 61ace688d..96c7d27da 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntitySetPostOperationHandlerTests { - private EntitySetPostOperationHandler _operationHandler = new EntitySetPostOperationHandler(); + private EntitySetPostOperationHandler _operationHandler = new EntitySetPostOperationHandler(new()); [Theory] [InlineData(true, true, true)] @@ -226,8 +226,8 @@ public void CreateEntitySetPostReturnsSecurityForInsertRestrictions(bool enableA { Assert.Empty(post.Security); } - } - + } + [Fact] public void CreateEntitySetPostOperationReturnsCorrectOperationWithAnnotatedRequestBodyAndResponseContent() { @@ -235,8 +235,8 @@ public void CreateEntitySetPostOperationReturnsCorrectOperationWithAnnotatedRequ OpenApiConvertSettings settings = new(); ODataContext context = new(model, settings); IEdmEntitySet entitySet = model.EntityContainer.FindEntitySet("directoryObjects"); - Assert.NotNull(entitySet); - + Assert.NotNull(entitySet); + ODataPath path = new(new ODataNavigationSourceSegment(entitySet)); // Act @@ -244,7 +244,7 @@ public void CreateEntitySetPostOperationReturnsCorrectOperationWithAnnotatedRequ // Assert Assert.NotNull(operation.RequestBody); - Assert.Equal("multipart/form-data", operation.RequestBody.Content.First().Key); + Assert.Equal("multipart/form-data", operation.RequestBody.Content.First().Key); Assert.NotNull(operation.Responses); Assert.Equal("multipart/form-data", operation.Responses.First().Value.Content.First().Key); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs index 3819e89ae..19709d2ef 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityDeleteOperationHandlerTests { - private readonly MediaEntityDeleteOperationHandler _operationalHandler = new MediaEntityDeleteOperationHandler(); + private readonly MediaEntityDeleteOperationHandler _operationalHandler = new MediaEntityDeleteOperationHandler(new()); [Fact] public void CreateMediaEntityPropertyDeleteOperationWithTargetPathAnnotationsReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index 527149f71..86f7e44e9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityGetOperationHandlerTests { - private readonly MediaEntityGetOperationHandler _operationalHandler = new MediaEntityGetOperationHandler(); + private readonly MediaEntityGetOperationHandler _operationalHandler = new MediaEntityGetOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index 9dc2f99e3..bbeca1071 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityPutOperationHandlerTests { - private readonly MediaEntityPutOperationHandler _operationalHandler = new MediaEntityPutOperationHandler(); + private readonly MediaEntityPutOperationHandler _operationalHandler = new MediaEntityPutOperationHandler(new()); [Theory] [InlineData(true, false)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs index 3b4d65ed8..bdc016d54 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyDeleteOperationHandlerTests { - private NavigationPropertyDeleteOperationHandler _operationHandler = new NavigationPropertyDeleteOperationHandler(); + private NavigationPropertyDeleteOperationHandler _operationHandler = new NavigationPropertyDeleteOperationHandler(new()); [Theory] [InlineData(true, false)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index 8e5d9d6aa..524e1fbda 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyGetOperationHandlerTests { - private NavigationPropertyGetOperationHandler _operationHandler = new NavigationPropertyGetOperationHandler(); + private NavigationPropertyGetOperationHandler _operationHandler = new NavigationPropertyGetOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index 9dad564b8..58e66c9e6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPatchOperationHandlerTests { - private NavigationPropertyPatchOperationHandler _operationHandler = new NavigationPropertyPatchOperationHandler(); + private NavigationPropertyPatchOperationHandler _operationHandler = new NavigationPropertyPatchOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index 47e23bd7f..09b3b1678 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPostOperationHandlerTests { - private NavigationPropertyPostOperationHandler _operationHandler = new NavigationPropertyPostOperationHandler(); + private NavigationPropertyPostOperationHandler _operationHandler = new NavigationPropertyPostOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index 91f1763ae..b4574cb1a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPutOperationHandlerTests { - private NavigationPropertyPutOperationHandler _operationHandler = new NavigationPropertyPutOperationHandler(); + private NavigationPropertyPutOperationHandler _operationHandler = new NavigationPropertyPutOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index 3a3e11099..1d14bfded 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ODataTypeCastGetOperationHandlerTests { - private readonly ODataTypeCastGetOperationHandler _operationHandler = new (); + private readonly ODataTypeCastGetOperationHandler _operationHandler = new (new()); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs index 985fad60f..2e3f3289f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs @@ -39,10 +39,11 @@ public class OperationHandlerProviderTests public void GetHandlerReturnsCorrectOperationHandlerType(ODataPathKind pathKind, OperationType operationType, Type handlerType) { // Arrange + OpenApiDocument openApiDocument = new(); OperationHandlerProvider provider = new OperationHandlerProvider(); // Act - IOperationHandler hander = provider.GetHandler(pathKind, operationType); + IOperationHandler hander = provider.GetHandler(pathKind, operationType, openApiDocument); // Assert Assert.Same(handlerType, hander.GetType()); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs index 66cf5a138..f998b304b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefDeleteOperationHandlerTests { - private RefDeleteOperationHandler _operationHandler = new RefDeleteOperationHandler(); + private RefDeleteOperationHandler _operationHandler = new RefDeleteOperationHandler(new()); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs index 029b1f379..b0009cd48 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefGetOperationHandlerTests { - private RefGetOperationHandler _operationHandler = new RefGetOperationHandler(); + private RefGetOperationHandler _operationHandler = new RefGetOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs index 1f0cd91ea..07abb9fc6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefPostOperationHandlerTests { - private RefPostOperationHandler _operationHandler = new RefPostOperationHandler(); + private RefPostOperationHandler _operationHandler = new RefPostOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs index 7e734fe13..174621c70 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefPutOperationHandlerTests { - private RefPutOperationHandler _operationHandler = new RefPutOperationHandler(); + private RefPutOperationHandler _operationHandler = new RefPutOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index b5c691bf6..5654a1a89 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class SingletonGetOperationHandlerTests { - private SingletonGetOperationHandler _operationHandler = new SingletonGetOperationHandler(); + private SingletonGetOperationHandler _operationHandler = new SingletonGetOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index ca8d3f7ab..9661742c4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class SingletonPatchOperationHandlerTests { - private SingletonPatchOperationHandler _operationHandler = new SingletonPatchOperationHandler(); + private SingletonPatchOperationHandler _operationHandler = new SingletonPatchOperationHandler(new()); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs index ea6b3ccdf..7b8f6447d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests; public class ComplexPropertyPathItemHandlerTests { - private readonly ComplexPropertyItemHandler _pathItemHandler = new(); + private readonly ComplexPropertyItemHandler _pathItemHandler = new(new()); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs index 073c82199..47a5a9d31 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class EntityPathItemHandlerTests { - private EntityPathItemHandler _pathItemHandler = new MyEntityPathItemHandler(); + private EntityPathItemHandler _pathItemHandler = new MyEntityPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() @@ -292,6 +292,10 @@ public void CreateEntityPathItemAddsCustomAttributeValuesToPathExtensions() internal class MyEntityPathItemHandler : EntityPathItemHandler { + public MyEntityPathItemHandler(OpenApiDocument document) : base(document) + { + + } protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { item.AddOperation(operationType, new OpenApiOperation()); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs index 70596e5f7..290f53751 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class EntitySetPathItemHandlerTests { - private EntitySetPathItemHandler _pathItemHandler = new MyEntitySetPathItemHandler(); + private EntitySetPathItemHandler _pathItemHandler = new MyEntitySetPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() @@ -214,7 +214,7 @@ public static IEdmModel GetEdmModel(string annotation, string target = "\"NS.Def } } - internal class MyEntitySetPathItemHandler : EntitySetPathItemHandler + internal class MyEntitySetPathItemHandler(OpenApiDocument document) : EntitySetPathItemHandler(document) { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs index 7ed6f8d82..d7496a20b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class MediaEntityPathItemHandlerTests { - private readonly MediaEntityPathItemHandler _pathItemHandler = new MyMediaEntityPathItemHandler(); + private readonly MediaEntityPathItemHandler _pathItemHandler = new MyMediaEntityPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() @@ -313,7 +313,7 @@ private IEdmModel GetEdmModel(string annotation, string targetPathAnnotation = " } } - internal class MyMediaEntityPathItemHandler : MediaEntityPathItemHandler + internal class MyMediaEntityPathItemHandler(OpenApiDocument document) : MediaEntityPathItemHandler(document) { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs index 32806097b..f3a0aa86a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class NavigationPropertyPathItemHandlerTest { - private NavigationPropertyPathItemHandler _pathItemHandler = new NavigationPropertyPathItemHandler(); + private NavigationPropertyPathItemHandler _pathItemHandler = new NavigationPropertyPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs index 5d895365c..e3ccdec56 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class ODataTypeCastPathItemHandlerTests { - private readonly ODataTypeCastPathItemHandler _pathItemHandler = new(); + private readonly ODataTypeCastPathItemHandler _pathItemHandler = new(new()); [Fact] public void CreateODataTypeCastPathItemAddsCustomAttributeValuesToPathExtensions() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs index 67591e29e..280885a34 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class OperationImportPathItemHandlerTest { - private OperationImportPathItemHandler _pathItemHandler = new MyOperationImportPathItemHandler(); + private OperationImportPathItemHandler _pathItemHandler = new MyOperationImportPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() @@ -187,7 +187,7 @@ public static IEdmModel GetEdmModel(string annotation) } } - internal class MyOperationImportPathItemHandler : OperationImportPathItemHandler + internal class MyOperationImportPathItemHandler(OpenApiDocument document) : OperationImportPathItemHandler(document) { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs index 6af67477c..3167d196f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class OperationPathItemHandlerTest { - private OperationPathItemHandler _pathItemHandler = new OperationPathItemHandler(); + private OperationPathItemHandler _pathItemHandler = new OperationPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs index b5218abb9..1754701aa 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Xunit; @@ -27,9 +28,10 @@ public void GetHandlerReturnsCorrectHandlerType(ODataPathKind pathKind, Type han { // Arrange PathItemHandlerProvider provider = new PathItemHandlerProvider(); + OpenApiDocument openApiDocument = new OpenApiDocument(); // Act - IPathItemHandler hander = provider.GetHandler(pathKind); + IPathItemHandler hander = provider.GetHandler(pathKind, openApiDocument); // Assert Assert.Same(handlerType, hander.GetType()); @@ -40,9 +42,10 @@ public void GetHandlerReturnsNullForUnknownPathKind() { // Arrange PathItemHandlerProvider provider = new PathItemHandlerProvider(); + OpenApiDocument openApiDocument = new OpenApiDocument(); // Act - IPathItemHandler hander = provider.GetHandler(ODataPathKind.Unknown); + IPathItemHandler hander = provider.GetHandler(ODataPathKind.Unknown, openApiDocument); // Assert Assert.Null(hander); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs index 878570465..48baaf766 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class RefPathItemHandlerTest { - private RefPathItemHandler _pathItemHandler = new RefPathItemHandler(); + private RefPathItemHandler _pathItemHandler = new RefPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs index 0c2ecc1fd..b94e63efc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class SingletonPathItemHandlerTest { - private SingletonPathItemHandler _pathItemHandler = new MySingletonPathItemHandler(); + private SingletonPathItemHandler _pathItemHandler = new MySingletonPathItemHandler(new()); [Fact] public void CreatePathItemThrowsForNullContext() @@ -191,6 +191,10 @@ private IEdmModel GetEdmModel(string annotation) internal class MySingletonPathItemHandler : SingletonPathItemHandler { + public MySingletonPathItemHandler(OpenApiDocument document) : base(document) + { + + } protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { item.AddOperation(operationType, new OpenApiOperation()); From e3126ad44607fa80e145ea56a7d4768c6c9e2411 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 10:25:34 -0500 Subject: [PATCH 019/103] fix: wrong type-format pair Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGeneratorTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 93c51417c..a240c8a3a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -132,7 +132,7 @@ public void CreateParametersReturnsCreatedParameters() } [Fact] - public void CanSeralizeAsYamlFromTheCreatedParameters() + public void CanSerializeAsYamlFromTheCreatedParameters() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -154,7 +154,8 @@ public void CanSeralizeAsYamlFromTheCreatedParameters() explode: false schema: minimum: 0 - type: integer + type: number + format: int64 ".ChangeLineBreaks(), yaml); } From 41b787ee3c48bbb7cac325c155732b60d3ea0ce1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 10:27:47 -0500 Subject: [PATCH 020/103] fix: additional format fixes Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGeneratorTests.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index a240c8a3a..4a9062987 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -57,7 +57,8 @@ public void CreateParametersReturnsCreatedParameters() ""explode"": false, ""schema"": { ""minimum"": 0, - ""type"": ""integer"" + ""type"": ""number"", + ""format"": ""int64"" }, ""example"": 50 }"; @@ -75,7 +76,8 @@ public void CreateParametersReturnsCreatedParameters() ""explode"": false, ""schema"": { ""minimum"": 0, - ""type"": ""integer"" + ""type"": ""number"", + ""format"": ""int64"" } }"; From b462c7f3e2d52b914060ca46e5a2085f1fde5027 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 12:31:08 -0500 Subject: [PATCH 021/103] chore: linting Signed-off-by: Vincent Biret --- .../Operation/ODataTypeCastGetOperationHandlerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index 1d14bfded..3bd0a3f03 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -120,7 +120,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN Assert.Single(operation.Extensions); //deprecated Assert.Equal(2, operation.Responses.Count); - Assert.Equal(new string[] { "200", "default" }, operation.Responses.Select(e => e.Key)); + Assert.Equal(["200", "default"], operation.Responses.Select(e => e.Key)); if (enableOperationId) { From 7194ad6d1164738b73a8cdb0d19d85cbf704a537 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 27 Dec 2024 13:23:24 -0500 Subject: [PATCH 022/103] fix: passes remaining document references where required --- .../Common/EdmModelHelper.cs | 6 +- .../Generator/OpenApiComponentsGenerator.cs | 9 +- .../Generator/OpenApiDocumentGenerator.cs | 3 +- .../OpenApiEdmTypeSchemaGenerator.cs | 84 ++++----- .../Generator/OpenApiErrorSchemaGenerator.cs | 26 +-- .../Generator/OpenApiParameterGenerator.cs | 36 ++-- .../Generator/OpenApiRequestBodyGenerator.cs | 32 ++-- .../Generator/OpenApiResponseGenerator.cs | 52 +++--- .../Generator/OpenApiSchemaGenerator.cs | 82 +++++---- .../OpenApiSpatialTypeSchemaGenerator.cs | 127 ++++++++------ .../ComplexPropertyGetOperationHandler.cs | 2 +- .../ComplexPropertyPostOperationHandler.cs | 2 +- .../ComplexPropertyUpdateOperationHandler.cs | 2 +- .../EdmActionImportOperationHandler.cs | 2 +- .../Operation/EdmActionOperationHandler.cs | 2 +- .../EdmFunctionImportOperationHandler.cs | 4 +- .../EdmOperationImportOperationHandler.cs | 2 +- .../Operation/EdmOperationOperationHandler.cs | 2 +- .../Operation/EntityGetOperationHandler.cs | 4 +- .../EntitySetPostOperationHandler.cs | 4 +- .../Operation/EntityUpdateOperationHandler.cs | 4 +- .../MediaEntityPutOperationHandler.cs | 2 +- .../NavigationPropertyGetOperationHandler.cs | 4 +- .../NavigationPropertyOperationHandler.cs | 2 +- .../NavigationPropertyPostOperationHandler.cs | 4 +- ...avigationPropertyUpdateOperationHandler.cs | 2 +- .../ODataTypeCastGetOperationHandler.cs | 4 +- .../Operation/OperationHandler.cs | 2 +- .../Operation/SingletonGetOperationHandler.cs | 4 +- .../SingletonPatchOperationHandler.cs | 4 +- .../PathItem/PathItemHandler.cs | 2 +- .../OpenApiComponentsGeneratorTests.cs | 7 +- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 32 ++-- .../OpenApiErrorSchemaGeneraratorTests.cs | 4 +- .../OpenApiParameterGeneratorTests.cs | 14 +- .../OpenApiRequestBodyGeneratorTests.cs | 12 +- .../OpenApiResponseGeneratorTests.cs | 160 +++++++++--------- .../Generator/OpenApiSchemaGeneratorTests.cs | 58 ++++--- .../OpenApiSpatialTypeSchemaGeneratorTest.cs | 38 ++--- 39 files changed, 455 insertions(+), 387 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs index 8ef0dbf35..44b7d2ac9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs @@ -22,7 +22,7 @@ internal static class EdmModelHelper /// Adds the derived types references together with their base type reference in the OneOf property of an OpenAPI schema. /// /// The OpenAPI schema with the list of derived types references and their base type references set in the OneOf property. - internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType structuredType, IEdmModel edmModel) + internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType structuredType, IEdmModel edmModel, OpenApiDocument document) { Utils.CheckArgumentNull(structuredType, nameof(structuredType)); Utils.CheckArgumentNull(edmModel, nameof(edmModel)); @@ -40,12 +40,12 @@ internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType OneOf = new List() }; - OpenApiSchema baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), null); + OpenApiSchema baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), document); schema.OneOf.Add(baseTypeSchema); foreach (IEdmSchemaElement derivedType in derivedTypes) { - OpenApiSchema derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), null); + OpenApiSchema derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), document); schema.OneOf.Add(derivedTypeSchema); }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index 14ff0c218..9d1685b04 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -20,8 +20,9 @@ internal static class OpenApiComponentsGenerator /// It holds maps of reusable schemas describing message bodies, operation parameters, and responses. /// /// The OData to Open API context. + /// The Open API document. /// The created object. - public static OpenApiComponents CreateComponents(this ODataContext context) + public static OpenApiComponents CreateComponents(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); @@ -36,7 +37,7 @@ public static OpenApiComponents CreateComponents(this ODataContext context) // The value of schemas is a map of Schema Objects. // Each entity type, complex type, enumeration type, and type definition directly // or indirectly used in the paths field is represented as a name/value pair of the schemas map. - Schemas = context.CreateSchemas(), + Schemas = context.CreateSchemas(document), // The value of parameters is a map of Parameter Objects. // It allows defining query options and headers that can be reused across operations of the service. @@ -44,11 +45,11 @@ public static OpenApiComponents CreateComponents(this ODataContext context) // The value of responses is a map of Response Objects. // It allows defining responses that can be reused across operations of the service. - Responses = context.CreateResponses(), + Responses = context.CreateResponses(document), // The value of requestBodies is a map of RequestBody Objects. // It allows refining request bodies that can be reused across operations of the service. - RequestBodies = context.CreateRequestBodies(), + RequestBodies = context.CreateRequestBodies(document), Examples = context.CreateExamples(), diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index 285d3f7fe..6b63337a5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -38,14 +38,13 @@ public static OpenApiDocument CreateDocument(this ODataContext context) Servers = context.CreateServers(), - Components = context.CreateComponents(), - SecurityRequirements = null, ExternalDocs = null, Tags = context.CreateTags() }; + doc.Components = context.CreateComponents(doc); doc.Paths = context.CreatePaths(doc); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 64a85c3c0..9b1bbb681 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -27,11 +27,13 @@ internal static class OpenApiEdmTypeSchemaGenerator /// /// The OData context. /// The Edm type reference. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference) + public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(edmTypeReference, nameof(edmTypeReference)); + Utils.CheckArgumentNull(document, nameof(document)); switch (edmTypeReference.TypeKind()) { @@ -42,8 +44,8 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT IEdmTypeReference typeRef = edmTypeReference.AsCollection().ElementType(); OpenApiSchema schema; schema = typeRef.TypeKind() == EdmTypeKind.Complex || typeRef.TypeKind() == EdmTypeKind.Entity - ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), true) - : context.CreateEdmTypeSchema(typeRef); + ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), document, true) + : context.CreateEdmTypeSchema(typeRef, document); return new OpenApiSchema { @@ -56,22 +58,22 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT // or as external references for types defined in referenced CSDL documents. case EdmTypeKind.Complex: case EdmTypeKind.Entity: - return context.CreateStructuredTypeSchema(edmTypeReference.AsStructured()); + return context.CreateStructuredTypeSchema(edmTypeReference.AsStructured(), document); case EdmTypeKind.Enum: - return context.CreateEnumTypeSchema(edmTypeReference.AsEnum()); + return context.CreateEnumTypeSchema(edmTypeReference.AsEnum(), document); // Primitive properties of type Edm.PrimitiveType, Edm.Stream, and any of the Edm.Geo* types are // represented as Schema Objects that are JSON References to definitions in the Definitions Object case EdmTypeKind.Primitive: IEdmPrimitiveTypeReference primitiveTypeReference = (IEdmPrimitiveTypeReference)edmTypeReference; - return context.CreateSchema(primitiveTypeReference); + return context.CreateSchema(primitiveTypeReference, document); case EdmTypeKind.TypeDefinition: - return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType); + return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, document); case EdmTypeKind.EntityReference: - return context.CreateTypeDefinitionSchema(edmTypeReference.AsTypeDefinition()); + return context.CreateTypeDefinitionSchema(edmTypeReference.AsTypeDefinition(), document); case EdmTypeKind.Untyped: return new OpenApiSchema(); @@ -87,13 +89,15 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT /// /// The OData context. /// The Edm primitive reference. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType) + public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); + Utils.CheckArgumentNull(document, nameof(document)); - OpenApiSchema schema = context.CreateSchema(primitiveType.PrimitiveDefinition()); + OpenApiSchema schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document); if (schema != null) { switch(primitiveType.PrimitiveKind()) @@ -146,11 +150,13 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv /// /// The OData context. /// The Edm primitive type. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType) + public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); + Utils.CheckArgumentNull(document, nameof(document)); // Spec has different configure for double, AnyOf or OneOf? OpenApiSchema schema = new OpenApiSchema @@ -199,7 +205,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv { new OpenApiSchema { Type = JsonSchemaType.Number, Format = "double", Nullable = true }, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, - new OpenApiSchemaReference(Constants.ReferenceNumericName, null) + new OpenApiSchemaReference(Constants.ReferenceNumericName, document) }; break; case EdmPrimitiveTypeKind.Single: // single @@ -207,7 +213,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv { new OpenApiSchema { Type = JsonSchemaType.Number, Format = "float", Nullable = true }, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, - new OpenApiSchemaReference(Constants.ReferenceNumericName, null) + new OpenApiSchemaReference(Constants.ReferenceNumericName, document) }; break; case EdmPrimitiveTypeKind.Guid: // guid @@ -272,52 +278,52 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv break; case EdmPrimitiveTypeKind.Geography: - schema = new OpenApiSchemaReference("Edm.Geography", null); + schema = new OpenApiSchemaReference("Edm.Geography", document); break; case EdmPrimitiveTypeKind.GeographyPoint: - schema = new OpenApiSchemaReference("Edm.GeographyPoint", null); + schema = new OpenApiSchemaReference("Edm.GeographyPoint", document); break; case EdmPrimitiveTypeKind.GeographyLineString: - schema = new OpenApiSchemaReference("Edm.GeographyLineString", null); + schema = new OpenApiSchemaReference("Edm.GeographyLineString", document); break; case EdmPrimitiveTypeKind.GeographyPolygon: - schema = new OpenApiSchemaReference("Edm.GeographyPolygon", null); + schema = new OpenApiSchemaReference("Edm.GeographyPolygon", document); break; case EdmPrimitiveTypeKind.GeographyCollection: - schema = new OpenApiSchemaReference("Edm.GeographyCollection", null); + schema = new OpenApiSchemaReference("Edm.GeographyCollection", document); break; case EdmPrimitiveTypeKind.GeographyMultiPolygon: - schema = new OpenApiSchemaReference("Edm.GeographyMultiPolygon", null); + schema = new OpenApiSchemaReference("Edm.GeographyMultiPolygon", document); break; case EdmPrimitiveTypeKind.GeographyMultiLineString: - schema = new OpenApiSchemaReference("Edm.GeographyMultiLineString", null); + schema = new OpenApiSchemaReference("Edm.GeographyMultiLineString", document); break; case EdmPrimitiveTypeKind.GeographyMultiPoint: - schema = new OpenApiSchemaReference("Edm.GeographyMultiPoint", null); + schema = new OpenApiSchemaReference("Edm.GeographyMultiPoint", document); break; case EdmPrimitiveTypeKind.Geometry: // Geometry - schema = new OpenApiSchemaReference("Edm.Geometry", null); + schema = new OpenApiSchemaReference("Edm.Geometry", document); break; case EdmPrimitiveTypeKind.GeometryPoint: - schema = new OpenApiSchemaReference("Edm.GeometryPoint", null); + schema = new OpenApiSchemaReference("Edm.GeometryPoint", document); break; case EdmPrimitiveTypeKind.GeometryLineString: - schema = new OpenApiSchemaReference("Edm.GeometryLineString", null); + schema = new OpenApiSchemaReference("Edm.GeometryLineString", document); break; case EdmPrimitiveTypeKind.GeometryPolygon: - schema = new OpenApiSchemaReference("Edm.GeometryPolygon", null); + schema = new OpenApiSchemaReference("Edm.GeometryPolygon", document); break; case EdmPrimitiveTypeKind.GeometryCollection: - schema = new OpenApiSchemaReference("Edm.GeometryCollection", null); + schema = new OpenApiSchemaReference("Edm.GeometryCollection", document); break; case EdmPrimitiveTypeKind.GeometryMultiPolygon: - schema = new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null); + schema = new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); break; case EdmPrimitiveTypeKind.GeometryMultiLineString: - schema = new OpenApiSchemaReference("Edm.GeometryMultiLineString", null); + schema = new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); break; case EdmPrimitiveTypeKind.GeometryMultiPoint: - schema = new OpenApiSchemaReference("Edm.GeometryMultiPoint", null); + schema = new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); break; case EdmPrimitiveTypeKind.None: @@ -328,7 +334,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv return schema; } - private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference) + private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(typeReference != null); @@ -340,7 +346,7 @@ private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEd { schema.AnyOf = new List { - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null), + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), new OpenApiSchema { Type = JsonSchemaType.Object, @@ -352,17 +358,18 @@ private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEd { schema.Type = null; schema.AnyOf = null; - schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null); + schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); schema.Nullable = typeReference.IsNullable; } return schema; } - private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, bool isTypeCollection = false) + private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, OpenApiDocument document, bool isTypeCollection = false) { Debug.Assert(context != null); Debug.Assert(typeReference != null); + Debug.Assert(document != null); OpenApiSchema schema = new OpenApiSchema(); @@ -376,7 +383,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex schema.Reference = null; schema.AnyOf = new List { - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null), + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), new OpenApiSchema { Type = JsonSchemaType.Object, @@ -388,17 +395,18 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex { schema.Type = null; schema.AnyOf = null; - schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), null); + schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); schema.Nullable = typeReference.IsNullable; } return schema; } - private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference) + private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(reference != null); + Debug.Assert(document != null); OpenApiSchema schema = new OpenApiSchema(); schema.Reference = null; @@ -407,7 +415,7 @@ private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext contex { schema.AnyOf = new List { - new OpenApiSchemaReference(reference.Definition.FullTypeName(), null), + new OpenApiSchemaReference(reference.Definition.FullTypeName(), document), new OpenApiSchema { Type = JsonSchemaType.Object, @@ -419,7 +427,7 @@ private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext contex { schema.Type = null; schema.AnyOf = null; - schema = new OpenApiSchemaReference(reference.Definition.FullTypeName(), null); + schema = new OpenApiSchemaReference(reference.Definition.FullTypeName(), document); schema.Nullable = reference.IsNullable; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index 407813a68..94393a7d8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -31,18 +31,19 @@ internal static class OpenApiErrorSchemaGenerator /// The value of each pair is a . /// /// The OData to Open API context. + /// The Open API document to lookup references. /// The string/schema dictionary. - public static IDictionary CreateODataErrorSchemas(this ODataContext context) + public static IDictionary CreateODataErrorSchemas(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); var rootNamespaceName = context.GetErrorNamespaceName(); return new Dictionary() { - { $"{rootNamespaceName}{ODataErrorClassName}", CreateErrorSchema(rootNamespaceName) }, - { $"{rootNamespaceName}{MainErrorClassName}", CreateErrorMainSchema(rootNamespaceName) }, + { $"{rootNamespaceName}{ODataErrorClassName}", CreateErrorSchema(rootNamespaceName, document) }, + { $"{rootNamespaceName}{MainErrorClassName}", CreateErrorMainSchema(rootNamespaceName, document) }, { $"{rootNamespaceName}{ErrorDetailsClassName}", CreateErrorDetailSchema() }, - { $"{rootNamespaceName}{InnerErrorClassName}", CreateInnerErrorSchema(context) } + { $"{rootNamespaceName}{InnerErrorClassName}", CreateInnerErrorSchema(context, document) } }; } @@ -64,7 +65,8 @@ public static string GetErrorNamespaceName(this ODataContext context) { /// /// The created . /// The root namespace name. With a trailing dot. - public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) + /// The Open API document to lookup references. + public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiDocument document) { return new OpenApiSchema { @@ -77,7 +79,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) { { "error", - new OpenApiSchemaReference($"{rootNamespaceName}{MainErrorClassName}", null) + new OpenApiSchemaReference($"{rootNamespaceName}{MainErrorClassName}", document) } } }; @@ -88,8 +90,9 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) /// Otherwise, a default inner error type of object will be created. /// /// The OData to Open API context. + /// The Open API document to lookup references. /// The inner error schema definition. - public static OpenApiSchema CreateInnerErrorSchema(ODataContext context) + public static OpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); @@ -98,7 +101,7 @@ public static OpenApiSchema CreateInnerErrorSchema(ODataContext context) !string.IsNullOrEmpty(rootNamespace) && context.Model.FindDeclaredType($"{rootNamespace}.{context.Settings.InnerErrorComplexTypeName}") is IEdmComplexType complexType) { - return context.CreateSchemaTypeSchema(complexType); + return context.CreateSchemaTypeSchema(complexType, document); } return new OpenApiSchema @@ -112,8 +115,9 @@ public static OpenApiSchema CreateInnerErrorSchema(ODataContext context) /// Create for main property of the error. /// /// The root namespace name. With a trailing dot. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName) + public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName, OpenApiDocument document) { return new OpenApiSchema { @@ -139,12 +143,12 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName) new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference($"{rootNamespaceName}{ErrorDetailsClassName}", null) + Items = new OpenApiSchemaReference($"{rootNamespaceName}{ErrorDetailsClassName}", document) } }, { "innerError", - new OpenApiSchemaReference($"{rootNamespaceName}{InnerErrorClassName}", null) + new OpenApiSchemaReference($"{rootNamespaceName}{InnerErrorClassName}", document) } } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 9274052d9..1a9c72e7e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -51,13 +51,15 @@ public static IDictionary CreateParameters(this ODataC /// /// The OData context. /// The Edm function import. + /// The Open API document to lookup references. /// The created list of . - public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport) + public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(functionImport, nameof(functionImport)); + Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateParameters(functionImport.Function); + return context.CreateParameters(functionImport.Function, document); } /// @@ -65,13 +67,16 @@ public static IList CreateParameters(this ODataContext context /// /// The OData context. /// The Edm function. + /// The Open API document to lookup references. /// The parameter name mapping. /// The created list of . public static IList CreateParameters(this ODataContext context, IEdmFunction function, + OpenApiDocument document, IDictionary parameterNameMapping = null) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(function, nameof(function)); + Utils.CheckArgumentNull(document, nameof(document)); IList parameters = new List(); int skip = function.IsBound ? 1 : 0; @@ -131,7 +136,7 @@ public static IList CreateParameters(this ODataContext context Name = parameterNameMapping == null ? edmParameter.Name : parameterNameMapping[edmParameter.Name], In = isOptionalParameter ? ParameterLocation.Query : ParameterLocation.Path, Required = !isOptionalParameter, - Schema = context.CreateEdmTypeSchema(edmParameter.Type) + Schema = context.CreateEdmTypeSchema(edmParameter.Type, document) }; } @@ -154,16 +159,19 @@ public static IList CreateParameters(this ODataContext context /// /// The OData context. /// The key segment. + /// The Open API document to lookup references. /// The parameter name mapping. /// The created list of . public static IList CreateKeyParameters(this ODataContext context, ODataKeySegment keySegment, + OpenApiDocument document, IDictionary parameterNameMapping = null) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(keySegment, nameof(keySegment)); + Utils.CheckArgumentNull(document, nameof(document)); if (keySegment.IsAlternateKey) - return CreateAlternateKeyParameters(context, keySegment); + return CreateAlternateKeyParameters(context, keySegment, document); IEdmEntityType entityType = keySegment.EntityType; IList keys = entityType.Key().ToList(); @@ -186,7 +194,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"The unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(keys.First().Type) + Schema = context.CreateEdmTypeSchema(keys[0].Type, document) }; parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiAny(entityType.Name)); @@ -205,7 +213,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"Property in multi-part unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(keyProperty.Type) + Schema = context.CreateEdmTypeSchema(keyProperty.Type, document) }; if (keySegment.KeyMappings != null) @@ -227,8 +235,9 @@ public static IList CreateKeyParameters(this ODataContext cont /// /// The OData context. /// The key segment. + /// The Open API document to lookup references. /// A list of of alternate key parameters. - private static IList CreateAlternateKeyParameters(ODataContext context, ODataSegment keySegment) + private static IList CreateAlternateKeyParameters(ODataContext context, ODataSegment keySegment, OpenApiDocument document) { Debug.Assert(keySegment.Kind == ODataSegmentKind.Key); @@ -248,7 +257,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = alternateKey.First().Key, In = ParameterLocation.Path, Description = $"Alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(alternateKey.First().Value.Type), + Schema = context.CreateEdmTypeSchema(alternateKey.First().Value.Type, document), Required = true } ); @@ -266,7 +275,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = compositekey.Key, In = ParameterLocation.Path, Description = $"Property in multi-part alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(compositekey.Value.Type), + Schema = context.CreateEdmTypeSchema(compositekey.Value.Type, document), Required = true } ); @@ -282,8 +291,9 @@ private static IList CreateAlternateKeyParameters(ODataContext /// /// The ODataPath /// The OData context. + /// The Open API document to lookup references. /// The created list of - public static List CreatePathParameters(this ODataPath path, ODataContext context) + public static List CreatePathParameters(this ODataPath path, ODataContext context, OpenApiDocument document) { List pathParameters = []; var parameterMappings = path.CalculateParameterMapping(context.Settings); @@ -291,7 +301,7 @@ public static List CreatePathParameters(this ODataPath path, O foreach (ODataKeySegment keySegment in path.OfType()) { IDictionary mapping = parameterMappings[keySegment]; - pathParameters.AddRange(context.CreateKeyParameters(keySegment, mapping)); + pathParameters.AddRange(context.CreateKeyParameters(keySegment, document, mapping)); } foreach (ODataOperationSegment operationSegment in path.OfType()) @@ -303,7 +313,7 @@ public static List CreatePathParameters(this ODataPath path, O if (operationSegment.ParameterMappings != null) { - IList parameters = context.CreateParameters(function, operationSegment.ParameterMappings); + IList parameters = context.CreateParameters(function, document, operationSegment.ParameterMappings); foreach (var parameter in parameters) { pathParameters.AppendParameter(parameter); @@ -312,7 +322,7 @@ public static List CreatePathParameters(this ODataPath path, O else { IDictionary mappings = parameterMappings[operationSegment]; - IList parameters = context.CreateParameters(function, mappings); + IList parameters = context.CreateParameters(function, document, mappings); pathParameters.AddRange(parameters); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index e963215c7..0d787af5b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -23,13 +23,15 @@ internal static class OpenApiRequestBodyGenerator /// /// The OData context. /// The Edm action import. + /// The OpenApi document to lookup references. /// The created or null. - public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmActionImport actionImport) + public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmActionImport actionImport, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(actionImport, nameof(actionImport)); + Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateRequestBody(actionImport.Action); + return context.CreateRequestBody(actionImport.Action, document); } /// @@ -37,11 +39,13 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE /// /// The OData context. /// The Edm action. + /// The OpenApi document to lookup references. /// The created or null. - public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmAction action) + public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmAction action, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(action, nameof(action)); + Utils.CheckArgumentNull(document, nameof(document)); // return null for empty action parameters int skip = 0; @@ -69,7 +73,7 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE foreach (var parameter in action.Parameters.Skip(skip)) { - parametersSchema.Properties.Add(parameter.Name, context.CreateEdmTypeSchema(parameter.Type)); + parametersSchema.Properties.Add(parameter.Name, context.CreateEdmTypeSchema(parameter.Type, document)); } OpenApiRequestBody requestBody = new OpenApiRequestBody @@ -91,20 +95,22 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE /// Create a dictionary of indexed by ref name. /// /// The OData context. + /// The OpenApi document to lookup references. /// The created dictionary of indexed by ref name - public static IDictionary CreateRequestBodies(this ODataContext context) + public static IDictionary CreateRequestBodies(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); Dictionary requestBodies = new() { { Constants.ReferencePostRequestBodyName, - CreateRefPostRequestBody() + CreateRefPostRequestBody(document) }, { Constants.ReferencePutRequestBodyName, - CreateRefPutRequestBody() + CreateRefPutRequestBody(document) } }; @@ -112,7 +118,7 @@ public static IDictionary CreateRequestBodies(this O foreach (IEdmAction action in context.Model.SchemaElements.OfType() .Where(action => context.Model.OperationTargetsMultiplePaths(action))) { - OpenApiRequestBody requestBody = context.CreateRequestBody(action); + OpenApiRequestBody requestBody = context.CreateRequestBody(action, document); if (requestBody != null) requestBodies.Add($"{action.Name}RequestBody", requestBody); } @@ -124,9 +130,10 @@ public static IDictionary CreateRequestBodies(this O /// Create a to be reused across ref POST operations /// /// The created - private static OpenApiRequestBody CreateRefPostRequestBody() + /// The OpenApi document to lookup references. + private static OpenApiRequestBody CreateRefPostRequestBody(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, null); + OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, document); return new OpenApiRequestBody { Required = true, @@ -147,9 +154,10 @@ private static OpenApiRequestBody CreateRefPostRequestBody() /// Create a to be reused across ref PUT operations /// /// The created - private static OpenApiRequestBody CreateRefPutRequestBody() + /// The OpenApi document to lookup references. + private static OpenApiRequestBody CreateRefPutRequestBody(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, null); + OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, document); return new OpenApiRequestBody { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 79c1881a3..8857ad5c2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -55,40 +55,41 @@ public static OpenApiResponse GetResponse(this string statusCode) /// that is referenced from all operations of the service. /// /// The OData context. + /// The OpenApi document to lookup references. /// The name/value pairs for the standard OData error response. - public static IDictionary CreateResponses(this ODataContext context) + public static IDictionary CreateResponses(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); var responses = new Dictionary { - { "error", context.CreateErrorResponse() } + { "error", context.CreateErrorResponse(document) } }; if(context.Settings.EnableDollarCountPath) { - responses[Constants.DollarCountSchemaName] = CreateCountResponse(); + responses[Constants.DollarCountSchemaName] = CreateCountResponse(document); } responses = responses.Concat(context.GetAllCollectionEntityTypes() .Select(x => new KeyValuePair( $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", - CreateCollectionResponse(x))) + CreateCollectionResponse(x, document))) .Where(x => !responses.ContainsKey(x.Key))) .Concat(context.GetAllCollectionComplexTypes() .Select(x => new KeyValuePair( $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", - CreateCollectionResponse(x))) + CreateCollectionResponse(x, document))) .Where(x => !responses.ContainsKey(x.Key))) .ToDictionary(x => x.Key, x => x.Value); if(context.HasAnyNonContainedCollections()) - responses[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionResponse("String"); + responses[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionResponse("String", document); foreach (IEdmOperation operation in context.Model.SchemaElements.OfType() .Where(op => context.Model.OperationTargetsMultiplePaths(op))) { - OpenApiResponse response = context.CreateOperationResponse(operation); + OpenApiResponse response = context.CreateOperationResponse(operation, document); if (response != null) responses[$"{operation.Name}Response"] = response; } @@ -101,13 +102,15 @@ public static IDictionary CreateResponses(this ODataCon /// /// The OData context. /// The Edm operation import. + /// The OpenApi document to lookup references. /// The created . - public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperationImport operationImport) + public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperationImport operationImport, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(operationImport, nameof(operationImport)); + Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateResponses(operationImport.Operation); + return context.CreateResponses(operationImport.Operation, document); } /// @@ -115,8 +118,9 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp /// /// The OData context. /// The Edm operation. + /// The OpenApi document to lookup references. /// The created . - public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperation operation) + public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperation operation, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(operation, nameof(operation)); @@ -136,7 +140,7 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp } else { - OpenApiResponse response = context.CreateOperationResponse(operation); + OpenApiResponse response = context.CreateOperationResponse(operation, document); responses.Add(context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, response); } @@ -153,7 +157,7 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp return responses; } - public static OpenApiResponse CreateOperationResponse(this ODataContext context, IEdmOperation operation) + public static OpenApiResponse CreateOperationResponse(this ODataContext context, IEdmOperation operation, OpenApiDocument document) { if (operation.ReturnType == null) return null; @@ -167,7 +171,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, Properties = new Dictionary { { - "value", context.CreateEdmTypeSchema(operation.ReturnType) + "value", context.CreateEdmTypeSchema(operation.ReturnType, document) } } }; @@ -181,7 +185,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, { new OpenApiSchemaReference(operation.IsDeltaFunction() ? Constants.BaseDeltaFunctionResponse // @odata.nextLink + @odata.deltaLink : Constants.BaseCollectionPaginationCountResponse // @odata.nextLink + @odata.count) - ,null), + ,document), baseSchema } }; @@ -219,14 +223,14 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, Properties = new Dictionary { { - "value", context.CreateEdmTypeSchema(operation.ReturnType) + "value", context.CreateEdmTypeSchema(operation.ReturnType, document) } } }; } else { - schema = context.CreateEdmTypeSchema(operation.ReturnType); + schema = context.CreateEdmTypeSchema(operation.ReturnType, document); } string mediaType = Constants.ApplicationJsonMediaType; @@ -259,12 +263,12 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, return response; } - private static OpenApiResponse CreateCollectionResponse(IEdmStructuredType structuredType) + private static OpenApiResponse CreateCollectionResponse(IEdmStructuredType structuredType, OpenApiDocument document) { var entityType = structuredType as IEdmEntityType; - return CreateCollectionResponse(entityType?.FullName() ?? structuredType.FullTypeName()); + return CreateCollectionResponse(entityType?.FullName() ?? structuredType.FullTypeName(), document); } - private static OpenApiResponse CreateCollectionResponse(string typeName) + private static OpenApiResponse CreateCollectionResponse(string typeName, OpenApiDocument document) { return new OpenApiResponse { @@ -275,16 +279,16 @@ private static OpenApiResponse CreateCollectionResponse(string typeName) Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchemaReference($"{typeName}{Constants.CollectionSchemaSuffix}", null) + Schema = new OpenApiSchemaReference($"{typeName}{Constants.CollectionSchemaSuffix}", document) } } } }; } - private static OpenApiResponse CreateCountResponse() + private static OpenApiResponse CreateCountResponse(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, null); + OpenApiSchema schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, document); return new OpenApiResponse { Description = "The count of the resource", @@ -301,7 +305,7 @@ private static OpenApiResponse CreateCountResponse() }; } - private static OpenApiResponse CreateErrorResponse(this ODataContext context) + private static OpenApiResponse CreateErrorResponse(this ODataContext context, OpenApiDocument document) { var errorNamespaceName = context.GetErrorNamespaceName(); return new OpenApiResponse @@ -313,7 +317,7 @@ private static OpenApiResponse CreateErrorResponse(this ODataContext context) Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchemaReference($"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}", null) + Schema = new OpenApiSchemaReference($"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}", document) } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index a31909657..8d07b1832 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -34,10 +34,12 @@ internal static class OpenApiSchemaGenerator /// The value of each pair is a . /// /// The OData to Open API context. + /// The Open API document to use for references lookup. /// The string/schema dictionary. - public static IDictionary CreateSchemas(this ODataContext context) + public static IDictionary CreateSchemas(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); IDictionary schemas = new Dictionary(); @@ -56,25 +58,25 @@ public static IDictionary CreateSchemas(this ODataContext IEdmType reference = (IEdmType)element; var fullTypeName = reference.FullTypeName(); if(reference is IEdmComplexType && - fullTypeName.Split(new char[] {'.'}, StringSplitOptions.RemoveEmptyEntries) + fullTypeName.Split(['.'], StringSplitOptions.RemoveEmptyEntries) .Last() .Equals(context.Settings.InnerErrorComplexTypeName, StringComparison.Ordinal)) continue; - schemas.Add(fullTypeName, context.CreateSchemaTypeSchema(reference)); + schemas.Add(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); } break; } } // append the Edm.Spatial - foreach(var schema in context.CreateSpatialSchemas()) + foreach(var schema in context.CreateSpatialSchemas(document)) { schemas[schema.Key] = schema.Value; } // append the OData errors - foreach(var schema in context.CreateODataErrorSchemas()) + foreach(var schema in context.CreateODataErrorSchemas(document)) { schemas[schema.Key] = schema.Value; } @@ -88,18 +90,18 @@ public static IDictionary CreateSchemas(this ODataContext schemas = schemas.Concat(context.GetAllCollectionEntityTypes() .Select(x => new KeyValuePair( $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x))) + CreateCollectionSchema(context, x, document))) .Where(x => !schemas.ContainsKey(x.Key))) .Concat(context.GetAllCollectionComplexTypes() .Select(x => new KeyValuePair( $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x))) + CreateCollectionSchema(context, x, document))) .Where(x => !schemas.ContainsKey(x.Key))) .ToDictionary(x => x.Key, x => x.Value); if(context.HasAnyNonContainedCollections()) { - schemas[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType); + schemas[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document); } schemas[Constants.ReferenceUpdateSchemaName] = new() @@ -207,23 +209,23 @@ internal static IEnumerable GetAllCollectionEntityTypes(this return collectionEntityTypes.Union(derivedCollectionTypes); } - private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmStructuredType structuredType) + private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { OpenApiSchema schema = null; var entityType = structuredType as IEdmEntityType; if (context.Settings.EnableDerivedTypesReferencesForResponses && entityType != null) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, context.Model, document); } if (schema == null) { - schema = new OpenApiSchemaReference(entityType?.FullName() ?? structuredType.FullTypeName(), null); + schema = new OpenApiSchemaReference(entityType?.FullName() ?? structuredType.FullTypeName(), document); } - return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName()); + return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName(), document); } - private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenApiSchema schema, string typeName) + private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenApiSchema schema, string typeName, OpenApiDocument document) { var properties = new Dictionary { @@ -249,7 +251,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp if (context.Settings.EnableODataAnnotationReferencesForResponses) { // @odata.nextLink + @odata.count - OpenApiSchema paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, null); + OpenApiSchema paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, document); collectionSchema = new OpenApiSchema { @@ -358,13 +360,15 @@ private static void AddEnumDescription(IEdmEnumMember member, OpenApiEnumValuesD /// /// The OData context. /// The Edm structured type. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType) + public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(structuredType, nameof(structuredType)); + Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateStructuredTypeSchema(structuredType, true, true); + return context.CreateStructuredTypeSchema(structuredType, true, true, document); } /// @@ -375,13 +379,15 @@ public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context /// /// The OData context. /// The Edm property. + /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property) + public static OpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(property, nameof(property)); + Utils.CheckArgumentNull(document, nameof(document)); - OpenApiSchema schema = context.CreateEdmTypeSchema(property.Type); + OpenApiSchema schema = context.CreateEdmTypeSchema(property.Type, document); switch (property.PropertyKind) { @@ -406,8 +412,9 @@ public static OpenApiSchema CreatePropertySchema(this ODataContext context, IEdm /// /// The OData context. /// The Edm structured type. + /// The Open API document to lookup references. /// The created map of . - public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType) + public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(structuredType, nameof(structuredType)); @@ -418,7 +425,7 @@ public static IDictionary CreateStructuredTypePropertiesS // structure properties foreach (var property in structuredType.DeclaredStructuralProperties()) { - OpenApiSchema propertySchema = context.CreatePropertySchema(property); + OpenApiSchema propertySchema = context.CreatePropertySchema(property, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); properties.Add(property.Name, propertySchema); @@ -427,7 +434,7 @@ public static IDictionary CreateStructuredTypePropertiesS // navigation properties foreach (var property in structuredType.DeclaredNavigationProperties()) { - OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type); + OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); propertySchema.Extensions?.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); @@ -437,12 +444,12 @@ public static IDictionary CreateStructuredTypePropertiesS return properties; } - public static OpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition) + public static OpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition, OpenApiDocument document) { - return context.CreateSchema(typeDefinition.UnderlyingType); + return context.CreateSchema(typeDefinition.UnderlyingType, document); } - internal static OpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType) + internal static OpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(edmType != null); @@ -451,21 +458,22 @@ internal static OpenApiSchema CreateSchemaTypeSchema(this ODataContext context, { case EdmTypeKind.Complex: // complex type case EdmTypeKind.Entity: // entity type - return context.CreateStructuredTypeSchema((IEdmStructuredType)edmType, true, true); + return context.CreateStructuredTypeSchema((IEdmStructuredType)edmType, true, true, document); case EdmTypeKind.Enum: // enum type return context.CreateEnumTypeSchema((IEdmEnumType)edmType); case EdmTypeKind.TypeDefinition: // type definition - return context.CreateSchemaTypeDefinitionSchema((IEdmTypeDefinition)edmType); + return context.CreateSchemaTypeDefinitionSchema((IEdmTypeDefinition)edmType, document); case EdmTypeKind.None: default: - throw Error.NotSupported(String.Format(SRResource.NotSupportedEdmTypeKind, edmType.TypeKind)); + throw Error.NotSupported(string.Format(SRResource.NotSupportedEdmTypeKind, edmType.TypeKind)); } } private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, bool processBase, bool processExample, + OpenApiDocument document, IEnumerable derivedTypes = null) { Debug.Assert(context != null); @@ -474,7 +482,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex JsonNode example = null; if (context.Settings.ShowSchemaExamples) { - example = CreateStructuredTypePropertiesExample(context, structuredType); + example = CreateStructuredTypePropertiesExample(context, structuredType, document); } if (context.Settings.EnableDiscriminatorValue && derivedTypes == null) @@ -503,10 +511,10 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex AllOf = new List { // 1. a JSON Reference to the Schema Object of the base type - new OpenApiSchemaReference(structuredType.BaseType.FullTypeName(), null), + new OpenApiSchemaReference(structuredType.BaseType.FullTypeName(), document), // 2. a Schema Object describing the derived type - context.CreateStructuredTypeSchema(structuredType, false, false, derivedTypes) + context.CreateStructuredTypeSchema(structuredType, false, false, document, derivedTypes) }, AnyOf = null, @@ -522,7 +530,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex if (context.Settings.EnableDiscriminatorValue && derivedTypes.Any()) { Dictionary mapping = derivedTypes - .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchemaReference(x.FullTypeName(), null).Reference.ReferenceV3); + .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchemaReference(x.FullTypeName(), document).Reference.ReferenceV3); discriminator = new OpenApiDiscriminator { @@ -542,7 +550,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex // Each structural property and navigation property is represented // as a name/value pair of the standard OpenAPI properties object. - Properties = context.CreateStructuredTypePropertiesSchema(structuredType), + Properties = context.CreateStructuredTypePropertiesSchema(structuredType, document), // make others null AllOf = null, @@ -597,7 +605,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex } } - private static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType) + private static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { JsonObject example = []; @@ -607,7 +615,7 @@ private static JsonObject CreateStructuredTypePropertiesExample(ODataContext con // IOpenApiAny item; IEdmTypeReference propertyType = property.Type; - JsonNode item = GetTypeNameForExample(context, propertyType); + JsonNode item = GetTypeNameForExample(context, propertyType, document); EdmTypeKind typeKind = propertyType.TypeKind(); if (typeKind == EdmTypeKind.Primitive && item is JsonValue jsonValue && jsonValue.TryGetValue(out string stringAny)) @@ -630,13 +638,13 @@ private static JsonObject CreateStructuredTypePropertiesExample(ODataContext con return example; } - private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference) + private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) { switch (edmTypeReference.TypeKind()) { case EdmTypeKind.Primitive: IEdmPrimitiveType primitiveType = edmTypeReference.AsPrimitive().PrimitiveDefinition(); - OpenApiSchema schema = context.CreateSchema(primitiveType); + OpenApiSchema schema = context.CreateSchema(primitiveType, document); if (edmTypeReference.IsBoolean()) { @@ -670,7 +678,7 @@ private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeRefe case EdmTypeKind.Collection: JsonArray array = []; IEdmTypeReference elementType = edmTypeReference.AsCollection().ElementType(); - array.Add(GetTypeNameForExample(context, elementType)); + array.Add(GetTypeNameForExample(context, elementType, document)); return array; case EdmTypeKind.Untyped: diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs index a3b560456..a3daca486 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs @@ -23,8 +23,9 @@ internal static class OpenApiSpatialTypeSchemaGenerator /// The value of each pair is a . /// /// The OData to Open API context. + /// The document to use to lookup references. /// The string/schema dictionary. - public static IDictionary CreateSpatialSchemas(this ODataContext context) + public static IDictionary CreateSpatialSchemas(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); @@ -32,37 +33,37 @@ public static IDictionary CreateSpatialSchemas(this OData if (context.IsSpatialTypeUsed) { - schemas.Add("Edm.Geography", CreateEdmGeographySchema()); + schemas.Add("Edm.Geography", CreateEdmGeographySchema(document)); - schemas.Add("Edm.GeographyPoint", CreateEdmGeographyPointSchema()); + schemas.Add("Edm.GeographyPoint", CreateEdmGeographyPointSchema(document)); - schemas.Add("Edm.GeographyLineString", CreateEdmGeographyLineStringSchema()); + schemas.Add("Edm.GeographyLineString", CreateEdmGeographyLineStringSchema(document)); - schemas.Add("Edm.GeographyPolygon", CreateEdmGeographyPolygonSchema()); + schemas.Add("Edm.GeographyPolygon", CreateEdmGeographyPolygonSchema(document)); - schemas.Add("Edm.GeographyMultiPoint", CreateEdmGeographyMultiPointSchema()); + schemas.Add("Edm.GeographyMultiPoint", CreateEdmGeographyMultiPointSchema(document)); - schemas.Add("Edm.GeographyMultiLineString", CreateEdmGeographyMultiLineStringSchema()); + schemas.Add("Edm.GeographyMultiLineString", CreateEdmGeographyMultiLineStringSchema(document)); - schemas.Add("Edm.GeographyMultiPolygon", CreateEdmGeographyMultiPolygonSchema()); + schemas.Add("Edm.GeographyMultiPolygon", CreateEdmGeographyMultiPolygonSchema(document)); - schemas.Add("Edm.GeographyCollection", CreateEdmGeographyCollectionSchema()); + schemas.Add("Edm.GeographyCollection", CreateEdmGeographyCollectionSchema(document)); - schemas.Add("Edm.Geometry", CreateEdmGeometrySchema()); + schemas.Add("Edm.Geometry", CreateEdmGeometrySchema(document)); - schemas.Add("Edm.GeometryPoint", CreateEdmGeometryPointSchema()); + schemas.Add("Edm.GeometryPoint", CreateEdmGeometryPointSchema(document)); - schemas.Add("Edm.GeometryLineString", CreateEdmGeometryLineStringSchema()); + schemas.Add("Edm.GeometryLineString", CreateEdmGeometryLineStringSchema(document)); - schemas.Add("Edm.GeometryPolygon", CreateEdmGeometryPolygonSchema()); + schemas.Add("Edm.GeometryPolygon", CreateEdmGeometryPolygonSchema(document)); - schemas.Add("Edm.GeometryMultiPoint", CreateEdmGeometryMultiPointSchema()); + schemas.Add("Edm.GeometryMultiPoint", CreateEdmGeometryMultiPointSchema(document)); - schemas.Add("Edm.GeometryMultiLineString", CreateEdmGeometryMultiLineStringSchema()); + schemas.Add("Edm.GeometryMultiLineString", CreateEdmGeometryMultiLineStringSchema(document)); - schemas.Add("Edm.GeometryMultiPolygon", CreateEdmGeometryMultiPolygonSchema()); + schemas.Add("Edm.GeometryMultiPolygon", CreateEdmGeometryMultiPolygonSchema(document)); - schemas.Add("Edm.GeometryCollection", CreateEdmGeometryCollectionSchema()); + schemas.Add("Edm.GeometryCollection", CreateEdmGeometryCollectionSchema(document)); schemas.Add("GeoJSON.position", CreateGeoJsonPointSchema()); } @@ -74,92 +75,101 @@ public static IDictionary CreateSpatialSchemas(this OData /// Create for Edm.Geography. /// /// The created . - public static OpenApiSchema CreateEdmGeographySchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographySchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.Geometry", null); + return new OpenApiSchemaReference("Edm.Geometry", document); } /// /// Create for Edm.GeographyPoint. /// /// The created . - public static OpenApiSchema CreateEdmGeographyPointSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyPointSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryPoint", null); + return new OpenApiSchemaReference("Edm.GeometryPoint", document); } /// /// Create for Edm.GeographyLineString. /// /// The created . - public static OpenApiSchema CreateEdmGeographyLineStringSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyLineStringSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryLineString", null); + return new OpenApiSchemaReference("Edm.GeometryLineString", document); } /// /// Create for Edm.GeographyPolygon. /// /// The created . - public static OpenApiSchema CreateEdmGeographyPolygonSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyPolygonSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryPolygon", null); + return new OpenApiSchemaReference("Edm.GeometryPolygon", document); } /// /// Create for Edm.GeographyMultiPoint. /// /// The created . - public static OpenApiSchema CreateEdmGeographyMultiPointSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyMultiPointSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryMultiPoint", null); + return new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); } /// /// Create for Edm.GeographyMultiLineString. /// /// The created . - public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryMultiLineString", null); + return new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); } /// /// Create for Edm.GeographyMultiPolygon. /// /// The created . - public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null); + return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); } /// /// Create for Edm.GeographyCollection. /// /// The created . - public static OpenApiSchema CreateEdmGeographyCollectionSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeographyCollectionSchema(OpenApiDocument document) { - return new OpenApiSchemaReference("Edm.GeometryCollection", null); + return new OpenApiSchemaReference("Edm.GeometryCollection", document); } /// /// Create for Edm.Geometry. /// /// The created . - public static OpenApiSchema CreateEdmGeometrySchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometrySchema(OpenApiDocument document) { return new OpenApiSchema { Type = JsonSchemaType.Object, OneOf = [ - new OpenApiSchemaReference("Edm.GeometryPoint", null), - new OpenApiSchemaReference("Edm.GeometryLineString", null), - new OpenApiSchemaReference("Edm.GeometryPolygon", null), - new OpenApiSchemaReference("Edm.GeometryMultiPoint", null), - new OpenApiSchemaReference("Edm.GeometryMultiLineString", null), - new OpenApiSchemaReference("Edm.GeometryMultiPolygon", null), - new OpenApiSchemaReference("Edm.GeometryCollection", null) + new OpenApiSchemaReference("Edm.GeometryPoint", document), + new OpenApiSchemaReference("Edm.GeometryLineString", document), + new OpenApiSchemaReference("Edm.GeometryPolygon", document), + new OpenApiSchemaReference("Edm.GeometryMultiPoint", document), + new OpenApiSchemaReference("Edm.GeometryMultiLineString", document), + new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document), + new OpenApiSchemaReference("Edm.GeometryCollection", document), ] }; } @@ -168,7 +178,8 @@ public static OpenApiSchema CreateEdmGeometrySchema() /// Create for Edm.GeometryPoint. /// /// The created . - public static OpenApiSchema CreateEdmGeometryPointSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryPointSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -185,7 +196,7 @@ public static OpenApiSchema CreateEdmGeometryPointSchema() Default = "Point" } }, - { "coordinates", new OpenApiSchemaReference("GeoJSON.position", null) } + { "coordinates", new OpenApiSchemaReference("GeoJSON.position", document) } }, Required = new HashSet { @@ -199,7 +210,8 @@ public static OpenApiSchema CreateEdmGeometryPointSchema() /// Create for Edm.GeometryLineString. /// /// The created . - public static OpenApiSchema CreateEdmGeometryLineStringSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryLineStringSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -217,7 +229,7 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema() { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", null), + Items = new OpenApiSchemaReference("GeoJSON.position", document), MinItems = 2 } } @@ -234,7 +246,8 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema() /// Create for Edm.GeometryPolygon. /// /// The created . - public static OpenApiSchema CreateEdmGeometryPolygonSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryPolygonSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -255,7 +268,7 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema() Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", null) + Items = new OpenApiSchemaReference("GeoJSON.position", document) }, MinItems = 4 } @@ -273,7 +286,8 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema() /// Create for Edm.GeometryMultiPoint. /// /// The created . - public static OpenApiSchema CreateEdmGeometryMultiPointSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryMultiPointSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -291,7 +305,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema() { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", null) + Items = new OpenApiSchemaReference("GeoJSON.position", document) } } }, @@ -307,7 +321,8 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema() /// Create for Edm.GeometryMultiLineString. /// /// The created . - public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -328,7 +343,7 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema() Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", null) + Items = new OpenApiSchemaReference("GeoJSON.position", document) }, MinItems = 2 } @@ -346,7 +361,8 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema() /// Create for Edm.GeometryMultiPolygon. /// /// The created . - public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -370,7 +386,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema() Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", null) + Items = new OpenApiSchemaReference("GeoJSON.position", document) } }, MinItems = 4 @@ -389,7 +405,8 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema() /// Create for Edm.GeometryCollection. /// /// The created . - public static OpenApiSchema CreateEdmGeometryCollectionSchema() + /// The document to use to lookup references. + public static OpenApiSchema CreateEdmGeometryCollectionSchema(OpenApiDocument document) { return new OpenApiSchema { @@ -407,7 +424,7 @@ public static OpenApiSchema CreateEdmGeometryCollectionSchema() { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("Edm.Geometry", null) + Items = new OpenApiSchemaReference("Edm.Geometry", document) } } }, diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index 49ed6fcd3..18f4bedbb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -158,7 +158,7 @@ protected override void SetResponses(OpenApiOperation operation) } else { - OpenApiSchema schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); + OpenApiSchema schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); SetSingleResponse(operation, schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 23298936c..60b92e675 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -138,7 +138,7 @@ private OpenApiSchema GetOpenApiSchema() return new() { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null) + Items = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document) }; } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index 5a2d00984..4552b2cb5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -111,7 +111,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) private OpenApiSchema GetOpenApiSchema() { - var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), null); + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); if (ComplexPropertySegment.Property.Type.IsCollection()) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs index f85c291ff..7d932f7e5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs @@ -33,7 +33,7 @@ protected override void SetRequestBody(OpenApiOperation operation) // The requestBody field contains a Request Body Object describing the structure of the request body. // Its schema value follows the rules for Schema Objects for complex types, with one property per action parameter. - operation.RequestBody = Context.CreateRequestBody(actionImport); + operation.RequestBody = Context.CreateRequestBody(actionImport, _document); base.SetRequestBody(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index 9c074df1f..a16b5162f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -50,7 +50,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - if (EdmOperation is IEdmAction action && Context.CreateRequestBody(action) is OpenApiRequestBody requestBody) + if (EdmOperation is IEdmAction action && Context.CreateRequestBody(action, _document) is OpenApiRequestBody requestBody) { if (Context.Model.OperationTargetsMultiplePaths(action)) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index 4e31acf92..bb1015919 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -36,7 +36,7 @@ protected override void SetParameters(OpenApiOperation operation) if (OperationImportSegment.ParameterMappings != null) { - foreach (var param in Context.CreateParameters(functionImport.Function, OperationImportSegment.ParameterMappings)) + foreach (var param in Context.CreateParameters(functionImport.Function, _document, OperationImportSegment.ParameterMappings)) { operation.Parameters.AppendParameter(param); } @@ -45,7 +45,7 @@ protected override void SetParameters(OpenApiOperation operation) { //The parameters array contains a Parameter Object for each parameter of the function overload, // and it contains specific Parameter Objects for the allowed system query options. - foreach (var param in Context.CreateParameters(functionImport)) + foreach (var param in Context.CreateParameters(functionImport, _document)) { operation.Parameters.AppendParameter(param); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index a0f5a9fa0..3719d3620 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -99,7 +99,7 @@ protected override void SetResponses(OpenApiOperation operation) // describing the structure of the success response by referencing an appropriate schema // in the global schemas. In addition, it contains a default name/value pair for // the OData error response referencing the global responses. - operation.Responses = Context.CreateResponses(EdmOperationImport); + operation.Responses = Context.CreateResponses(EdmOperationImport, _document); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index 813c4deaa..aed4761da 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -203,7 +203,7 @@ protected override void SetParameters(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.Responses = Context.CreateResponses(EdmOperation); + operation.Responses = Context.CreateResponses(EdmOperation, _document); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index b7c203295..99161945b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -102,7 +102,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); } if (Context.Settings.ShowLinks) @@ -113,7 +113,7 @@ protected override void SetResponses(OpenApiOperation operation) if (schema == null) { - schema = new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); + schema = new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); } operation.Responses = new OpenApiResponses diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index dfe8c3edb..06f34bd60 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -196,10 +196,10 @@ private OpenApiSchema GetEntitySchema() if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); } - schema ??= new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); + schema ??= new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); return schema; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 3f05a52f3..5870c7f02 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -151,10 +151,10 @@ private OpenApiSchema GetOpenApiSchema() { if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - return EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); + return EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); } - return new OpenApiSchemaReference(EntitySet.EntityType.FullName(), null); + return new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index f4dcad98c..8bf47bfd5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -99,7 +99,7 @@ protected override void SetResponses(OpenApiOperation operation) // Get the entity type declaring this stream property. (var entityType, _) = GetStreamElements(); - OpenApiSchema schema = new OpenApiSchemaReference(entityType.FullName(), null); + OpenApiSchema schema = new OpenApiSchemaReference(entityType.FullName(), _document); operation.AddErrorResponses(Context.Settings, addNoContent: true, schema: schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 8eb6e73b8..567bd183a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -120,10 +120,10 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, Context.Model, _document); } - schema ??= new OpenApiSchemaReference(entityType.FullName(), null); + schema ??= new OpenApiSchemaReference(entityType.FullName(), _document); operation.Responses = new OpenApiResponses { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 2d2479ea0..42496a82c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -223,7 +223,7 @@ protected IDictionary GetContent(OpenApiSchema schema protected OpenApiSchema GetOpenApiSchema() { - return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), null); + return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), _document); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs index 2e0225eea..6cd505eaf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs @@ -65,7 +65,7 @@ protected override void SetRequestBody(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); } operation.RequestBody = new OpenApiRequestBody @@ -85,7 +85,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); } operation.Responses = new OpenApiResponses diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs index 55873f0da..3e51a289b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs @@ -62,7 +62,7 @@ protected override void SetRequestBody(OpenApiOperation operation) OpenApiSchema schema = null; if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); } operation.RequestBody = new OpenApiRequestBody diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 9404d6db5..0b619675e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -212,12 +212,12 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(targetStructuredType, Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(targetStructuredType, Context.Model, _document); } if (schema == null) { - schema = new OpenApiSchemaReference(TargetSchemaElement.FullName(), null); + schema = new OpenApiSchemaReference(TargetSchemaElement.FullName(), _document); } SetSingleResponse(operation, schema); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index 8f7ac5e7d..cb9a25713 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -173,7 +173,7 @@ protected virtual void SetRequestBody(OpenApiOperation operation) /// The . protected virtual void SetParameters(OpenApiOperation operation) { - PathParameters = Path.CreatePathParameters(Context); + PathParameters = Path.CreatePathParameters(Context, _document); if (!Context.Settings.DeclarePathParametersOnPathItem) { foreach (var parameter in PathParameters) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index f0a4681dc..6ee4c3b9e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -89,7 +89,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document); } if (Context.Settings.ShowLinks) @@ -98,7 +98,7 @@ protected override void SetResponses(OpenApiOperation operation) entityKind: Singleton.ContainerElementKind.ToString(), path: Path, parameters: PathParameters); } - schema ??= new OpenApiSchemaReference(Singleton.EntityType.FullName(), null); + schema ??= new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); operation.Responses = new OpenApiResponses { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index c14b7e7fc..ce5dc20da 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -123,10 +123,10 @@ private OpenApiSchema GetOpenApiSchema() { if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - return EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model); + return EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document); } - return new OpenApiSchemaReference(Singleton.EntityType.FullName(), null); + return new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index 7ab2e4baa..e71b6d371 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -130,7 +130,7 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio /// The . protected virtual void SetParameters(OpenApiPathItem item) { - foreach (var parameter in Path.CreatePathParameters(Context)) + foreach (var parameter in Path.CreatePathParameters(Context, _document)) { item.Parameters.AppendParameter(parameter); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs index 63cd2703a..65bcbdf0b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs @@ -5,6 +5,7 @@ using System; using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -18,9 +19,10 @@ public void CreateComponentsThrowArgumentNullContext() { // Arrange ODataContext context = null; + OpenApiDocument openApiDocument = new(); // Act & Assert - Assert.Throws("context", () => context.CreateComponents()); + Assert.Throws("context", () => context.CreateComponents(openApiDocument)); } [Fact] @@ -29,9 +31,10 @@ public void CreateComponentsReturnsForEmptyModel() // Arrange IEdmModel model = EdmModelHelper.EmptyModel; ODataContext context = new ODataContext(model); + OpenApiDocument openApiDocument = new(); // Act - var components = context.CreateComponents(); + var components = context.CreateComponents(openApiDocument); // Assert Assert.NotNull(components); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index b33b51124..44da6b4a6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -30,7 +30,7 @@ public void CreateEdmTypeSchemaThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateEdmTypeSchema(edmTypeReference: null)); + Assert.Throws("context", () => context.CreateEdmTypeSchema(edmTypeReference: null, new())); } [Fact] @@ -40,7 +40,7 @@ public void CreateEdmTypeSchemaThrowArgumentNullEdmTypeReference() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("edmTypeReference", () => context.CreateEdmTypeSchema(edmTypeReference: null)); + Assert.Throws("edmTypeReference", () => context.CreateEdmTypeSchema(edmTypeReference: null, new())); } [Theory] @@ -59,7 +59,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(Open new EdmCollectionType(new EdmComplexTypeReference(complex, true))); // Act - var schema = context.CreateEdmTypeSchema(collectionType); + var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(context.Settings.OpenApiSpecVersion); @@ -95,7 +95,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() new EdmCollectionType(new EdmComplexTypeReference(complex, false))); // Act - var schema = context.CreateEdmTypeSchema(collectionType); + var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -118,7 +118,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType new EdmCollectionType(EdmCoreModel.Instance.GetString(false))); // Act - var schema = context.CreateEdmTypeSchema(collectionType); + var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -141,7 +141,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() new EdmCollectionType(EdmCoreModel.Instance.GetInt32(true))); // Act - var schema = context.CreateEdmTypeSchema(collectionType); + var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -175,7 +175,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS context.Settings.OpenApiSpecVersion = specVersion; // Act - var schema = context.CreateEdmTypeSchema(enumTypeReference); + var schema = context.CreateEdmTypeSchema(enumTypeReference, new()); // & Assert Assert.NotNull(schema); @@ -234,7 +234,7 @@ public void CreateEdmTypeSchemaReturnSchemaForComplexType(bool isNullable, OpenA context.Settings.OpenApiSpecVersion = specVersion; // Act - var schema = context.CreateEdmTypeSchema(complexTypeReference); + var schema = context.CreateEdmTypeSchema(complexTypeReference, new()); // & Assert Assert.NotNull(schema); @@ -276,7 +276,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp context.Settings.OpenApiSpecVersion = specVersion; // Act - var schema = context.CreateEdmTypeSchema(entityTypeReference); + var schema = context.CreateEdmTypeSchema(entityTypeReference, new()); // & Assert Assert.NotNull(schema); @@ -317,7 +317,7 @@ public void CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetString(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -348,7 +348,7 @@ public void CreateEdmTypeSchemaReturnSchemaForInt32(bool isNullable) IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetInt32(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -392,7 +392,7 @@ public void CreateEdmTypeSchemaReturnSchemaForDecimal(bool isNullable, bool IEEE IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetDecimal(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard // & Assert @@ -435,7 +435,7 @@ public void CreateEdmTypeSchemaReturnSchemaForInt64(bool isNullable, bool IEEE75 IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetInt64(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard // & Assert @@ -471,7 +471,7 @@ public void CreateEdmTypeSchemaReturnSchemaForGuid(bool isNullable) IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetGuid(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -506,7 +506,7 @@ public void CreateEdmTypeSchemaReturnSchemaForDouble(bool isNullable) IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetDouble(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard // & Assert @@ -540,7 +540,7 @@ public void CreateEdmTypeSchemaReturnSchemaForSingle(bool isNullable) IEdmTypeReference edmTypeReference = EdmCoreModel.Instance.GetSingle(isNullable); // Act - var schema = context.CreateEdmTypeSchema(edmTypeReference); + var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard // & Assert diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs index 6898c61ed..886868d91 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs @@ -22,7 +22,7 @@ public void AddsEmptyInnerErrorWhenNoComplexTypeIsProvided() }; ODataContext context = new(model, settings); - var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); + var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context, new()); Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Empty(schema.Properties); @@ -37,7 +37,7 @@ public void AddsInnerErrorPropertiesWhenComplexTypeIsProvided() }; ODataContext context = new(model, settings); - var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); + var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context, new()); Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.NotEmpty(schema.Properties); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 4a9062987..56a32bda6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -179,7 +179,7 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) ODataKeySegment keySegment = new ODataKeySegment(customer); // Act - var parameters = context.CreateKeyParameters(keySegment); + var parameters = context.CreateKeyParameters(keySegment, new()); // Assert Assert.NotNull(parameters); @@ -239,7 +239,7 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) ODataKeySegment keySegment = new ODataKeySegment(customer); // Act - var parameters = context.CreateKeyParameters(keySegment); + var parameters = context.CreateKeyParameters(keySegment, new()); // Assert Assert.NotNull(parameters); @@ -300,7 +300,7 @@ public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() }; // Act - var parameters = context.CreateKeyParameters(keySegment); + var parameters = context.CreateKeyParameters(keySegment, new()); var altParameter = parameters.Last(); // Assert @@ -346,7 +346,7 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() }; // Act - var parameters = context.CreateKeyParameters(keySegment); + var parameters = context.CreateKeyParameters(keySegment, new()); var altParameter1 = parameters.First(); var altParameter2 = parameters.Last(); @@ -601,9 +601,9 @@ public void CreateParametersWorks() Assert.NotNull(function3); // Act - IList parameters1 = context.CreateParameters(function1); - IList parameters2 = context.CreateParameters(function2); - IList parameters3 = context.CreateParameters(function3); + IList parameters1 = context.CreateParameters(function1, new()); + IList parameters2 = context.CreateParameters(function2, new()); + IList parameters3 = context.CreateParameters(function3, new()); // Assert Assert.NotNull(parameters1); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index cd0142659..762680356 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -56,7 +56,7 @@ public void CreateRequestBodyForActionImportThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateRequestBody(actionImport: null)); + Assert.Throws("context", () => context.CreateRequestBody(actionImport: null, new())); } [Fact] @@ -66,7 +66,7 @@ public void CreateRequestBodyForActionImportThrowArgumentNullActionImport() ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); // Act & Assert - Assert.Throws("actionImport", () => context.CreateRequestBody(actionImport: null)); + Assert.Throws("actionImport", () => context.CreateRequestBody(actionImport: null, new())); } [Fact] @@ -76,7 +76,7 @@ public void CreateRequestBodyForActionImportReturnCorrectRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_actionImport); + var requestBody = context.CreateRequestBody(_actionImport, new()); // Assert Assert.NotNull(requestBody); @@ -102,7 +102,7 @@ public void CanSerializeAsJsonFromTheCreatedRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_actionImport); + var requestBody = context.CreateRequestBody(_actionImport, new()); // Assert string json = requestBody.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -133,7 +133,7 @@ public void CreateRequestBodyForActionReturnCorrectRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_action); + var requestBody = context.CreateRequestBody(_action, new()); // Assert Assert.NotNull(requestBody); @@ -159,7 +159,7 @@ public void CreateRefRequestBodies() ODataContext context = new ODataContext(_model); // Act - var requestBodies = context.CreateRequestBodies(); + var requestBodies = context.CreateRequestBodies(new()); requestBodies.TryGetValue(Common.Constants.ReferencePostRequestBodyName, out Models.OpenApiRequestBody refPostBody); // Assert diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 3fc57708e..a3b09d738 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -48,7 +48,7 @@ public void CreateResponsesThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateResponses()); + Assert.Throws("context", () => context.CreateResponses(new())); } [Fact] @@ -64,7 +64,7 @@ public void CreatesCollectionResponses() ODataContext context = new(model, settings); // Act & Assert - var responses = context.CreateResponses(); + var responses = context.CreateResponses(new()); var flightCollectionResponse = responses["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; var stringCollectionResponse = responses["StringCollectionResponse"]; @@ -81,7 +81,7 @@ public void CreateResponsesReturnsCreatedResponses() ODataContext context = new ODataContext(model); // Act - var responses = context.CreateResponses(); + var responses = context.CreateResponses(new()); // Assert Assert.NotNull(responses); @@ -101,7 +101,7 @@ public void CanSerializeAsJsonFromTheCreatedResponses() ODataContext context = new ODataContext(model); // Act - var responses = context.CreateResponses(); + var responses = context.CreateResponses(new()); // Assert var response = responses["error"]; @@ -127,7 +127,7 @@ public void CreateResponseForoperationImportThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateResponses(operationImport: null)); + Assert.Throws("context", () => context.CreateResponses(operationImport: null, new())); } [Fact] @@ -137,7 +137,7 @@ public void CreateResponseForoperationImportThrowArgumentNullOperationImport() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("operationImport", () => context.CreateResponses(operationImport: null)); + Assert.Throws("operationImport", () => context.CreateResponses(operationImport: null, new())); } [Fact] @@ -147,7 +147,7 @@ public void CreateResponseForOperationThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateResponses(operation: null)); + Assert.Throws("context", () => context.CreateResponses(operation: null, new())); } [Fact] @@ -157,73 +157,73 @@ public void CreateResponseForOperationThrowArgumentNullOperation() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("operation", () => context.CreateResponses(operation: null)); - } - - [Theory] - [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] - [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] - [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] - [InlineData(false, OpenApiSpecVersion.OpenApi2_0)] - public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionImport, OpenApiSpecVersion specVersion) - { - // Arrange - string operationName = "GetPersonWithMostFriends"; - IEdmModel model = EdmModelHelper.TripServiceModel; - ODataContext context = new ODataContext(model); - - context.Settings.OpenApiSpecVersion = specVersion; - - // Act - OpenApiResponses responses; - if (isFunctionImport) - { - IEdmOperationImport operationImport = model.EntityContainer.OperationImports().First(o => o.Name == operationName); - Assert.NotNull(operationImport); // guard - ODataPath path = new ODataPath(new ODataOperationImportSegment(operationImport)); - responses = context.CreateResponses(operationImport); - } - else - { - IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == operationName); - Assert.NotNull(operation); // guard - ODataPath path = new ODataPath(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation); - } - - // Assert - Assert.NotNull(responses); - Assert.NotEmpty(responses); - Assert.Equal(2, responses.Count); - Assert.Equal(new string[] { "200", "default" }, responses.Select(r => r.Key)); - - OpenApiResponse response = responses["200"]; - Assert.NotNull(response.Content); - OpenApiMediaType mediaType = response.Content["application/json"]; - - // openApi version 2 should not use AnyOf - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.NotNull(mediaType.Schema); - Assert.Null(mediaType.Schema.AnyOf); - Assert.NotNull(mediaType.Schema.Reference); - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", mediaType.Schema.Reference.Id); - Assert.True(mediaType.Schema.Nullable); - } - else - { - Assert.NotNull(mediaType.Schema); - Assert.Null(mediaType.Schema.Reference); - Assert.NotNull(mediaType.Schema.AnyOf); - Assert.Equal(2, mediaType.Schema.AnyOf.Count); - var anyOfRef = mediaType.Schema.AnyOf.FirstOrDefault(); - Assert.NotNull(anyOfRef); - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", anyOfRef.Reference.Id); - var anyOfNull = mediaType.Schema.AnyOf.Skip(1).FirstOrDefault(); - Assert.NotNull(anyOfNull.Type); - Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); - Assert.True(anyOfNull.Nullable); - } + Assert.Throws("operation", () => context.CreateResponses(operation: null, new())); + } + + [Theory] + [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] + [InlineData(false, OpenApiSpecVersion.OpenApi2_0)] + public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionImport, OpenApiSpecVersion specVersion) + { + // Arrange + string operationName = "GetPersonWithMostFriends"; + IEdmModel model = EdmModelHelper.TripServiceModel; + ODataContext context = new ODataContext(model); + + context.Settings.OpenApiSpecVersion = specVersion; + + // Act + OpenApiResponses responses; + if (isFunctionImport) + { + IEdmOperationImport operationImport = model.EntityContainer.OperationImports().First(o => o.Name == operationName); + Assert.NotNull(operationImport); // guard + ODataPath path = new ODataPath(new ODataOperationImportSegment(operationImport)); + responses = context.CreateResponses(operationImport, new()); + } + else + { + IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == operationName); + Assert.NotNull(operation); // guard + ODataPath path = new ODataPath(new ODataOperationSegment(operation)); + responses = context.CreateResponses(operation, new()); + } + + // Assert + Assert.NotNull(responses); + Assert.NotEmpty(responses); + Assert.Equal(2, responses.Count); + Assert.Equal(new string[] { "200", "default" }, responses.Select(r => r.Key)); + + OpenApiResponse response = responses["200"]; + Assert.NotNull(response.Content); + OpenApiMediaType mediaType = response.Content["application/json"]; + + // openApi version 2 should not use AnyOf + if (specVersion == OpenApiSpecVersion.OpenApi2_0) + { + Assert.NotNull(mediaType.Schema); + Assert.Null(mediaType.Schema.AnyOf); + Assert.NotNull(mediaType.Schema.Reference); + Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", mediaType.Schema.Reference.Id); + Assert.True(mediaType.Schema.Nullable); + } + else + { + Assert.NotNull(mediaType.Schema); + Assert.Null(mediaType.Schema.Reference); + Assert.NotNull(mediaType.Schema.AnyOf); + Assert.Equal(2, mediaType.Schema.AnyOf.Count); + var anyOfRef = mediaType.Schema.AnyOf.FirstOrDefault(); + Assert.NotNull(anyOfRef); + Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", anyOfRef.Reference.Id); + var anyOfNull = mediaType.Schema.AnyOf.Skip(1).FirstOrDefault(); + Assert.NotNull(anyOfNull.Type); + Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); + Assert.True(anyOfNull.Nullable); + } } [Fact] @@ -242,8 +242,8 @@ public void CreateResponseForEdmFunctionOfStreamReturnTypeReturnsCorrectResponse Assert.NotNull(operation2); ODataPath path1 = new(new ODataOperationSegment(operation1)); ODataPath path2 = new(new ODataOperationSegment(operation2)); - OpenApiResponses responses1 = context.CreateResponses(operation1); - OpenApiResponses responses2 = context.CreateResponses(operation2); + OpenApiResponses responses1 = context.CreateResponses(operation1, new()); + OpenApiResponses responses2 = context.CreateResponses(operation2, new()); // Assert for operation1 --> getMailboxUsageStorage Assert.NotNull(responses1); @@ -283,14 +283,14 @@ public void CreateResponseForEdmActionReturnCorrectResponses(string actionName, IEdmOperationImport operationImport = model.EntityContainer.OperationImports().First(o => o.Name == actionName); Assert.NotNull(operationImport); // guard ODataPath path = new ODataPath(new ODataOperationImportSegment(operationImport)); - responses = context.CreateResponses(operationImport); + responses = context.CreateResponses(operationImport, new()); } else { IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == actionName); Assert.NotNull(operation); // guard ODataPath path = new ODataPath(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation); + responses = context.CreateResponses(operation, new()); } // Assert @@ -319,7 +319,7 @@ public void CreateResponseForEdmActionWhenErrorResponsesAsDefaultIsSet(string ac IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == actionName); Assert.NotNull(operation); // guard ODataPath path = new(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation); + responses = context.CreateResponses(operation, new()); // Assert Assert.NotNull(responses); @@ -351,7 +351,7 @@ public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableO IEdmFunction operation = model.SchemaElements.OfType().First(o => o.Name == "delta" && o.Parameters.First().Type.FullName() == "Collection(microsoft.graph.application)"); Assert.NotNull(operation); // guard - OpenApiResponses responses = context.CreateResponses(operation); + OpenApiResponses responses = context.CreateResponses(operation, new()); string json = responses.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); // Assert diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 5a53cc9da..a305bb020 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -29,9 +29,10 @@ public void CreateSchemasThrowArgumentNullContext() { // Arrange ODataContext context = null; + OpenApiDocument openApiDocument = new(); // Act & Assert - Assert.Throws("context", () => context.CreateSchemas()); + Assert.Throws("context", () => context.CreateSchemas(openApiDocument)); } [Theory] @@ -43,6 +44,7 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new() { EnableOperationId = true, @@ -52,7 +54,7 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo ODataContext context = new(model, settings); // Act & Assert - var schemas = context.CreateSchemas(); + var schemas = context.CreateSchemas(openApiDocument); var stringCollectionResponse = schemas["StringCollectionResponse"]; var flightCollectionResponse = schemas["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; @@ -86,6 +88,7 @@ public void CreatesRefRequestBodySchema() { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new() { EnableOperationId = true, @@ -94,7 +97,7 @@ public void CreatesRefRequestBodySchema() ODataContext context = new(model, settings); // Act & Assert - var schemas = context.CreateSchemas(); + var schemas = context.CreateSchemas(openApiDocument); schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out OpenApiSchema refRequestBody); @@ -112,6 +115,7 @@ public void CreatesRefOdataAnnotationResponseSchemas(bool enableOdataAnnotationR { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; + OpenApiDocument openApiDocument = new(); OpenApiConvertSettings settings = new() { EnableOperationId = true, @@ -122,7 +126,7 @@ public void CreatesRefOdataAnnotationResponseSchemas(bool enableOdataAnnotationR ODataContext context = new(model, settings); // Act - var schemas = context.CreateSchemas(); + var schemas = context.CreateSchemas(openApiDocument); // Assert Assert.NotNull(schemas); @@ -153,7 +157,7 @@ public void CreateStructuredTypeSchemaThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateStructuredTypeSchema(structuredType: null)); + Assert.Throws("context", () => context.CreateStructuredTypeSchema(structuredType: null, new())); } [Fact] @@ -163,7 +167,7 @@ public void CreateStructuredTypeSchemaThrowArgumentNullEnumType() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("structuredType", () => context.CreateStructuredTypeSchema(structuredType: null)); + Assert.Throws("structuredType", () => context.CreateStructuredTypeSchema(structuredType: null, new())); } [Fact] @@ -183,8 +187,8 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabled Assert.NotNull(derivedEntity); // Act - var schema = context.CreateStructuredTypeSchema(entity); - var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity); + var schema = context.CreateStructuredTypeSchema(entity, new()); + var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity, new()); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -273,7 +277,7 @@ public void CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValueEnable Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex); + var schema = context.CreateStructuredTypeSchema(complex, new()); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -352,7 +356,7 @@ public void CreateStructuredTypePropertiesSchemaWithCustomAttributeReturnsCorrec Assert.NotNull(entity); // Guard // Act - OpenApiSchema schema = context.CreateStructuredTypeSchema(entity); + OpenApiSchema schema = context.CreateStructuredTypeSchema(entity, new()); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -445,7 +449,7 @@ public void CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex); + var schema = context.CreateStructuredTypeSchema(complex, new()); // Assert Assert.NotNull(schema); @@ -498,7 +502,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex); + var schema = context.CreateStructuredTypeSchema(complex, new()); // Assert Assert.NotNull(schema); @@ -590,7 +594,7 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity); + var schema = context.CreateStructuredTypeSchema(entity, new()); // Assert Assert.NotNull(schema); @@ -651,7 +655,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity); + var schema = context.CreateStructuredTypeSchema(entity, new()); // Assert Assert.NotNull(schema); @@ -727,7 +731,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity); + var schema = context.CreateStructuredTypeSchema(entity, new()); // Assert Assert.NotNull(schema); @@ -777,7 +781,7 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDefaultValueForOdataTypeP Assert.NotNull(entityType); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entityType); + var schema = context.CreateStructuredTypeSchema(entityType, new()); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -864,7 +868,7 @@ public void CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSp IEdmProperty property = new EdmStructuralProperty(entitType, "ColorEnumValue", new EdmEnumTypeReference(enumType, false)); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(specVersion); @@ -900,7 +904,7 @@ public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecV IEdmProperty property = new EdmStructuralProperty(entitType, "ColorEnumValue", new EdmEnumTypeReference(enumType, true), "yellow"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(specVersion); _output.WriteLine(json); @@ -944,7 +948,7 @@ public void CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema(OpenA IEdmProperty property = entityType.Properties().FirstOrDefault(x => x.Name == "duration"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); string json = schema.SerializeAsJson(specVersion); @@ -979,11 +983,12 @@ public void GetDerivedTypesReferenceSchemaReturnsDerivedTypesReferencesInSchemaI { // Arrange IEdmModel edmModel = EdmModelHelper.GraphBetaModel; + OpenApiDocument openApiDocument = new(); IEdmEntityType entityType = edmModel.SchemaElements.OfType().First(c => c.Name == "directoryObject"); OpenApiSchema schema = null; // Act - schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel); + schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel, openApiDocument); int derivedTypesCount = edmModel.FindAllDerivedTypes(entityType).OfType().Count() + 1; // + 1 the base type // Assert @@ -996,11 +1001,12 @@ public void GetDerivedTypesReferenceSchemaReturnsNullSchemaIfNotExist() { // Arrange IEdmModel edmModel = EdmModelHelper.GraphBetaModel; + OpenApiDocument openApiDocument = new(); IEdmEntityType entityType = edmModel.SchemaElements.OfType().First(c => c.Name == "administrativeUnit"); OpenApiSchema schema = null; // Act - schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel); + schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel, openApiDocument); // Assert Assert.Null(schema); @@ -1018,7 +1024,7 @@ public void NonNullableBooleanPropertyWithDefaultValueWorks() entitType, "BooleanValue", EdmCoreModel.Instance.GetBoolean(false), "false"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); // Assert Assert.NotNull(schema); @@ -1043,7 +1049,7 @@ public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() entitType, "BinaryValue", binaryType, "T0RhdGE"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); // Assert Assert.NotNull(schema); @@ -1068,7 +1074,7 @@ public void NonNullableIntegerPropertyWithDefaultValueWorks() entitType, "IntegerValue", EdmCoreModel.Instance.GetInt32(false), "-128"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); // Assert Assert.NotNull(schema); @@ -1094,7 +1100,7 @@ public void NonNullableDoublePropertyWithDefaultStringWorks() entitType, "DoubleValue", EdmCoreModel.Instance.GetDouble(false), "3.1415926535897931"); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); // Assert Assert.NotNull(schema); @@ -1136,7 +1142,7 @@ public void NonNullableUntypedPropertyWorks() entitType, "UntypedProperty", EdmCoreModel.Instance.GetUntyped()); // Act - var schema = context.CreatePropertySchema(property); + var schema = context.CreatePropertySchema(property, new()); // Assert Assert.NotNull(schema); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs index a036b1ca6..e1b9f42d2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs @@ -22,7 +22,7 @@ public void CreateSpatialSchemasThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateSpatialSchemas()); + Assert.Throws("context", () => context.CreateSpatialSchemas(new())); } [Fact] @@ -32,7 +32,7 @@ public void CreateSpatialSchemasReturnEmptyForCoreModel() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act - var schemas = context.CreateSpatialSchemas(); + var schemas = context.CreateSpatialSchemas(new()); // Assert Assert.NotNull(schemas); @@ -51,7 +51,7 @@ public void CreateSpatialSchemasReturnFullSpatialSchemasForModelWithEdmSpatialTy ODataContext context = new ODataContext(model); // Act - var schemas = context.CreateSpatialSchemas(); + var schemas = context.CreateSpatialSchemas(new()); // Assert Assert.NotNull(schemas); @@ -85,7 +85,7 @@ public void CreateSpatialSchemasReturnFullSpatialSchemasForModelWithEdmSpatialTy public void CreateEdmGeographySchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographySchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographySchema(new()); Assert.NotNull(schema); // guard // Act @@ -101,7 +101,7 @@ public void CreateEdmGeographySchemaSerializeAsJsonWorks() public void CreateEdmGeographyPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPointSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPointSchema(new()); Assert.NotNull(schema); // guard // Act @@ -117,7 +117,7 @@ public void CreateEdmGeographyPointSchemaSerializeAsJsonWorks() public void CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyLineStringSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyLineStringSchema(new()); Assert.NotNull(schema); // guard // Act @@ -133,7 +133,7 @@ public void CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() public void CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPolygonSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPolygonSchema(new()); Assert.NotNull(schema); // guard // Act @@ -149,7 +149,7 @@ public void CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() public void CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPointSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPointSchema(new()); Assert.NotNull(schema); // guard // Act @@ -165,7 +165,7 @@ public void CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() public void CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiLineStringSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiLineStringSchema(new()); Assert.NotNull(schema); // guard // Act @@ -181,7 +181,7 @@ public void CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() public void CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPolygonSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPolygonSchema(new()); Assert.NotNull(schema); // guard // Act @@ -197,7 +197,7 @@ public void CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() public void CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyCollectionSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyCollectionSchema(new()); Assert.NotNull(schema); // guard // Act @@ -213,7 +213,7 @@ public void CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() public void CreateEdmGeometrySchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometrySchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometrySchema(new()); Assert.NotNull(schema); // guard // Act @@ -252,7 +252,7 @@ public void CreateEdmGeometrySchemaSerializeAsJsonWorks() public void CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPointSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPointSchema(new()); Assert.NotNull(schema); // guard // Act @@ -278,7 +278,7 @@ public void CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml public void CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryLineStringSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryLineStringSchema(new()); Assert.NotNull(schema); // guard // Act @@ -312,7 +312,7 @@ public void CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() public void CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPolygonSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPolygonSchema(new()); Assert.NotNull(schema); // guard // Act @@ -349,7 +349,7 @@ public void CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() public void CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPointSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPointSchema(new()); Assert.NotNull(schema); // guard // Act @@ -382,7 +382,7 @@ public void CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() public void CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test yaml { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiLineStringSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiLineStringSchema(new()); Assert.NotNull(schema); // guard // Act @@ -410,7 +410,7 @@ public void CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test public void CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPolygonSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPolygonSchema(new()); Assert.NotNull(schema); // guard // Act @@ -450,7 +450,7 @@ public void CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() public void CreateEdmGeometryCollectionSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryCollectionSchema(); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryCollectionSchema(new()); Assert.NotNull(schema); // guard // Act From 7793d76357fa3c5cb6028f28af9131066d93e62e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 11:53:21 -0500 Subject: [PATCH 023/103] chore: linting Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs index 1033fb509..67ffd92bf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs @@ -152,11 +152,11 @@ internal static void AddCustomAttributesToExtensions(this IDictionary atrributesValueMap = GetCustomXMLAttributesValueMapping(context.Model, element, context.Settings.CustomXMLAttributesMapping); + Dictionary attributesValueMap = GetCustomXMLAttributesValueMapping(context.Model, element, context.Settings.CustomXMLAttributesMapping); - if (atrributesValueMap?.Any() ?? false) + if (attributesValueMap?.Any() ?? false) { - foreach (var item in atrributesValueMap) + foreach (var item in attributesValueMap) { extensions.TryAdd(item.Key, new OpenApiAny(item.Value)); } @@ -173,13 +173,13 @@ internal static void AddCustomAttributesToExtensions(this IDictionaryA dictionary of extension names mapped to the custom attribute values. private static Dictionary GetCustomXMLAttributesValueMapping(IEdmModel model, IEdmElement element, Dictionary customXMLAttributesMapping) { - Dictionary atrributesValueMap = new(); + Dictionary attributesValueMap = new(); if ((!customXMLAttributesMapping?.Any() ?? true) || model == null || element == null) { - return atrributesValueMap; + return attributesValueMap; } foreach (var item in customXMLAttributesMapping) @@ -193,11 +193,11 @@ private static Dictionary GetCustomXMLAttributesValueMapping(IEd if (!string.IsNullOrEmpty(attributeValue)) { - atrributesValueMap.TryAdd(extensionName, attributeValue); + attributesValueMap.TryAdd(extensionName, attributeValue); } } - return atrributesValueMap; + return attributesValueMap; } /// From 4b539adeb7ddba3f61c8642ad55b7d5b05c0273f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:06:37 -0500 Subject: [PATCH 024/103] fix: registers the component schemas for further lookup Signed-off-by: Vincent Biret --- .../Generator/OpenApiComponentsGenerator.cs | 47 ++----- .../Generator/OpenApiSchemaGenerator.cs | 132 +++++++++--------- .../Generator/OpenApiSchemaGeneratorTests.cs | 24 ++-- .../ODataTypeCastGetOperationHandlerTests.cs | 40 ++++-- 4 files changed, 120 insertions(+), 123 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index 9d1685b04..3764334c9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -26,42 +26,17 @@ public static OpenApiComponents CreateComponents(this ODataContext context, Open { Utils.CheckArgumentNull(context, nameof(context)); - // "components": { - // "schemas": …, - // "parameters": …, - // "responses": …, - // "requestBodies": … - // } - return new OpenApiComponents - { - // The value of schemas is a map of Schema Objects. - // Each entity type, complex type, enumeration type, and type definition directly - // or indirectly used in the paths field is represented as a name/value pair of the schemas map. - Schemas = context.CreateSchemas(document), - - // The value of parameters is a map of Parameter Objects. - // It allows defining query options and headers that can be reused across operations of the service. - Parameters = context.CreateParameters(), - - // The value of responses is a map of Response Objects. - // It allows defining responses that can be reused across operations of the service. - Responses = context.CreateResponses(document), - - // The value of requestBodies is a map of RequestBody Objects. - // It allows refining request bodies that can be reused across operations of the service. - RequestBodies = context.CreateRequestBodies(document), - - Examples = context.CreateExamples(), - - SecuritySchemes = context.CreateSecuritySchemes(), - - // Make others as null. - Links = null, - - Callbacks = null, - - Extensions = null - }; + context.AddSchemasToDocument(document); + //TODO convert all other create methods to add + document.Components.Parameters = context.CreateParameters(); + document.Components.Responses = context.CreateResponses(document); + document.Components.RequestBodies = context.CreateRequestBodies(document); + document.Components.Examples = context.CreateExamples(); + document.Components.SecuritySchemes = context.CreateSecuritySchemes(); + document.Components.Links = null; + document.Components.Callbacks = null; + document.Components.Extensions = null; + return document.Components; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 8d07b1832..de5154476 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -29,82 +29,39 @@ namespace Microsoft.OpenApi.OData.Generator internal static class OpenApiSchemaGenerator { /// - /// Create the dictionary of object. - /// The name of each pair is the namespace-qualified name of the type. It uses the namespace instead of the alias. - /// The value of each pair is a . + /// Adds the component schemas to the Open API document. /// /// The OData to Open API context. /// The Open API document to use for references lookup. - /// The string/schema dictionary. - public static IDictionary CreateSchemas(this ODataContext context, OpenApiDocument document) + public static void AddSchemasToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(document, nameof(document)); - IDictionary schemas = new Dictionary(); - - // Each entity type, complex type, enumeration type, and type definition directly - // or indirectly used in the paths field is represented as a name / value pair of the schemas map. - // Ideally this would be driven off the types used in the paths, but in practice, it is simply - // all of the types present in the model. - IEnumerable elements = context.Model.GetAllElements(); - - foreach (var element in elements) - { - switch (element.SchemaElementKind) - { - case EdmSchemaElementKind.TypeDefinition: // Type definition - { - IEdmType reference = (IEdmType)element; - var fullTypeName = reference.FullTypeName(); - if(reference is IEdmComplexType && - fullTypeName.Split(['.'], StringSplitOptions.RemoveEmptyEntries) - .Last() - .Equals(context.Settings.InnerErrorComplexTypeName, StringComparison.Ordinal)) - continue; - - schemas.Add(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); - } - break; - } - } - // append the Edm.Spatial foreach(var schema in context.CreateSpatialSchemas(document)) { - schemas[schema.Key] = schema.Value; + document.AddComponentSchema(schema.Key, schema.Value); } // append the OData errors foreach(var schema in context.CreateODataErrorSchemas(document)) { - schemas[schema.Key] = schema.Value; + document.AddComponentSchema(schema.Key, schema.Value); } if(context.Settings.EnableDollarCountPath) - schemas[Constants.DollarCountSchemaName] = new OpenApiSchema { + document.AddComponentSchema(Constants.DollarCountSchemaName, new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64" - }; + }); - schemas = schemas.Concat(context.GetAllCollectionEntityTypes() - .Select(x => new KeyValuePair( - $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x, document))) - .Where(x => !schemas.ContainsKey(x.Key))) - .Concat(context.GetAllCollectionComplexTypes() - .Select(x => new KeyValuePair( - $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x, document))) - .Where(x => !schemas.ContainsKey(x.Key))) - .ToDictionary(x => x.Key, x => x.Value); - if(context.HasAnyNonContainedCollections()) { - schemas[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document); + document.AddComponentSchema($"String{Constants.CollectionSchemaSuffix}", CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document)); } - schemas[Constants.ReferenceUpdateSchemaName] = new() + document.AddComponentSchema(Constants.ReferenceUpdateSchemaName, new() { Type = JsonSchemaType.Object, Properties = new Dictionary @@ -112,9 +69,9 @@ public static IDictionary CreateSchemas(this ODataContext {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }}, {Constants.OdataType, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }}, } - }; + }); - schemas[Constants.ReferenceCreateSchemaName] = new() + document.AddComponentSchema(Constants.ReferenceCreateSchemaName, new() { Type = JsonSchemaType.Object, Properties = new Dictionary @@ -122,9 +79,9 @@ public static IDictionary CreateSchemas(this ODataContext {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }} }, AdditionalProperties = new OpenApiSchema { Type = JsonSchemaType.Object } - }; + }); - schemas[Constants.ReferenceNumericName] = new() + document.AddComponentSchema(Constants.ReferenceNumericName, new() { Type = JsonSchemaType.String, Nullable = true, @@ -134,39 +91,80 @@ public static IDictionary CreateSchemas(this ODataContext "INF", "NaN" ] - }; + }); if (context.Settings.EnableODataAnnotationReferencesForResponses) { // @odata.nextLink + @odata.count if (context.Settings.EnablePagination || context.Settings.EnableCount) { - schemas[Constants.BaseCollectionPaginationCountResponse] = new() + var responseSchema = new OpenApiSchema() { Title = "Base collection pagination and count responses", Type = JsonSchemaType.Object, }; + document.AddComponentSchema(Constants.BaseCollectionPaginationCountResponse, responseSchema); if (context.Settings.EnableCount) - schemas[Constants.BaseCollectionPaginationCountResponse].Properties.Add(ODataConstants.OdataCount); + responseSchema.Properties.Add(ODataConstants.OdataCount); if (context.Settings.EnablePagination) - schemas[Constants.BaseCollectionPaginationCountResponse].Properties.Add(ODataConstants.OdataNextLink); + responseSchema.Properties.Add(ODataConstants.OdataNextLink); } // @odata.nextLink + @odata.deltaLink if (context.Model.SchemaElements.OfType().Any(static x => x.IsDeltaFunction())) { - schemas[Constants.BaseDeltaFunctionResponse] = new() + document.AddComponentSchema(Constants.BaseDeltaFunctionResponse, new() { Title = "Base delta function response", - Type = JsonSchemaType.Object - }; - schemas[Constants.BaseDeltaFunctionResponse].Properties.Add(ODataConstants.OdataNextLink); - schemas[Constants.BaseDeltaFunctionResponse].Properties.Add(ODataConstants.OdataDeltaLink); + Type = JsonSchemaType.Object, + Properties = new Dictionary + { + {ODataConstants.OdataNextLink.Key, ODataConstants.OdataNextLink.Value}, + {ODataConstants.OdataDeltaLink.Key, ODataConstants.OdataDeltaLink.Value} + } + }); + } + } + + // Each entity type, complex type, enumeration type, and type definition directly + // or indirectly used in the paths field is represented as a name / value pair of the schemas map. + // Ideally this would be driven off the types used in the paths, but in practice, it is simply + // all of the types present in the model. + IEnumerable elements = context.Model.GetAllElements(); + + foreach (var element in elements) + { + switch (element.SchemaElementKind) + { + case EdmSchemaElementKind.TypeDefinition: // Type definition + { + IEdmType reference = (IEdmType)element; + var fullTypeName = reference.FullTypeName(); + if(reference is IEdmComplexType && + fullTypeName.Split(['.'], StringSplitOptions.RemoveEmptyEntries) + .Last() + .Equals(context.Settings.InnerErrorComplexTypeName, StringComparison.Ordinal)) + continue; + + document.AddComponentSchema(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); + } + break; } } - return schemas; + foreach(var collectionEntry in context.GetAllCollectionEntityTypes() + .Select(x => new KeyValuePair( + $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", + CreateCollectionSchema(context, x, document))) + .Concat(context.GetAllCollectionComplexTypes() + .Select(x => new KeyValuePair( + $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", + CreateCollectionSchema(context, x, document)))) + .ToArray()) + { + document.AddComponentSchema(collectionEntry.Key, collectionEntry.Value); + } } internal static bool HasAnyNonContainedCollections(this ODataContext context) { @@ -427,6 +425,7 @@ public static IDictionary CreateStructuredTypePropertiesS { OpenApiSchema propertySchema = context.CreatePropertySchema(property, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); + propertySchema.Extensions ??= new Dictionary(); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); properties.Add(property.Name, propertySchema); } @@ -436,8 +435,9 @@ public static IDictionary CreateStructuredTypePropertiesS { OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); + propertySchema.Extensions ??= new Dictionary(); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); - propertySchema.Extensions?.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); + propertySchema.Extensions.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); properties.Add(property.Name, propertySchema); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index a305bb020..578906d6a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.Tests { public class OpenApiSchemaGeneratorTest { - private ITestOutputHelper _output; + private readonly ITestOutputHelper _output; public OpenApiSchemaGeneratorTest(ITestOutputHelper output) { _output = output; @@ -32,7 +32,7 @@ public void CreateSchemasThrowArgumentNullContext() OpenApiDocument openApiDocument = new(); // Act & Assert - Assert.Throws("context", () => context.CreateSchemas(openApiDocument)); + Assert.Throws("context", () => context.AddSchemasToDocument(openApiDocument)); } [Theory] @@ -54,10 +54,10 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo ODataContext context = new(model, settings); // Act & Assert - var schemas = context.CreateSchemas(openApiDocument); + context.AddSchemasToDocument(openApiDocument); - var stringCollectionResponse = schemas["StringCollectionResponse"]; - var flightCollectionResponse = schemas["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; + var stringCollectionResponse = openApiDocument.Components.Schemas["StringCollectionResponse"]; + var flightCollectionResponse = openApiDocument.Components.Schemas["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; if (enablePagination || enableCount) { @@ -97,9 +97,9 @@ public void CreatesRefRequestBodySchema() ODataContext context = new(model, settings); // Act & Assert - var schemas = context.CreateSchemas(openApiDocument); + context.AddSchemasToDocument(openApiDocument); - schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out OpenApiSchema refRequestBody); + openApiDocument.Components.Schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out OpenApiSchema refRequestBody); Assert.NotNull(refRequestBody); Assert.Equal(JsonSchemaType.Object, refRequestBody.Type); @@ -126,13 +126,13 @@ public void CreatesRefOdataAnnotationResponseSchemas(bool enableOdataAnnotationR ODataContext context = new(model, settings); // Act - var schemas = context.CreateSchemas(openApiDocument); + context.AddSchemasToDocument(openApiDocument); // Assert - Assert.NotNull(schemas); - Assert.NotEmpty(schemas); - schemas.TryGetValue(Constants.BaseCollectionPaginationCountResponse, out OpenApiSchema refPaginationCount); - schemas.TryGetValue(Constants.BaseDeltaFunctionResponse, out OpenApiSchema refDeltaFunc); + Assert.NotNull(openApiDocument.Components.Schemas); + Assert.NotEmpty(openApiDocument.Components.Schemas); + openApiDocument.Components.Schemas.TryGetValue(Constants.BaseCollectionPaginationCountResponse, out OpenApiSchema refPaginationCount); + openApiDocument.Components.Schemas.TryGetValue(Constants.BaseDeltaFunctionResponse, out OpenApiSchema refDeltaFunc); if (enableOdataAnnotationRef) { Assert.NotNull(refPaginationCount); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index 3bd0a3f03..28c6b2844 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -5,15 +5,15 @@ 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; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests; public class ODataTypeCastGetOperationHandlerTests { - private readonly ODataTypeCastGetOperationHandler _operationHandler = new (new()); - [Theory] [InlineData(true, true, true)] [InlineData(true, false, true)] @@ -42,8 +42,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN new ODataNavigationPropertySegment(navProperty), new ODataTypeCastSegment(employee, model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -101,8 +104,12 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN new ODataKeySegment(people.EntityType), new ODataTypeCastSegment(employee,model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); + // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -154,8 +161,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySet(b ODataPath path = new(new ODataNavigationSourceSegment(people), new ODataTypeCastSegment(employee,model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -209,8 +219,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySetId new ODataKeySegment(people.EntityType), new ODataTypeCastSegment(employee,model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -266,8 +279,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig new ODataNavigationPropertySegment(navProperty), new ODataTypeCastSegment(employee, model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -319,8 +335,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleton(b ODataPath path = new(new ODataNavigationSourceSegment(me), new ODataTypeCastSegment(employee, model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); @@ -367,8 +386,11 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig new ODataNavigationPropertySegment(navProperty), new ODataTypeCastSegment(manager, model)); + var document = new OpenApiDocument(); + context.AddSchemasToDocument(document); + ODataTypeCastGetOperationHandler operationHandler = new (document); // Act - var operation = _operationHandler.CreateOperation(context, path); + var operation = operationHandler.CreateOperation(context, path); // Assert Assert.NotNull(operation); From cd27a72e18ef516e26c07202adc2ae9684a6f4ac Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:13:43 -0500 Subject: [PATCH 025/103] fix: NRT on properties Signed-off-by: Vincent Biret --- .../Operation/ODataTypeCastGetOperationHandlerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index 28c6b2844..af4eeade2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -137,7 +137,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN { Assert.Null(operation.OperationId); } - Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties.ContainsKey("value")); + Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties?.ContainsKey("value") ?? false); } [Theory] [InlineData(true, true)] From 826a05ad8ec9b3fc7586ec58dfa21a518f61e69c Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:16:37 -0500 Subject: [PATCH 026/103] fix: NRT on properties Signed-off-by: Vincent Biret --- .../Operation/ODataTypeCastGetOperationHandlerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index af4eeade2..c1cbe8538 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -251,7 +251,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySetId { Assert.Null(operation.OperationId); } - Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties.ContainsKey("value")); + Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties?.ContainsKey("value") ?? false); } [Theory] [InlineData(true, true)] From b2ba0ec52eaee4ceb931b066759c6625333e79e9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:17:51 -0500 Subject: [PATCH 027/103] fix: further NRT issues Signed-off-by: Vincent Biret --- .../Operation/ODataTypeCastGetOperationHandlerTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index c1cbe8538..89fc3df45 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -311,7 +311,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig { Assert.Null(operation.OperationId); } - Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties.ContainsKey("value")); + Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties?.ContainsKey("value") ?? false); } [Theory] [InlineData(true, true)] @@ -367,7 +367,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleton(b { Assert.Null(operation.OperationId); } - Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties.ContainsKey("value")); + Assert.False(operation.Responses["200"].Content["application/json"].Schema.Properties?.ContainsKey("value") ?? false); } [Fact] public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavigationPropertyWithTargetPathAnnotations() From bb8bc1c5a007c9219db9c59c21f41637b9eb7be1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:31:16 -0500 Subject: [PATCH 028/103] fix: minor json comparison fixes Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGeneratorTests.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 578906d6a..55ac435ed 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -832,7 +833,7 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() Assert.NotNull(schema.Enum); Assert.Equal(2, schema.Enum.Count); - Assert.Equal([ "Blue", "White" ], schema.Enum.Select(e => e)); + Assert.Equal([ "Blue", "White" ], schema.Enum.Select(e => e.ToString())); // Act string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); @@ -950,28 +951,28 @@ public void CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema(OpenA // Act var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(specVersion); + var json = JsonNode.Parse(schema.SerializeAsJson(specVersion)); // Assert if (specVersion == OpenApiSpecVersion.OpenApi2_0) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""format"": ""duration"", ""description"": ""The length of the appointment, denoted in ISO8601 format."", ""pattern"": ""^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$"", ""type"": ""string"", ""readOnly"": true -}".ChangeLineBreaks(), json); +}"), json)); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""pattern"": ""^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$"", ""type"": ""string"", ""description"": ""The length of the appointment, denoted in ISO8601 format."", ""format"": ""duration"", ""readOnly"": true -}".ChangeLineBreaks(), json); +}"), json)); } } #endregion From fd763c037270544c47f125c153e107f55cbbcf6a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 12:58:29 -0500 Subject: [PATCH 029/103] chore; first batch of change line breaks removal Signed-off-by: Vincent Biret --- .../EdmModelOpenApiExtensionsTest.cs | 145 +++++++++--------- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 59 +++---- .../OpenApiParameterGeneratorTests.cs | 55 +++---- 3 files changed, 130 insertions(+), 129 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index d26f909b6..ea0405785 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -5,6 +5,7 @@ using System; using System.IO; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Xunit; @@ -14,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Tests { public class EdmModelOpenApiExtensionsTest { - private ITestOutputHelper _output; + private readonly ITestOutputHelper _output; public EdmModelOpenApiExtensionsTest(ITestOutputHelper output) { @@ -38,23 +39,24 @@ public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; - var openApiConvertSettings = new OpenApiConvertSettings(); - openApiConvertSettings.OpenApiSpecVersion = specVersion; - openApiConvertSettings.IncludeAssemblyInfo = false; + var openApiConvertSettings = new OpenApiConvertSettings + { + OpenApiSpecVersion = specVersion, + IncludeAssemblyInfo = false + }; // Act string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); _output.WriteLine(json); + var parsedJson = JsonNode.Parse(json); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Empty.OpenApi.V2.json", + OpenApiSpecVersion.OpenApi3_0 => "Empty.OpenApi.json", + _ => throw new NotImplementedException() + }; // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Empty.OpenApi.V2.json").ChangeLineBreaks(), json); - } - else - { - Assert.Equal(Resources.GetString("Empty.OpenApi.json").ChangeLineBreaks(), json); - } + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); } [Theory] @@ -64,23 +66,24 @@ public void EmptyEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; - var openApiConvertSettings = new OpenApiConvertSettings(); - openApiConvertSettings.OpenApiSpecVersion = specVersion; - openApiConvertSettings.IncludeAssemblyInfo = false; + var openApiConvertSettings = new OpenApiConvertSettings + { + OpenApiSpecVersion = specVersion, + IncludeAssemblyInfo = false + }; // Act string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); _output.WriteLine(yaml); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Empty.OpenApi.V2.yaml", + OpenApiSpecVersion.OpenApi3_0 => "Empty.OpenApi.yaml", + _ => throw new NotImplementedException() + }; + // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Empty.OpenApi.V2.yaml").ChangeLineBreaks(), yaml); - } - else - { - Assert.Equal(Resources.GetString("Empty.OpenApi.yaml").ChangeLineBreaks(), yaml); - } + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); } [Theory] @@ -101,16 +104,15 @@ public void BasicEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) // Act string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); _output.WriteLine(json); + var parsedJson = JsonNode.Parse(json); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Basic.OpenApi.V2.json", + OpenApiSpecVersion.OpenApi3_0 => "Basic.OpenApi.json", + _ => throw new NotImplementedException() + }; // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Basic.OpenApi.V2.json").ChangeLineBreaks(), json); - } - else - { - Assert.Equal(Resources.GetString("Basic.OpenApi.json").ChangeLineBreaks(), json); - } + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); } [Theory] @@ -132,15 +134,14 @@ public void BasicEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVersion) string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); _output.WriteLine(yaml); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Basic.OpenApi.V2.yaml", + OpenApiSpecVersion.OpenApi3_0 => "Basic.OpenApi.yaml", + _ => throw new NotImplementedException() + }; + // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Basic.OpenApi.V2.yaml").ChangeLineBreaks(), yaml); - } - else - { - Assert.Equal(Resources.GetString("Basic.OpenApi.yaml").ChangeLineBreaks(), yaml); - } + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); } [Theory] @@ -163,15 +164,15 @@ public void MultipleSchemasEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVer string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); _output.WriteLine(json); + var parsedJson = JsonNode.Parse(json); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Multiple.Schema.OpenApi.V2.json", + OpenApiSpecVersion.OpenApi3_0 => "Multiple.Schema.OpenApi.json", + _ => throw new NotImplementedException() + }; + // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Multiple.Schema.OpenApi.V2.json").ChangeLineBreaks(), json); - } - else - { - Assert.Equal(Resources.GetString("Multiple.Schema.OpenApi.json").ChangeLineBreaks(), json); - } + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); } [Theory] @@ -194,15 +195,14 @@ public void MultipleSchemasEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVer string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); _output.WriteLine(yaml); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "Multiple.Schema.OpenApi.V2.yaml", + OpenApiSpecVersion.OpenApi3_0 => "Multiple.Schema.OpenApi.yaml", + _ => throw new NotImplementedException() + }; + // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("Multiple.Schema.OpenApi.V2.yaml").ChangeLineBreaks(), yaml); - } - else - { - Assert.Equal(Resources.GetString("Multiple.Schema.OpenApi.yaml").ChangeLineBreaks(), yaml); - } + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); } [Theory] @@ -227,16 +227,16 @@ public void TripServiceMetadataToOpenApiJsonWorks(OpenApiSpecVersion specVersion // Act string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, settings); _output.WriteLine(json); + var parsedJson = JsonNode.Parse(json); + + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "TripService.OpenApi.V2.json", + OpenApiSpecVersion.OpenApi3_0 => "TripService.OpenApi.json", + _ => throw new NotImplementedException() + }; // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("TripService.OpenApi.V2.json").ChangeLineBreaks(), json); - } - else - { - Assert.Equal(Resources.GetString("TripService.OpenApi.json").ChangeLineBreaks(), json); - } + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); } [Theory] @@ -264,25 +264,24 @@ public void TripServiceMetadataToOpenApiYamlWorks(OpenApiSpecVersion specVersion string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, settings); _output.WriteLine(yaml); + var fileName = specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => "TripService.OpenApi.V2.yaml", + OpenApiSpecVersion.OpenApi3_0 => "TripService.OpenApi.yaml", + _ => throw new NotImplementedException() + }; + // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.Equal(Resources.GetString("TripService.OpenApi.V2.yaml").ChangeLineBreaks(), yaml); - } - else - { - Assert.Equal(Resources.GetString("TripService.OpenApi.yaml").ChangeLineBreaks(), yaml); - } + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); } private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, OpenApiConvertSettings settings = null) { - settings = settings ?? new OpenApiConvertSettings(); + settings ??= new OpenApiConvertSettings(); var document = model.ConvertToOpenApi(settings); Assert.NotNull(document); // guard - MemoryStream stream = new MemoryStream(); + MemoryStream stream = new(); document.Serialize(stream, settings.OpenApiSpecVersion, target); stream.Flush(); stream.Position = 0; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 44da6b4a6..c13d3b955 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -61,26 +62,26 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(Open // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(context.Settings.OpenApiSpecVersion); + var json = JsonNode.Parse(schema.SerializeAsJson(context.Settings.OpenApiSpecVersion)); // & Assert if (specVersion == OpenApiSpecVersion.OpenApi2_0) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""array"", ""items"": { ""$ref"": ""#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"" } -}".ChangeLineBreaks(), json); +}"), json)); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""array"", ""items"": { ""$ref"": ""#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"" } -}".ChangeLineBreaks(), json); +}"), json)); } } @@ -97,15 +98,15 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""array"", ""items"": { ""$ref"": ""#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"" } -}".ChangeLineBreaks(), json); +}"), json)); } [Fact] @@ -120,15 +121,15 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""array"", ""items"": { ""type"": ""string"" } -}".ChangeLineBreaks(), json); +}"), json)); } [Fact] @@ -143,10 +144,10 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""array"", ""items"": { ""maximum"": 2147483647, @@ -155,7 +156,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() ""format"": ""int32"", ""nullable"": true } -}".ChangeLineBreaks(), json); +}"), json)); } [Theory] @@ -319,21 +320,21 @@ public void CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""string"", ""nullable"": true -}".ChangeLineBreaks(), json); +}"), json)); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""string"" -}".ChangeLineBreaks(), json); +}"), json)); } } @@ -350,27 +351,27 @@ public void CreateEdmTypeSchemaReturnSchemaForInt32(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maximum"": 2147483647, ""minimum"": -2147483648, ""type"": ""number"", ""format"": ""int32"", ""nullable"": true -}".ChangeLineBreaks(), json); +}"), json)); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maximum"": 2147483647, ""minimum"": -2147483648, ""type"": ""number"", ""format"": ""int32"" -}".ChangeLineBreaks(), json); +}"), json)); } } @@ -473,25 +474,25 @@ public void CreateEdmTypeSchemaReturnSchemaForGuid(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""pattern"": ""^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"", ""type"": ""string"", ""format"": ""uuid"", ""nullable"": true -}".ChangeLineBreaks(), json); +}"), json)); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""pattern"": ""^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"", ""type"": ""string"", ""format"": ""uuid"" -}".ChangeLineBreaks(), json); +}"), json)); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 56a32bda6..86b711680 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -48,8 +49,8 @@ public void CreateParametersReturnsCreatedParameters() Assert.Collection(parameters, item => // $top { - string json = item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""$top"", ""in"": ""query"", ""description"": ""Show only the first n items"", @@ -61,14 +62,14 @@ public void CreateParametersReturnsCreatedParameters() ""format"": ""int64"" }, ""example"": 50 -}"; +}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); }, item => // $skip { - string json = item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""$skip"", ""in"": ""query"", ""description"": ""Skip the first n items"", @@ -79,14 +80,14 @@ public void CreateParametersReturnsCreatedParameters() ""type"": ""number"", ""format"": ""int64"" } -}"; +}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); }, item => // $count { - string json = item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""$count"", ""in"": ""query"", ""description"": ""Include count of items"", @@ -95,14 +96,14 @@ public void CreateParametersReturnsCreatedParameters() ""schema"": { ""type"": ""boolean"" } -}"; +}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); }, item => // $filter { - string json = item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""$filter"", ""in"": ""query"", ""description"": ""Filter items by property values"", @@ -111,14 +112,14 @@ public void CreateParametersReturnsCreatedParameters() ""schema"": { ""type"": ""string"" } -}"; +}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); }, item => // $search { - string json = item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""$search"", ""in"": ""query"", ""description"": ""Search items by search phrases"", @@ -127,9 +128,9 @@ public void CreateParametersReturnsCreatedParameters() ""schema"": { ""type"": ""string"" } -}"; +}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); }); } @@ -185,12 +186,12 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) Assert.NotNull(parameters); var parameter = Assert.Single(parameters); - string json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected; + var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + JsonNode expected; if (prefix) { - expected = @"{ + expected = JsonNode.Parse(@"{ ""name"": ""Customer-Id"", ""in"": ""path"", ""description"": ""The unique identifier of Customer"", @@ -200,11 +201,11 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) ""nullable"": true }, ""x-ms-docs-key-type"": ""Customer"" -}"; +}"); } else { - expected = @"{ + expected = JsonNode.Parse(@"{ ""name"": ""Id"", ""in"": ""path"", ""description"": ""The unique identifier of Customer"", @@ -214,10 +215,10 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) ""nullable"": true }, ""x-ms-docs-key-type"": ""Customer"" -}"; +}"); } - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expected, json)); } [Theory] From 8911cca4ce8171aa145bb0997aefea24664262fa Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 13:13:23 -0500 Subject: [PATCH 030/103] chore: additional batch of json deep equals conversion Signed-off-by: Vincent Biret --- .../OpenApiParameterGeneratorTests.cs | 96 +++++++++---------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 86b711680..e24abb561 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -248,8 +248,8 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) // 1st var parameter = parameters.First(); - string json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expected = @"{ + var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""firstName"", ""in"": ""path"", ""description"": ""Property in multi-part unique identifier of Customer"", @@ -259,13 +259,13 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) ""nullable"": true }, ""x-ms-docs-key-type"": ""Customer"" -}"; - Assert.Equal(expected.ChangeLineBreaks(), json); +}"); + Assert.True(JsonNode.DeepEquals(expected, json)); // 2nd parameter = parameters.Last(); - json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - expected = @"{ + json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + expected = JsonNode.Parse(@"{ ""name"": ""lastName"", ""in"": ""path"", ""description"": ""Property in multi-part unique identifier of Customer"", @@ -275,8 +275,8 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) ""nullable"": true }, ""x-ms-docs-key-type"": ""Customer"" -}"; - Assert.Equal(expected.ChangeLineBreaks(), json); +}"); + Assert.True(JsonNode.DeepEquals(expected, json)); } [Fact] @@ -307,8 +307,8 @@ public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() // Assert Assert.NotNull(parameters); Assert.Single(parameters); - string json = altParameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + var json = JsonNode.Parse(altParameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected = JsonNode.Parse(@"{ ""name"": ""AltId1"", ""in"": ""path"", ""description"": ""Alternate key of Customer"", @@ -317,7 +317,8 @@ public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() ""type"": ""string"", ""nullable"": true } -}".ChangeLineBreaks(), json); +}"); + Assert.True(JsonNode.DeepEquals(expected, json)); } [Fact] @@ -354,8 +355,8 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() // Assert Assert.NotNull(parameters); Assert.Equal(2, parameters.Count); - string json1 = altParameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + var json1 = JsonNode.Parse(altParameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected1 = JsonNode.Parse(@"{ ""name"": ""AltId1"", ""in"": ""path"", ""description"": ""Property in multi-part alternate key of Customer"", @@ -364,10 +365,11 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() ""type"": ""string"", ""nullable"": true } -}".ChangeLineBreaks(), json1); +}"); + Assert.True(JsonNode.DeepEquals(expected1, json1)); - string json2 = altParameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + var json2 = JsonNode.Parse(altParameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expected2 = JsonNode.Parse(@"{ ""name"": ""AltId2"", ""in"": ""path"", ""description"": ""Property in multi-part alternate key of Customer"", @@ -376,7 +378,8 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() ""type"": ""string"", ""nullable"": true } -}".ChangeLineBreaks(), json2); +}"); + Assert.True(JsonNode.DeepEquals(expected2, json2)); } [Theory] @@ -456,9 +459,8 @@ private void VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext c // Assert Assert.NotNull(parameter); - string json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - - string expected = $@"{{ + var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedJson = JsonNode.Parse($@"{{ ""name"": ""$orderby"", ""in"": ""query"", ""description"": ""Order items by property values"", @@ -471,9 +473,9 @@ private void VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext c {itemsText} }} }} -}}"; +}}"); - Assert.Equal(expected.ChangeLineBreaks(), json); + Assert.True(JsonNode.DeepEquals(expectedJson, json)); } private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext context, string selectItemsText = null) @@ -503,9 +505,8 @@ private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext co // Assert Assert.NotNull(parameter); - string json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - - string expected = $@"{{ + var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedJson = JsonNode.Parse($@"{{ ""name"": ""$select"", ""in"": ""query"", ""description"": ""Select properties to be returned"", @@ -518,9 +519,8 @@ private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext co {itemsText} }} }} -}}"; - - Assert.Equal(expected.ChangeLineBreaks(), json); +}}"); + Assert.True(JsonNode.DeepEquals(expectedJson, json)); } private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext context, string expandItemsText) @@ -545,9 +545,8 @@ private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext co // Assert Assert.NotNull(parameter); - string json = parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - - string expected = expandItemsText == null + var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedJson = expandItemsText == null ? $@"{{ ""name"": ""$expand"", @@ -579,8 +578,8 @@ private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext co }} }} }}"; - - Assert.Equal(expected.ChangeLineBreaks(), json); + var expectedJsonNode = JsonNode.Parse(expectedJson); + Assert.True(JsonNode.DeepEquals(expectedJsonNode, json)); } [Fact] @@ -608,17 +607,17 @@ public void CreateParametersWorks() // Assert Assert.NotNull(parameters1); - OpenApiParameter parameter1 = Assert.Single(parameters1); + var parameter1 = Assert.Single(parameters1); Assert.NotNull(parameters2); - OpenApiParameter parameter2 = Assert.Single(parameters2); + var parameter2 = Assert.Single(parameters2); Assert.NotNull(parameters3); Assert.Equal(4, parameters3.Count); - OpenApiParameter parameter3 = parameters3.First(); + var parameter3 = parameters3.First(); - string json1 = parameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expectedPayload1 = $@"{{ + var json1 = JsonNode.Parse(parameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedPayload1 = JsonNode.Parse($@"{{ ""name"": ""ids"", ""in"": ""path"", ""description"": ""The URL-encoded JSON object"", @@ -633,10 +632,11 @@ public void CreateParametersWorks() }} }} }} -}}"; +}}"); + Assert.True(JsonNode.DeepEquals(expectedPayload1, json1)); - string json2 = parameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expectedPayload2 = $@"{{ + var json2 = JsonNode.Parse(parameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedPayload2 = JsonNode.Parse($@"{{ ""name"": ""resource"", ""in"": ""path"", ""required"": true, @@ -644,21 +644,19 @@ public void CreateParametersWorks() ""type"": ""string"", ""nullable"": true }} -}}"; +}}"); + Assert.True(JsonNode.DeepEquals(expectedPayload2, json2)); - string json3 = parameter3.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - string expectedPayload3 = $@"{{ + var json3 = JsonNode.Parse(parameter3.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var expectedPayload3 = JsonNode.Parse($@"{{ ""name"": ""directoryScopeId"", ""in"": ""query"", ""schema"": {{ ""type"": ""string"", ""nullable"": true }} -}}"; - - Assert.Equal(expectedPayload1.ChangeLineBreaks(), json1); - Assert.Equal(expectedPayload2.ChangeLineBreaks(), json2); - Assert.Equal(expectedPayload3.ChangeLineBreaks(), json3); +}}"); + Assert.True(JsonNode.DeepEquals(expectedPayload3, json3)); } public static IEdmModel GetEdmModel() From 45cfaa0e84f58857aafbcde98b876dbdd545c21c Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 13:41:40 -0500 Subject: [PATCH 031/103] chore: another batch of json node deep equals Signed-off-by: Vincent Biret --- .../OpenApiRequestBodyGeneratorTests.cs | 11 +++++++--- .../OpenApiResponseGeneratorTests.cs | 22 ++++++++++++++----- .../OpenApiSecuritySchemeGeneratorTests.cs | 11 ++++++---- .../EntityDeleteOperationHandlerTests.cs | 2 +- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index 762680356..d0453a8be 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Text.Json.Nodes; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -106,8 +107,7 @@ public void CanSerializeAsJsonFromTheCreatedRequestBody() // Assert string json = requestBody.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - - Assert.Equal(@"{ + var expectedJson = @"{ ""description"": ""Action parameters"", ""content"": { ""application/json"": { @@ -123,7 +123,12 @@ public void CanSerializeAsJsonFromTheCreatedRequestBody() } }, ""required"": true -}".ChangeLineBreaks(), json); +}"; + + var actualJsonNode = JsonNode.Parse(json); + var expectedJsonNode = JsonNode.Parse(expectedJson); + + Assert.True(JsonNode.DeepEquals(actualJsonNode, expectedJsonNode)); } [Fact] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index a3b09d738..c173be0bb 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.Models; using Xunit; using Microsoft.OpenApi.OData.Edm; +using System.Text.Json.Nodes; namespace Microsoft.OpenApi.OData.Generator.Tests { @@ -108,7 +109,7 @@ public void CanSerializeAsJsonFromTheCreatedResponses() Assert.NotNull(response); string json = response.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + var expectedJson = @"{ ""description"": ""error"", ""content"": { ""application/json"": { @@ -117,7 +118,10 @@ public void CanSerializeAsJsonFromTheCreatedResponses() } } } -}".ChangeLineBreaks(), json); +}"; + var expectedJsonNode = JsonNode.Parse(expectedJson); + var actualJsonNode = JsonNode.Parse(json); + Assert.True(JsonNode.DeepEquals(expectedJsonNode, actualJsonNode)); } [Fact] @@ -359,7 +363,7 @@ public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableO Assert.NotEmpty(responses); if (enableOdataAnnotationRef) { - Assert.Equal(@"{ + var expectedJson = @"{ ""200"": { ""description"": ""Success"", ""content"": { @@ -390,11 +394,14 @@ public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableO ""default"": { ""$ref"": ""#/components/responses/error"" } -}".ChangeLineBreaks(), json); +}"; + var expectedJsonNode = JsonNode.Parse(expectedJson); + var actualJsonNode = JsonNode.Parse(json); + Assert.True(JsonNode.DeepEquals(expectedJsonNode, actualJsonNode)); } else { - Assert.Equal(@"{ + var expectedJson = @"{ ""200"": { ""description"": ""Success"", ""content"": { @@ -425,7 +432,10 @@ public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableO ""default"": { ""$ref"": ""#/components/responses/error"" } -}".ChangeLineBreaks(), json); +}"; + var expectedJsonNode = JsonNode.Parse(expectedJson); + var actualJsonNode = JsonNode.Parse(json); + Assert.True(JsonNode.DeepEquals(expectedJsonNode, actualJsonNode)); } } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs index 2e7813fc8..f62b54115 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs @@ -14,6 +14,7 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; using Xunit; +using System.Text.Json.Nodes; namespace Microsoft.OpenApi.OData.Tests { @@ -40,7 +41,7 @@ public void CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() Assert.Equal("http://RefreshUrl", scheme.Flows.ClientCredentials.RefreshUrl.OriginalString); Assert.Equal("OAuth2ClientCredentials Description", scheme.Description); string json = scheme.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + var expectedJson = JsonNode.Parse(@"{ ""type"": ""oauth2"", ""description"": ""OAuth2ClientCredentials Description"", ""flows"": { @@ -52,17 +53,19 @@ public void CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() } } } -}".ChangeLineBreaks(), json); +}"); + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(json), expectedJson)); scheme = schemes["Http Name"]; Assert.Equal(SecuritySchemeType.Http, scheme.Type); json = scheme.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + expectedJson = JsonNode.Parse(@"{ ""type"": ""http"", ""description"": ""Http Description"", ""scheme"": ""Http Scheme"", ""bearerFormat"": ""Http BearerFormat"" -}".ChangeLineBreaks(), json); +}"); + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(json), expectedJson)); } private static IEdmModel GetEdmModel() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index bfe83848a..875889ac0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityDeleteOperationHandlerTests { - private EntityDeleteOperationHandler _operationHandler = new EntityDeleteOperationHandler(new()); + private readonly EntityDeleteOperationHandler _operationHandler = new EntityDeleteOperationHandler(new()); [Theory] [InlineData(true)] From 1b1586eac73c14ec11159379ccb09bd661e9fd08 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 13:45:53 -0500 Subject: [PATCH 032/103] fix: NRT on title lookup Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGeneratorTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 55ac435ed..32c51ab01 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -190,12 +190,12 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabled // Act var schema = context.CreateStructuredTypeSchema(entity, new()); var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity, new()); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); // Assert Assert.True(derivedSchema.AllOf.FirstOrDefault(x => derivedType.Equals(x.Title))?.Properties.ContainsKey("@odata.type")); Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""allOf"": [ { ""$ref"": ""#/components/schemas/microsoft.graph.entity"" @@ -258,7 +258,7 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabled } } ] -}".ChangeLineBreaks(), json); +}"), json)); } [Theory] From fe10a521bb87e9f056b9f08228be546136508244 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 30 Dec 2024 13:58:03 -0500 Subject: [PATCH 033/103] fix: property lookup for unit test Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGeneratorTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 32c51ab01..b25082897 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -72,9 +72,9 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo Assert.Equal(JsonSchemaType.Array, item.Properties["value"].Type); }); - Assert.Equal(JsonSchemaType.Array, flightCollectionResponse.AllOf?.FirstOrDefault(x => x.Properties.Any())?.Properties["value"].Type); - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight", - flightCollectionResponse.AllOf?.FirstOrDefault(x => x.Properties.Any())?.Properties["value"].Items.Reference.Id); + Assert.Single(flightCollectionResponse.AllOf?.Where(x => x.Properties.TryGetValue("value", out var valueProp) && + (valueProp.Type & JsonSchemaType.Array) is JsonSchemaType.Array && + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight".Equals(valueProp.Items.Reference.Id))); } else { From 176b10ae53e31be416468cd130d03b588c8be58c Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 14:52:53 -0500 Subject: [PATCH 034/103] fix: tag generation with extensions Signed-off-by: Vincent Biret --- .../Edm/ODataContext.cs | 48 ++++++++++++++++--- .../Generator/OpenApiDocumentGenerator.cs | 2 +- .../ComplexPropertyBaseOperationHandler.cs | 15 +++--- .../DollarCountGetOperationHandler.cs | 11 ++--- .../EdmOperationImportOperationHandler.cs | 33 +++++-------- .../Operation/EdmOperationOperationHandler.cs | 3 +- .../Operation/EntitySetOperationHandler.cs | 15 +++--- .../MediaEntityOperationalHandler.cs | 16 +++---- .../NavigationPropertyOperationHandler.cs | 13 ++--- .../ODataTypeCastGetOperationHandler.cs | 12 ++--- .../Operation/SingletonOperationHandler.cs | 16 +++---- 11 files changed, 95 insertions(+), 89 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index d755d4caa..a111330c8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -3,10 +3,12 @@ // 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.OData.Edm.Vocabularies; +using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Generator; @@ -23,7 +25,7 @@ namespace Microsoft.OpenApi.OData.Edm internal class ODataContext { private IEnumerable _allPaths; - private IODataPathProvider _pathProvider; + private readonly IODataPathProvider _pathProvider; /// /// Initializes a new instance of class. @@ -141,12 +143,9 @@ public IEnumerable AllPaths /// The tag item. public void AppendTag(OpenApiTag tagItem) { - if (Tags == null) - { - Tags = new List(); - } + Tags ??= []; - if (Tags.Any(c => c.Name == tagItem.Name)) + if (FindTagByName(tagItem.Name) is not null) { return; } @@ -154,6 +153,43 @@ public void AppendTag(OpenApiTag tagItem) Tags.Add(tagItem); } + /// + /// Find tag by name. + /// + /// The name to lookup the tag. + /// + internal OpenApiTag FindTagByName(string name) + { + Utils.CheckArgumentNullOrEmpty(name, nameof(name)); + return Tags?.FirstOrDefault(t => StringComparer.Ordinal.Equals(t.Name, name)); + } + + /// + /// Sets the extension for the existing tag, or create a new tag with the extension. + /// + /// The tag name to lookup. + /// The extension name. + /// The extension value to set. + /// The tag default value factory. + internal void AddExtensionToTag(string tagName, string extensionName, OpenApiAny extensionValue, Func initialValueFactory) + { + Utils.CheckArgumentNullOrEmpty(tagName, nameof(tagName)); + Utils.CheckArgumentNullOrEmpty(extensionName, nameof(extensionName)); + Utils.CheckArgumentNull(extensionValue, nameof(extensionValue)); + Utils.CheckArgumentNull(initialValueFactory, nameof(initialValueFactory)); + + if (FindTagByName(tagName) is {} foundTag) + { + foundTag.Extensions.TryAdd(extensionName, extensionValue); + } + else + { + var tag = initialValueFactory(); + tag.Extensions.TryAdd(extensionName, extensionValue); + AppendTag(tag); + } + } + /// /// Gets all OData paths /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index 6b63337a5..61a00ac4c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -41,11 +41,11 @@ public static OpenApiDocument CreateDocument(this ODataContext context) SecurityRequirements = null, ExternalDocs = null, - Tags = context.CreateTags() }; doc.Components = context.CreateComponents(doc); doc.Paths = context.CreatePaths(doc); + doc.Tags = context.CreateTags(); // order matters so the operation generators have populated the tags return doc; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs index 290747f25..c23ab894f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs @@ -5,6 +5,7 @@ using Microsoft.OpenApi.Any; 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; @@ -37,15 +38,11 @@ protected override void SetTags(OpenApiOperation operation) if (!string.IsNullOrEmpty(tagName)) { - OpenApiTag tag = new() - { - Name = tagName - }; - - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); - operation.Tags.Add(tag); - - Context.AppendTag(tag); + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = tagName + }); + operation.Tags.Add(new OpenApiTagReference(tagName, _document)); } base.SetTags(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 3196bc3b1..e021ac1d3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -97,17 +97,12 @@ protected override void SetTags(OpenApiOperation operation) if (tagName != null) { - OpenApiTag tag = new() + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() { Name = tagName - }; + }); - // Use an extension for TOC (Table of Content) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); - - operation.Tags.Add(tag); - - Context.AppendTag(tag); + operation.Tags.Add(new OpenApiTagReference(tagName, _document)); } string TagNameFromNavigationSourceSegment(ODataNavigationSourceSegment sourceSegment) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index 3719d3620..1fb944384 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -9,6 +9,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -137,35 +138,27 @@ protected override void AppendCustomParameters(OpenApiOperation operation) /// protected override void SetTags(OpenApiOperation operation) { - operation.Tags = CreateTags(EdmOperationImport); - operation.Tags[0].Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); - Context.AppendTag(operation.Tags[0]); + var tag = CreateTag(EdmOperationImport); + tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); + Context.AppendTag(tag); + operation.Tags.Add(new OpenApiTagReference(tag.Name, _document)); base.SetTags(operation); } - private static IList CreateTags(IEdmOperationImport operationImport) + private static OpenApiTag CreateTag(IEdmOperationImport operationImport) { - if (operationImport.EntitySet != null) + if (operationImport.EntitySet is IEdmPathExpression pathExpression) { - var pathExpression = operationImport.EntitySet as IEdmPathExpression; - if (pathExpression != null) + return new OpenApiTag { - return new List - { - new OpenApiTag - { - Name = PathAsString(pathExpression.PathSegments) - } - }; - } + Name = PathAsString(pathExpression.PathSegments) + }; } - return new List{ - new OpenApiTag - { - Name = operationImport.Name - } + return new OpenApiTag + { + Name = operationImport.Name }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index aed4761da..1fd9e2684 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -9,6 +9,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Generator; @@ -153,7 +154,7 @@ protected override void SetTags(OpenApiOperation operation) Name = tagName, }; tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); - operation.Tags.Add(tag); + operation.Tags.Add(new OpenApiTagReference(tag.Name, _document)); Context.AppendTag(tag); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs index 7634d05c4..fb8bb6d28 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; 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; @@ -44,16 +45,14 @@ protected override void Initialize(ODataContext context, ODataPath path) /// protected override void SetTags(OpenApiOperation operation) { - OpenApiTag tag = new OpenApiTag - { - Name = EntitySet.Name + "." + EntitySet.EntityType.Name, - }; - - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); + var tagName = EntitySet.Name + "." + EntitySet.EntityType.Name; - operation.Tags.Add(tag); + operation.Tags.Add(new OpenApiTagReference(tagName, _document)); - Context.AppendTag(tag); + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = tagName + }); base.SetTags(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 7c1e184a8..afb45966f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; 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; @@ -90,17 +91,12 @@ protected override void SetTags(OpenApiOperation operation) ? EdmModelHelper.GenerateNavigationPropertyPathTagName(Path, Context) : NavigationSourceSegment.Identifier + "." + NavigationSourceSegment.EntityType.Name; - OpenApiTag tag = new() - { - Name = tagIdentifier - }; - - // Use an extension for TOC (Table of Content) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); - - operation.Tags.Add(tag); - Context.AppendTag(tag); + Context.AddExtensionToTag(tagIdentifier, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = tagIdentifier + }); + operation.Tags.Add(new OpenApiTagReference(tagIdentifier, _document)); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 42496a82c..ccf42c336 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -94,14 +94,11 @@ protected override void Initialize(ODataContext context, ODataPath path) protected override void SetTags(OpenApiOperation operation) { string name = EdmModelHelper.GenerateNavigationPropertyPathTagName(Path, Context); - OpenApiTag tag = new() - { - Name = name - }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); - operation.Tags.Add(tag); - - Context.AppendTag(tag); + Context.AddExtensionToTag(name, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = name + }); + operation.Tags.Add(new OpenApiTagReference(name, _document)); base.SetTags(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 0b619675e..74f3e60c8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -258,17 +258,11 @@ protected override void SetTags(OpenApiOperation operation) if (tagName != null) { - OpenApiTag tag = new() + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() { Name = tagName - }; - - if (!IsSingleElement) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); - - operation.Tags.Add(tag); - - Context.AppendTag(tag); + }); + operation.Tags.Add(new OpenApiTagReference(tagName, _document)); } base.SetTags(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs index d9db1428a..dcd33ef11 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; 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; @@ -46,17 +47,14 @@ protected override void SetTags(OpenApiOperation operation) { // In this SDK, we use "[Singleton Name].[Singleton Entity Type Name] // For example: "Me.User" - OpenApiTag tag = new OpenApiTag - { - Name = Singleton.Name + "." + Singleton.EntityType.Name, - }; - - // Use an extension for TOC (Table of Content) - tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("page")); + var tagName = Singleton.Name + "." + Singleton.EntityType.Name; - operation.Tags.Add(tag); + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = tagName + }); - Context.AppendTag(tag); + operation.Tags.Add(new OpenApiTagReference(tagName, _document)); // Call base.SetTags() at the end of this method. base.SetTags(operation); From 3c4726bd491bb44d0963915806478ce93734eb4b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 14:53:07 -0500 Subject: [PATCH 035/103] fix: format updates Signed-off-by: Vincent Biret --- .../Resources/Basic.OpenApi.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json index c3b1db8fb..8d3502333 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json @@ -1179,8 +1179,8 @@ "description": "The structure of this object is service-specific" }, "ODataCountResponse": { - "type": "integer", - "format": "int32" + "type": "number", + "format": "int64" }, "DefaultNs.PersonCollectionResponse": { "title": "Collection of Person", @@ -1334,7 +1334,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" }, "example": 50 }, @@ -1346,7 +1347,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" } }, "count": { From 3e8b8643098a2f47df38a1e00bfa8d859777e036 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 14:54:49 -0500 Subject: [PATCH 036/103] chore: code linting Signed-off-by: Vincent Biret --- .../Common/Constants.cs | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs index 0c1e2ffa2..cfd80728f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs @@ -15,183 +15,183 @@ internal static class Constants /// /// application/json /// - public static string ApplicationJsonMediaType = "application/json"; + public const string ApplicationJsonMediaType = "application/json"; /// /// application/xml /// - public static string ApplicationXmlMediaType = "application/xml"; + public const string ApplicationXmlMediaType = "application/xml"; /// /// application/octet-stream /// - public static string ApplicationOctetStreamMediaType = "application/octet-stream"; + public const string ApplicationOctetStreamMediaType = "application/octet-stream"; /// /// Status code class: 2XX /// - public static string StatusCodeClass2XX = "2XX"; + public const string StatusCodeClass2XX = "2XX"; /// /// Status code: 200 /// - public static string StatusCode200 = "200"; + public const string StatusCode200 = "200"; /// /// Status code: 201 /// - public static string StatusCode201 = "201"; + public const string StatusCode201 = "201"; /// /// Status code: 204 /// - public static string StatusCode204 = "204"; + public const string StatusCode204 = "204"; /// /// Status code: default /// - public static string StatusCodeDefault = "default"; + public const string StatusCodeDefault = "default"; /// /// Status code class: 4XX /// - public static string StatusCodeClass4XX = "4XX"; + public const string StatusCodeClass4XX = "4XX"; /// /// Status code class: 5XX /// - public static string StatusCodeClass5XX = "5XX"; + public const string StatusCodeClass5XX = "5XX"; /// /// Edm model error extension key. /// - public static string xMsEdmModelError = "x-ms-edm-error-"; + public const string xMsEdmModelError = "x-ms-edm-error-"; /// /// extension for toc (table of content) type /// - public static string xMsTocType = "x-ms-docs-toc-type"; + public const string xMsTocType = "x-ms-docs-toc-type"; /// /// extension for key type /// - public static string xMsKeyType = "x-ms-docs-key-type"; + public const string xMsKeyType = "x-ms-docs-key-type"; /// /// extension for operation type /// - public static string xMsDosOperationType = "x-ms-docs-operation-type"; + public const string xMsDosOperationType = "x-ms-docs-operation-type"; /// /// extension for group type /// - public static string xMsDosGroupPath = "x-ms-docs-grouped-path"; + public const string xMsDosGroupPath = "x-ms-docs-grouped-path"; /// /// extension for paging /// - public static string xMsPageable = "x-ms-pageable"; + public const string xMsPageable = "x-ms-pageable"; /// /// extension for discriminator value support /// - public static string xMsDiscriminatorValue = "x-ms-discriminator-value"; + public const string xMsDiscriminatorValue = "x-ms-discriminator-value"; /// /// extension for navigation property /// - public static string xMsNavigationProperty = "x-ms-navigationProperty"; + public const string xMsNavigationProperty = "x-ms-navigationProperty"; /// /// Name used for the OpenAPI referenced schema for OData Count operations responses. /// - public static string DollarCountSchemaName = "ODataCountResponse"; + public const string DollarCountSchemaName = "ODataCountResponse"; /// /// Suffix used for collection response schemas. /// - public static string CollectionSchemaSuffix = "CollectionResponse"; + public const string CollectionSchemaSuffix = "CollectionResponse"; /// /// Suffix used for the base collection pagination response schema and count response schemas. /// - public static string BaseCollectionPaginationCountResponse = "BaseCollectionPaginationCountResponse"; + public const string BaseCollectionPaginationCountResponse = "BaseCollectionPaginationCountResponse"; /// /// Suffix used for the base delta function response schemas. /// - public static string BaseDeltaFunctionResponse = "BaseDeltaFunctionResponse"; + public const string BaseDeltaFunctionResponse = "BaseDeltaFunctionResponse"; /// /// Name used for reference update. /// - public static string ReferenceUpdateSchemaName = "ReferenceUpdate"; + public const string ReferenceUpdateSchemaName = "ReferenceUpdate"; /// /// Name used for reference update. /// - public static string ReferenceCreateSchemaName = "ReferenceCreate"; + public const string ReferenceCreateSchemaName = "ReferenceCreate"; /// /// Name used for reference request POST body. /// - public static string ReferencePostRequestBodyName = "refPostBody"; + public const string ReferencePostRequestBodyName = "refPostBody"; /// /// Name used for reference request PUT body. /// - public static string ReferencePutRequestBodyName = "refPutBody"; + public const string ReferencePutRequestBodyName = "refPutBody"; /// /// Name used to reference INF, -INF and NaN /// - public static string ReferenceNumericName = "ReferenceNumeric"; + public const string ReferenceNumericName = "ReferenceNumeric"; /// /// The odata type name. /// - public static string OdataType = "@odata.type"; + public const string OdataType = "@odata.type"; /// /// The odata id. /// - public static string OdataId = "@odata.id"; + public const string OdataId = "@odata.id"; /// /// object type /// - public static string ObjectType = "object"; + public const string ObjectType = "object"; /// /// string type /// - public static string StringType = "string"; + public const string StringType = "string"; /// /// integer type /// [Obsolete("integer is not a valid OpenAPI type. Use number instead.")] - public static string IntegerType = "integer"; + public const string IntegerType = "integer"; /// /// number type /// - public static string NumberType = "number"; + public const string NumberType = "number"; /// /// int64 format /// - public static string Int64Format = "int64"; + public const string Int64Format = "int64"; /// /// decimal format /// - public static string DecimalFormat = "decimal"; + public const string DecimalFormat = "decimal"; /// /// entity name /// - public static string EntityName = "entity"; + public const string EntityName = "entity"; /// /// count segment identifier From 9eea9da9617aa2bcf8070c3efa8d2bf393448086 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 14:58:41 -0500 Subject: [PATCH 037/103] fix: copy of extensions for schemas Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGenerator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index de5154476..cc93c89ad 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -425,7 +425,8 @@ public static IDictionary CreateStructuredTypePropertiesS { OpenApiSchema propertySchema = context.CreatePropertySchema(property, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); - propertySchema.Extensions ??= new Dictionary(); + // we always want a new copy because it's a reference + propertySchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); properties.Add(property.Name, propertySchema); } @@ -435,7 +436,8 @@ public static IDictionary CreateStructuredTypePropertiesS { OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type, document); propertySchema.Description = context.Model.GetDescriptionAnnotation(property); - propertySchema.Extensions ??= new Dictionary(); + // we always want a new copy because it's a reference + propertySchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); propertySchema.Extensions.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); properties.Add(property.Name, propertySchema); From 452fa51f16223c8bf3dc80929a3482dcdd776b79 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 16:27:38 -0500 Subject: [PATCH 038/103] fix: tag references unit tests Signed-off-by: Vincent Biret --- .../Edm/ODataContext.cs | 2 +- .../ODataTypeCastGetOperationHandler.cs | 11 ++++++---- .../EdmActionOperationHandlerTests.cs | 12 ++++++++++- .../EdmFunctionImportOperationHandlerTests.cs | 10 +++++++++- .../EdmFunctionOperationHandlerTests.cs | 11 +++++++++- .../EntityDeleteOperationHandlerTests.cs | 10 +++++++++- .../EntityGetOperationHandlerTests.cs | 12 ++++++++++- .../EntityPatchOperationHandlerTests.cs | 11 +++++++++- .../EntityPutOperationHandlerTests.cs | 11 +++++++++- .../EntitySetGetOperationHandlerTests.cs | 11 +++++++++- .../EntitySetPostOperationHandlerTests.cs | 10 +++++++++- .../MediaEntityDeleteOperationHandlerTests.cs | 20 ++++++++++++++----- .../MediaEntityGetOperationHandlerTests.cs | 17 ++++++++++++---- .../MediaEntityPutOperationHandlerTests.cs | 19 +++++++++++++----- ...tionPropertyDeleteOperationHandlerTests.cs | 12 ++++++++++- ...igationPropertyGetOperationHandlerTests.cs | 15 +++++++++++++- ...ationPropertyPatchOperationHandlerTests.cs | 12 ++++++++++- ...gationPropertyPostOperationHandlerTests.cs | 13 +++++++++++- ...igationPropertyPutOperationHandlerTests.cs | 11 +++++++++- .../ODataTypeCastGetOperationHandlerTests.cs | 9 +++++++++ .../RefDeleteOperationHandlerTests.cs | 10 +++++++++- .../Operation/RefGetOperationHandlerTests.cs | 10 +++++++++- .../Operation/RefPostOperationHandlerTests.cs | 10 +++++++++- .../Operation/RefPutOperationHandlerTests.cs | 10 +++++++++- .../SingletonGetOperationHandlerTests.cs | 12 ++++++++++- .../SingletonPatchOperationHandlerTests.cs | 10 +++++++++- 26 files changed, 262 insertions(+), 39 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index a111330c8..8f60d1876 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -141,7 +141,7 @@ public IEnumerable AllPaths /// Append tag. /// /// The tag item. - public void AppendTag(OpenApiTag tagItem) + internal void AppendTag(OpenApiTag tagItem) { Tags ??= []; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 74f3e60c8..cd3b965d9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -258,10 +258,13 @@ protected override void SetTags(OpenApiOperation operation) if (tagName != null) { - Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() - { - Name = tagName - }); + if (IsSingleElement) + Context.AppendTag(new OpenApiTag() { Name = tagName }); + else + Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() + { + Name = tagName + }); operation.Tags.Add(new OpenApiTagReference(tagName, _document)); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index f5cdd8a01..1b9e2bca9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -4,11 +4,14 @@ // ------------------------------------------------------------ using System.Linq; +using System.Reflection.Metadata; 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 Xunit; @@ -16,7 +19,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmActionOperationHandlerTests { - private EdmActionOperationHandler _operationHandler = new EdmActionOperationHandler(new()); + public EdmActionOperationHandlerTests() + { + _operationHandler = new EdmActionOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly EdmActionOperationHandler _operationHandler; [Fact] public void CreateOperationForEdmActionReturnsCorrectOperation() @@ -33,6 +41,7 @@ public void CreateOperationForEdmActionReturnsCorrectOperation() // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -73,6 +82,7 @@ public void CreateOperationForEdmActionReturnsCorrectOperationHierarchicalClass( // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index 3315b9c26..94ca18074 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -8,7 +8,9 @@ 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 Xunit; @@ -16,7 +18,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmFunctionImportOperationHandlerTests { - private EdmFunctionImportOperationHandler _operationHandler = new EdmFunctionImportOperationHandler(new()); + public EdmFunctionImportOperationHandlerTests() + { + _operationHandler = new EdmFunctionImportOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly EdmFunctionImportOperationHandler _operationHandler; [Theory] [InlineData(true)] @@ -36,6 +43,7 @@ public void CreateOperationForEdmFunctionImportReturnsCorrectOperation(bool useH // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index 16b954ff1..cbe6a251d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -18,7 +19,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmFunctionOperationHandlerTests { - private EdmFunctionOperationHandler _operationHandler = new(new()); + public EdmFunctionOperationHandlerTests() + { + _operationHandler = new EdmFunctionOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EdmFunctionOperationHandler _operationHandler; #region OperationHandlerTests [Fact] public void SetsDeprecationInformation() @@ -94,6 +101,7 @@ public void CreateOperationForEdmFunctionReturnsCorrectOperation(bool useHTTPSta // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -131,6 +139,7 @@ public void CreateOperationForEdmFunctionReturnsCorrectOperationHierarchicalClas // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index 875889ac0..24293e8ad 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -6,7 +6,9 @@ using System.Linq; 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 Xunit; @@ -14,7 +16,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityDeleteOperationHandlerTests { - private readonly EntityDeleteOperationHandler _operationHandler = new EntityDeleteOperationHandler(new()); + public EntityDeleteOperationHandlerTests() + { + _operationHandler = new EntityDeleteOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly EntityDeleteOperationHandler _operationHandler; [Theory] [InlineData(true)] @@ -33,6 +40,7 @@ public void CreateEntityDeleteOperationReturnsCorrectOperation(bool enableOperat // Act var delete = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(delete); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index aea2b617e..ef43282cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -7,7 +7,9 @@ using System.Linq; 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 Xunit; @@ -15,7 +17,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityGetOperationHandlerTests { - private EntityGetOperationHandler _operationHandler = new EntityGetOperationHandler(new()); + public EntityGetOperationHandlerTests() + { + _operationHandler = new EntityGetOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EntityGetOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -37,6 +45,8 @@ public void CreateEntityGetOperationReturnsCorrectOperation(bool enableOperation // Act var get = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); + // Assert Assert.NotNull(get); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index 4d783260c..399c5c8e7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -6,7 +6,9 @@ using System.Linq; 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 Xunit; @@ -14,7 +16,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityPatchOperationHandlerTests { - private EntityPatchOperationHandler _operationHandler = new EntityPatchOperationHandler(new()); + public EntityPatchOperationHandlerTests() + { + _operationHandler = new EntityPatchOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EntityPatchOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -36,6 +44,7 @@ public void CreateEntityPatchOperationReturnsCorrectOperation(bool enableOperati // Act var patch = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(patch); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index 1e3d63192..7ad20bcf4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -6,7 +6,9 @@ using System.Linq; 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 Xunit; @@ -14,7 +16,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntityPutOperationHandlerTests { - private EntityPutOperationHandler _operationHandler = new EntityPutOperationHandler(new()); + public EntityPutOperationHandlerTests() + { + _operationHandler = new EntityPutOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EntityPutOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -36,6 +44,7 @@ public void CreateEntityPutOperationReturnsCorrectOperation(bool enableOperation // Act var putOperation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(putOperation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index 2f9b4a8a6..f21677733 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -9,8 +9,10 @@ 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 Xunit; @@ -18,7 +20,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntitySetGetOperationHandlerTests { - private EntitySetGetOperationHandler _operationHandler = new EntitySetGetOperationHandler(new()); + public EntitySetGetOperationHandlerTests() + { + _operationHandler = new EntitySetGetOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EntitySetGetOperationHandler _operationHandler; [Theory] [InlineData(true, true, true)] @@ -41,6 +49,7 @@ public void CreateEntitySetGetOperationReturnsCorrectOperation(bool enableOperat // Act var get = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(get); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index 96c7d27da..b4c36ecd9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -9,6 +9,7 @@ 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.Linq; @@ -19,7 +20,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EntitySetPostOperationHandlerTests { - private EntitySetPostOperationHandler _operationHandler = new EntitySetPostOperationHandler(new()); + public EntitySetPostOperationHandlerTests() + { + _operationHandler = new EntitySetPostOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly EntitySetPostOperationHandler _operationHandler; [Theory] [InlineData(true, true, true)] @@ -57,6 +64,7 @@ private void VerifyEntitySetPostOperation(string annotation, bool enableOperatio // Act var post = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(post); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs index 19709d2ef..7286a5b42 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs @@ -5,8 +5,10 @@ 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; using System.Linq; using System.Xml.Linq; using Xunit; @@ -15,7 +17,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityDeleteOperationHandlerTests { - private readonly MediaEntityDeleteOperationHandler _operationalHandler = new MediaEntityDeleteOperationHandler(new()); + public MediaEntityDeleteOperationHandlerTests() + { + _operationHandler = new MediaEntityDeleteOperationHandler(_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly MediaEntityDeleteOperationHandler _operationHandler; [Fact] public void CreateMediaEntityPropertyDeleteOperationWithTargetPathAnnotationsReturnsCorrectOperation() @@ -33,7 +41,8 @@ public void CreateMediaEntityPropertyDeleteOperationWithTargetPathAnnotationsRet new ODataStreamPropertySegment(property.Name)); // Act - var operation = _operationalHandler.CreateOperation(context, path); + var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -123,9 +132,10 @@ private void VerifyMediaEntityDeleteOperation(string annotation, bool enableOper new ODataStreamPropertySegment(structuralProperty2.Name)); // Act - var deleteOperation = _operationalHandler.CreateOperation(context, path); - var deleteOperation2 = _operationalHandler.CreateOperation(context, path2); - var deleteOperation3 = _operationalHandler.CreateOperation(context, path3); + var deleteOperation = _operationHandler.CreateOperation(context, path); + var deleteOperation2 = _operationHandler.CreateOperation(context, path2); + var deleteOperation3 = _operationHandler.CreateOperation(context, path3); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(deleteOperation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index 86f7e44e9..c6ede5cad 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -8,6 +8,7 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; using System.Linq; using System.Xml.Linq; using Xunit; @@ -16,7 +17,13 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityGetOperationHandlerTests { - private readonly MediaEntityGetOperationHandler _operationalHandler = new MediaEntityGetOperationHandler(new()); + public MediaEntityGetOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + + private readonly MediaEntityGetOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -82,8 +89,9 @@ private void VerifyMediaEntityGetOperation(string annotation, bool enableOperati new ODataStreamContentSegment()); // Act - var getOperation = _operationalHandler.CreateOperation(context, path); - var getOperation2 = _operationalHandler.CreateOperation(context, path2); + var getOperation = _operationHandler.CreateOperation(context, path); + var getOperation2 = _operationHandler.CreateOperation(context, path2); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(getOperation); @@ -202,7 +210,8 @@ public void CreateMediaEntityPropertyGetOperationWithTargetPathAnnotationsReturn new ODataStreamPropertySegment(property.Name)); // Act - var operation = _operationalHandler.CreateOperation(context, path); + var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index bbeca1071..d8e2d417c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -4,8 +4,10 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; 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; @@ -14,7 +16,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityPutOperationHandlerTests { - private readonly MediaEntityPutOperationHandler _operationalHandler = new MediaEntityPutOperationHandler(new()); + public MediaEntityPutOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly MediaEntityPutOperationHandler _operationHandler; [Theory] [InlineData(true, false)] @@ -84,9 +91,10 @@ private void VerifyMediaEntityPutOperation(string annotation, bool enableOperati new ODataStreamPropertySegment(sp2.Name)); // Act - var putOperation = _operationalHandler.CreateOperation(context, path); - var putOperation2 = _operationalHandler.CreateOperation(context, path2); - var putOperation3 = _operationalHandler.CreateOperation(context, path3); + var putOperation = _operationHandler.CreateOperation(context, path); + var putOperation2 = _operationHandler.CreateOperation(context, path2); + var putOperation3 = _operationHandler.CreateOperation(context, path3); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(putOperation); @@ -176,7 +184,8 @@ public void CreateMediaEntityPropertyPutOperationWithTargetPathAnnotationsReturn new ODataStreamPropertySegment(property.Name)); // Act - var operation = _operationalHandler.CreateOperation(context, path); + var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs index bdc016d54..e2bde0a1d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs @@ -4,7 +4,9 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; using System.Linq; using Xunit; @@ -13,7 +15,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyDeleteOperationHandlerTests { - private NavigationPropertyDeleteOperationHandler _operationHandler = new NavigationPropertyDeleteOperationHandler(new()); + public NavigationPropertyDeleteOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly NavigationPropertyDeleteOperationHandler _operationHandler; [Theory] [InlineData(true, false)] @@ -39,6 +46,7 @@ public void CreateNavigationDeleteOperationReturnsCorrectOperation(bool enableOp // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -81,6 +89,8 @@ public void CreateNavigationDeleteOperationWithTargetPathAnnotationsReturnsCorre // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); + // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index 524e1fbda..0d70083e7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -7,7 +7,9 @@ using System.Linq; 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; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -16,7 +18,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyGetOperationHandlerTests { - private NavigationPropertyGetOperationHandler _operationHandler = new NavigationPropertyGetOperationHandler(new()); + public NavigationPropertyGetOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly NavigationPropertyGetOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -42,6 +49,7 @@ public void CreateNavigationGetOperationReturnsCorrectOperation(bool enableOpera // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -85,6 +93,7 @@ public void CreateNavigationGetOperationWithTargetPathAnnotationsAndNavigationPr // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -122,6 +131,7 @@ public void CreateNavigationGetOperationViaComposableFunctionReturnsCorrectOpera // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -178,6 +188,7 @@ public void CreateNavigationGetOperationViaOverloadedComposableFunctionReturnsCo // Act var operation1 = _operationHandler.CreateOperation(context, path1); var operation2 = _operationHandler.CreateOperation(context, path2); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation1); @@ -284,6 +295,7 @@ public void CreateNavigationGetOperationReturnsSecurityForReadRestrictions(bool // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -362,6 +374,7 @@ public void CreateNavigationGetOperationWithAlternateKeyReturnsCorrectOperationI // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index 58e66c9e6..fa61cacda 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -5,7 +5,9 @@ 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; using Microsoft.OpenApi.OData.Tests; using System.Linq; @@ -15,7 +17,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPatchOperationHandlerTests { - private NavigationPropertyPatchOperationHandler _operationHandler = new NavigationPropertyPatchOperationHandler(new()); + public NavigationPropertyPatchOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly NavigationPropertyPatchOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -41,6 +48,7 @@ public void CreateNavigationPatchOperationReturnsCorrectOperation(bool enableOpe // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -94,6 +102,7 @@ public void CreateNavigationPatchOperationReturnsCorrectOperationWithAnnotatedRe // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation.RequestBody); @@ -191,6 +200,7 @@ public void CreateNavigationPatchOperationReturnsSecurityForUpdateRestrictions(b // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index 09b3b1678..3ec42875b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -5,7 +5,9 @@ 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; using Microsoft.OpenApi.OData.Tests; using System.Linq; @@ -15,7 +17,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPostOperationHandlerTests { - private NavigationPropertyPostOperationHandler _operationHandler = new NavigationPropertyPostOperationHandler(new()); + public NavigationPropertyPostOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private NavigationPropertyPostOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -41,6 +48,7 @@ public void CreateNavigationPostOperationReturnsCorrectOperation(bool enableOper // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -85,6 +93,7 @@ public void CreateNavigationPostOperationWithTargetPathAnnotationsReturnsCorrect // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -111,6 +120,7 @@ public void CreateNavigationPostOperationReturnsCorrectOperationWithAnnotatedReq // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation.RequestBody); @@ -207,6 +217,7 @@ public void CreateNavigationPostOperationReturnsSecurityForInsertRestrictions(bo // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index b4574cb1a..28427dd3b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -5,7 +5,9 @@ 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; using Microsoft.OpenApi.OData.Tests; using System.Linq; @@ -15,7 +17,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class NavigationPropertyPutOperationHandlerTests { - private NavigationPropertyPutOperationHandler _operationHandler = new NavigationPropertyPutOperationHandler(new()); + public NavigationPropertyPutOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly NavigationPropertyPutOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -41,6 +48,7 @@ public void CreateNavigationPutOperationReturnsCorrectOperation(bool enableOpera // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -170,6 +178,7 @@ public void CreateNavigationPuthOperationReturnsSecurityForUpdateRestrictions(bo // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index 89fc3df45..f6dea1423 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -47,6 +47,8 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); + // Assert Assert.NotNull(operation); @@ -110,6 +112,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -166,6 +169,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySet(b ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -224,6 +228,8 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySetId ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); + // Assert Assert.NotNull(operation); @@ -284,6 +290,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -340,6 +347,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleton(b ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -391,6 +399,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig ODataTypeCastGetOperationHandler operationHandler = new (document); // Act var operation = operationHandler.CreateOperation(context, path); + document.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs index f998b304b..2c35873cc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs @@ -5,7 +5,9 @@ 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; using Xunit; @@ -13,7 +15,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefDeleteOperationHandlerTests { - private RefDeleteOperationHandler _operationHandler = new RefDeleteOperationHandler(new()); + public RefDeleteOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly RefDeleteOperationHandler _operationHandler; [Theory] [InlineData(true)] @@ -39,6 +46,7 @@ public void CreateNavigationRefDeleteOperationReturnsCorrectOperation(bool enabl // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs index b0009cd48..9fc114f3f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs @@ -5,7 +5,9 @@ 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; using Xunit; @@ -13,7 +15,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefGetOperationHandlerTests { - private RefGetOperationHandler _operationHandler = new RefGetOperationHandler(new()); + public RefGetOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly RefGetOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -42,6 +49,7 @@ public void CreateNavigationRefGetOperationReturnsCorrectOperation(bool enableOp // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs index 07abb9fc6..9f3c8546d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs @@ -4,7 +4,9 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; using System.Linq; using Xunit; @@ -13,7 +15,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefPostOperationHandlerTests { - private RefPostOperationHandler _operationHandler = new RefPostOperationHandler(new()); + public RefPostOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly RefPostOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -42,6 +49,7 @@ public void CreateNavigationRefPostOperationReturnsCorrectOperation(bool enableO // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs index 174621c70..9ffa04083 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs @@ -4,7 +4,9 @@ // ------------------------------------------------------------ using Microsoft.OData.Edm; +using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; using Microsoft.OpenApi.OData.Tests; using System.Linq; using Xunit; @@ -13,7 +15,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class RefPutOperationHandlerTests { - private RefPutOperationHandler _operationHandler = new RefPutOperationHandler(new()); + public RefPutOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly RefPutOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -42,6 +49,7 @@ public void CreateNavigationRefPutOperationReturnsCorrectOperation(bool enableOp // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index 5654a1a89..af995a471 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -11,7 +11,9 @@ 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; using Xunit; @@ -19,7 +21,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class SingletonGetOperationHandlerTests { - private SingletonGetOperationHandler _operationHandler = new SingletonGetOperationHandler(new()); + public SingletonGetOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly SingletonGetOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -48,6 +55,7 @@ public void CreateSingletonGetOperationReturnsCorrectOperation(bool enableOperat // Act var get = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(get); @@ -194,6 +202,7 @@ public void ReadRestrictionsTermWorksToCreateOperationForSingletonGetOperation(b // Act var operation = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(operation); @@ -292,6 +301,7 @@ private void VerifyParameter(string annotation, bool hasRestriction, bool suppor // Act var get = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(get); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index 9661742c4..ebc6a8a08 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -8,6 +8,7 @@ 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; using Microsoft.OpenApi.OData.Tests; using Xunit; @@ -16,7 +17,12 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class SingletonPatchOperationHandlerTests { - private SingletonPatchOperationHandler _operationHandler = new SingletonPatchOperationHandler(new()); + public SingletonPatchOperationHandlerTests() + { + _operationHandler = new (_openApiDocument); + } + private readonly OpenApiDocument _openApiDocument = new(); + private readonly SingletonPatchOperationHandler _operationHandler; [Theory] [InlineData(true, true)] @@ -45,6 +51,7 @@ public void CreateSingletonPatchOperationReturnsCorrectOperation(bool enableOper // Act var patch = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(patch); @@ -197,6 +204,7 @@ private void VerifyOperation(string annotation, bool hasRestriction) // Act var patch = _operationHandler.CreateOperation(context, path); + _openApiDocument.Tags = context.CreateTags(); // Assert Assert.NotNull(patch); From 1c56bcae6a02cd8ce93b64461364a9bde9483630 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 31 Dec 2024 16:41:46 -0500 Subject: [PATCH 039/103] fix: type/format mismatch in test data --- .../Resources/Empty.OpenApi.V2.json | 10 ++++++---- .../Resources/Empty.OpenApi.V2.yaml | 10 ++++++---- .../Resources/Empty.OpenApi.json | 10 ++++++---- .../Resources/Empty.OpenApi.yaml | 10 ++++++---- .../Resources/Multiple.Schema.OpenApi.V2.json | 10 ++++++---- .../Resources/Multiple.Schema.OpenApi.V2.yaml | 10 ++++++---- .../Resources/Multiple.Schema.OpenApi.json | 10 ++++++---- .../Resources/Multiple.Schema.OpenApi.yaml | 10 ++++++---- .../Resources/TripService.OpenApi.V2.json | 10 ++++++---- .../Resources/TripService.OpenApi.V2.yaml | 10 ++++++---- .../Resources/TripService.OpenApi.json | 10 ++++++---- .../Resources/TripService.OpenApi.yaml | 10 ++++++---- 12 files changed, 72 insertions(+), 48 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json index 3b1a6c860..23c7cd2a2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json @@ -73,8 +73,8 @@ "type": "object" }, "ODataCountResponse": { - "format": "int32", - "type": "integer" + "format": "int64", + "type": "number" }, "ReferenceUpdate": { "type": "object", @@ -112,14 +112,16 @@ "in": "query", "name": "$top", "description": "Show only the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "skip": { "in": "query", "name": "$skip", "description": "Skip the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "count": { 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 a75539a52..a79a8c508 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 @@ -50,8 +50,8 @@ definitions: description: The structure of this object is service-specific type: object ODataCountResponse: - format: int32 - type: integer + format: int64 + type: number ReferenceUpdate: type: object properties: @@ -77,13 +77,15 @@ parameters: in: query name: $top description: Show only the first n items - type: integer + type: number + format: int64 minimum: 0 skip: in: query name: $skip description: Skip the first n items - type: integer + type: number + format: int64 minimum: 0 count: in: query diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json index 64796606e..776a715d5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json @@ -77,8 +77,8 @@ "description": "The structure of this object is service-specific" }, "ODataCountResponse": { - "type": "integer", - "format": "int32" + "type": "number", + "format": "int64" }, "ReferenceUpdate": { "type": "object", @@ -144,7 +144,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" }, "example": 50 }, @@ -156,7 +157,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" } }, "count": { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml index 5bc83853a..ba806b589 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml @@ -52,8 +52,8 @@ components: type: object description: The structure of this object is service-specific ODataCountResponse: - type: integer - format: int32 + type: number + format: int64 ReferenceUpdate: type: object properties: @@ -98,7 +98,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 example: 50 skip: name: $skip @@ -108,7 +109,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 count: name: $count in: query diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json index 4626b31e2..35b44a0a9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json @@ -5944,8 +5944,8 @@ "type": "object" }, "ODataCountResponse": { - "format": "int32", - "type": "integer" + "format": "int64", + "type": "number" }, "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { "title": "Collection of DocumentDto", @@ -6127,14 +6127,16 @@ "in": "query", "name": "$top", "description": "Show only the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "skip": { "in": "query", "name": "$skip", "description": "Skip the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "count": { 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 ffb97bf38..a05f7e39a 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 @@ -4319,8 +4319,8 @@ definitions: description: The structure of this object is service-specific type: object ODataCountResponse: - format: int32 - type: integer + format: int64 + type: number Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: title: Collection of DocumentDto type: object @@ -4442,13 +4442,15 @@ parameters: in: query name: $top description: Show only the first n items - type: integer + type: number + format: int64 minimum: 0 skip: in: query name: $skip description: Skip the first n items - type: integer + type: number + format: int64 minimum: 0 count: in: query 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 e6af74cf0..1230b1159 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 @@ -6660,8 +6660,8 @@ "description": "The structure of this object is service-specific" }, "ODataCountResponse": { - "type": "integer", - "format": "int32" + "type": "number", + "format": "int64" }, "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { "title": "Collection of DocumentDto", @@ -7001,7 +7001,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" }, "example": 50 }, @@ -7013,7 +7014,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" } }, "count": { 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 cd3fc34e0..2e0a01807 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 @@ -4803,8 +4803,8 @@ components: type: object description: The structure of this object is service-specific ODataCountResponse: - type: integer - format: int32 + type: number + format: int64 Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: title: Collection of DocumentDto type: object @@ -5023,7 +5023,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 example: 50 skip: name: $skip @@ -5033,7 +5034,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 count: name: $count in: query diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index 2d2dfadba..1e52c2b4b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -31387,8 +31387,8 @@ } }, "ODataCountResponse": { - "format": "int32", - "type": "integer" + "format": "int64", + "type": "number" }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { "title": "Collection of Person", @@ -31570,14 +31570,16 @@ "in": "query", "name": "$top", "description": "Show only the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "skip": { "in": "query", "name": "$skip", "description": "Skip the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "count": { 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 a725e263c..ad35b6435 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 @@ -21276,8 +21276,8 @@ definitions: RequestId: type: string ODataCountResponse: - format: int32 - type: integer + format: int64 + type: number Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: title: Collection of Person type: object @@ -21399,13 +21399,15 @@ parameters: in: query name: $top description: Show only the first n items - type: integer + type: number + format: int64 minimum: 0 skip: in: query name: $skip description: Skip the first n items - type: integer + type: number + format: int64 minimum: 0 count: in: query 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 8872302d0..6b0d7767e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -35129,8 +35129,8 @@ } }, "ODataCountResponse": { - "type": "integer", - "format": "int32" + "type": "number", + "format": "int64" }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { "title": "Collection of Person", @@ -35532,7 +35532,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" }, "example": 50 }, @@ -35544,7 +35545,8 @@ "explode": false, "schema": { "minimum": 0, - "type": "integer" + "type": "number", + "format": "int64" } }, "count": { 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 a26b7b902..66dc6a5d4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -23606,8 +23606,8 @@ components: type: string nullable: true ODataCountResponse: - type: integer - format: int32 + type: number + format: int64 Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: title: Collection of Person type: object @@ -23863,7 +23863,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 example: 50 skip: name: $skip @@ -23873,7 +23874,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 count: name: $count in: query From b66ae01db6a81e19aa6c62a82aeaddb792a0ec31 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 10:26:02 -0500 Subject: [PATCH 040/103] chore: linting Signed-off-by: Vincent Biret --- .../Generator/OpenApiExampleGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index ef3eb3868..f2f81dd22 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -82,7 +82,7 @@ private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType str IEdmEntityType entityType = structuredType as IEdmEntityType; // properties - foreach (var property in structuredType.DeclaredProperties.OrderBy(p => p.Name)) + foreach (var property in structuredType.DeclaredProperties.OrderBy(static p => p.Name, StringComparer.Ordinal)) { // IOpenApiAny item; IEdmTypeReference propertyType = property.Type; From 3d76e851ac71be659980fc648ffccc32de1360e4 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 13:27:02 -0500 Subject: [PATCH 041/103] chore: linting use switch expressions Signed-off-by: Vincent Biret --- .../Generator/OpenApiExampleGenerator.cs | 126 +++++------------- .../Generator/OpenApiSchemaGenerator.cs | 81 +++++------ 2 files changed, 70 insertions(+), 137 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index f2f81dd22..f3176ba30 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.Linq; using System.Text.Json.Nodes; using Microsoft.OData.Edm; @@ -75,33 +76,24 @@ private static OpenApiExample CreateExample(this ODataContext context, IEdmType private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType structuredType) { - OpenApiExample example = new OpenApiExample(); + OpenApiExample example = new(); - JsonObject value = new JsonObject(); - - IEdmEntityType entityType = structuredType as IEdmEntityType; + JsonObject value = new(); // properties foreach (var property in structuredType.DeclaredProperties.OrderBy(static p => p.Name, StringComparer.Ordinal)) { - // IOpenApiAny item; IEdmTypeReference propertyType = property.Type; JsonNode item = GetTypeNameForExample(propertyType); - EdmTypeKind typeKind = propertyType.TypeKind(); - if (typeKind == EdmTypeKind.Primitive && item is JsonValue jsonValue && jsonValue.TryGetValue(out string stringAny)) + if (propertyType.TypeKind() == EdmTypeKind.Primitive && + item is JsonValue jsonValue && + jsonValue.TryGetValue(out string stringAny) && + structuredType is IEdmEntityType entityType && + entityType.Key().Any(k => StringComparer.Ordinal.Equals(k.Name, property.Name))) { - string propertyValue = stringAny; - if (entityType != null && entityType.Key().Any(k => k.Name == property.Name)) - { - propertyValue += " (identifier)"; - } - if (propertyType.IsDateTimeOffset() || propertyType.IsDate() || propertyType.IsTimeOfDay()) - { - propertyValue += " (timestamp)"; - } - item = propertyValue; + item = $"{stringAny} (identifier)"; } value.Add(property.Name, item); @@ -112,81 +104,33 @@ private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType str private static JsonNode GetTypeNameForExample(IEdmTypeReference edmTypeReference) { - switch (edmTypeReference.TypeKind()) + return edmTypeReference.TypeKind() switch { - case EdmTypeKind.Primitive: - if (edmTypeReference.IsBinary()) - { - // return new OpenApiBinary(new byte[] { 0x00 }); issue on binary writing - return Convert.ToBase64String(new byte[] { 0x00 }); - } - else if (edmTypeReference.IsBoolean()) - { - return true; - } - else if (edmTypeReference.IsByte()) - { - return 0x00; - } - else if (edmTypeReference.IsDate()) - { - return DateTime.MinValue; - } - else if (edmTypeReference.IsDateTimeOffset()) - { - return DateTimeOffset.MinValue; - } - else if (edmTypeReference.IsDecimal() || edmTypeReference.IsDouble()) - { - return 0D; - } - else if (edmTypeReference.IsFloating()) - { - return 0F; - } - else if (edmTypeReference.IsGuid()) - { - return Guid.Empty.ToString(); - } - else if (edmTypeReference.IsInt16() || edmTypeReference.IsInt32()) - { - return 0; - } - else if (edmTypeReference.IsInt64()) - { - return 0L; - } - else - { - return edmTypeReference.AsPrimitive().PrimitiveDefinition().Name; - } - - case EdmTypeKind.Entity: - case EdmTypeKind.Complex: - case EdmTypeKind.Enum: - JsonObject obj = new() - { - ["@odata.type"] = edmTypeReference.FullName() - }; - return obj; - - case EdmTypeKind.Collection: - JsonArray array = []; - IEdmTypeReference elementType = edmTypeReference.AsCollection().ElementType(); - array.Add(GetTypeNameForExample(elementType)); - return array; - - case EdmTypeKind.TypeDefinition: - var typedef = edmTypeReference.AsTypeDefinition().TypeDefinition(); - return GetTypeNameForExample(new EdmPrimitiveTypeReference(typedef.UnderlyingType, edmTypeReference.IsNullable)); - - case EdmTypeKind.Untyped: - return new JsonObject(); - - case EdmTypeKind.EntityReference: - default: - throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()); - } + // return new OpenApiBinary(new byte[] { 0x00 }); issue on binary writing + EdmTypeKind.Primitive when edmTypeReference.IsBinary() => Convert.ToBase64String(new byte[] { 0x00 }), + EdmTypeKind.Primitive when edmTypeReference.IsBoolean() => true, + EdmTypeKind.Primitive when edmTypeReference.IsByte() => 0x00, + EdmTypeKind.Primitive when edmTypeReference.IsDate() => DateTime.MinValue, + EdmTypeKind.Primitive when edmTypeReference.IsDateTimeOffset() => DateTimeOffset.MinValue, + EdmTypeKind.Primitive when edmTypeReference.IsDecimal() || edmTypeReference.IsDouble() => 0D, + EdmTypeKind.Primitive when edmTypeReference.IsFloating() => 0F, + EdmTypeKind.Primitive when edmTypeReference.IsGuid() => Guid.Empty.ToString(), + EdmTypeKind.Primitive when edmTypeReference.IsInt16() || edmTypeReference.IsInt32() => 0, + EdmTypeKind.Primitive when edmTypeReference.IsInt64() => 0L, + EdmTypeKind.Primitive => edmTypeReference.AsPrimitive().PrimitiveDefinition().Name, + EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() + {//TODO this is wrong for enums, and should instead use one of the enum members + [Constants.OdataType] = edmTypeReference.FullName() + }, + + EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(edmTypeReference.AsCollection().ElementType())), + + EdmTypeKind.TypeDefinition => GetTypeNameForExample(new EdmPrimitiveTypeReference(edmTypeReference.AsTypeDefinition().TypeDefinition().UnderlyingType, edmTypeReference.IsNullable)), + + EdmTypeKind.Untyped => new JsonObject(), + + _ => throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()), + }; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index cc93c89ad..078cd187b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -614,7 +614,6 @@ private static JsonObject CreateStructuredTypePropertiesExample(ODataContext con // properties foreach (var property in structuredType.Properties()) { - // IOpenApiAny item; IEdmTypeReference propertyType = property.Type; JsonNode item = GetTypeNameForExample(context, propertyType, document); @@ -640,57 +639,47 @@ private static JsonObject CreateStructuredTypePropertiesExample(ODataContext con return example; } - private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) { - switch (edmTypeReference.TypeKind()) + IEdmPrimitiveType primitiveType = edmTypeReference.AsPrimitive().PrimitiveDefinition(); + OpenApiSchema schema = context.CreateSchema(primitiveType, document); + + if (edmTypeReference.IsBoolean()) + { + return true; + } + else { - case EdmTypeKind.Primitive: - IEdmPrimitiveType primitiveType = edmTypeReference.AsPrimitive().PrimitiveDefinition(); - OpenApiSchema schema = context.CreateSchema(primitiveType, document); + if (schema.Reference != null) + { + return schema.Reference.Id; + } + else + { + return schema.Type.ToIdentifier() ?? + (schema.AnyOf ?? Enumerable.Empty()) + .Union(schema.AllOf ?? Enumerable.Empty()) + .Union(schema.OneOf ?? Enumerable.Empty()) + .FirstOrDefault(static x => !string.IsNullOrEmpty(x.Format))?.Format ?? schema.Format; + } + } + } - if (edmTypeReference.IsBoolean()) - { - return true; - } - else - { - if (schema.Reference != null) - { - return schema.Reference.Id; - } - else - { - return schema.Type.ToIdentifier() ?? - (schema.AnyOf ?? Enumerable.Empty()) - .Union(schema.AllOf ?? Enumerable.Empty()) - .Union(schema.OneOf ?? Enumerable.Empty()) - .FirstOrDefault(static x => !string.IsNullOrEmpty(x.Format))?.Format ?? schema.Format; - } - } + private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + { + return edmTypeReference.TypeKind() switch + { + EdmTypeKind.Primitive => GetTypeNameForPrimitive(context, edmTypeReference, document), - case EdmTypeKind.Entity: - case EdmTypeKind.Complex: - case EdmTypeKind.Enum: - JsonObject obj = new() - { + EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() + {//TODO this is wrong for enums, and should instead use one of the enum members [Constants.OdataType] = edmTypeReference.FullName() - }; - return obj; - - case EdmTypeKind.Collection: - JsonArray array = []; - IEdmTypeReference elementType = edmTypeReference.AsCollection().ElementType(); - array.Add(GetTypeNameForExample(context, elementType, document)); - return array; - - case EdmTypeKind.Untyped: - return new JsonObject(); + }, - case EdmTypeKind.TypeDefinition: - case EdmTypeKind.EntityReference: - default: - throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()); - } + EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(context, edmTypeReference.AsCollection().ElementType(), document)), + EdmTypeKind.Untyped => new JsonObject(), + _ => throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()), + }; } private static JsonNode CreateDefault(this IEdmStructuralProperty property) From c06fde04b05e40e55805bb9f5cd1fddd7903aa85 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 13:49:31 -0500 Subject: [PATCH 042/103] fix: regroups example generation logic Signed-off-by: Vincent Biret --- .../Generator/OpenApiComponentsGenerator.cs | 2 +- .../Generator/OpenApiExampleGenerator.cs | 85 +++---------------- .../Generator/OpenApiSchemaGenerator.cs | 32 ++++--- .../Generator/OpenApiSchemaGeneratorTests.cs | 64 +++++++------- 4 files changed, 63 insertions(+), 120 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index 3764334c9..40c78dde3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -31,7 +31,7 @@ public static OpenApiComponents CreateComponents(this ODataContext context, Open document.Components.Parameters = context.CreateParameters(); document.Components.Responses = context.CreateResponses(document); document.Components.RequestBodies = context.CreateRequestBodies(document); - document.Components.Examples = context.CreateExamples(); + document.Components.Examples = context.CreateExamples(document); document.Components.SecuritySchemes = context.CreateSecuritySchemes(); document.Components.Links = null; document.Components.Callbacks = null; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index f3176ba30..61d5a5c71 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -6,11 +6,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; -using System.Linq; -using System.Text.Json.Nodes; using Microsoft.OData.Edm; -using Microsoft.OpenApi.Exceptions; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -26,10 +22,12 @@ internal static class OpenApiExampleGenerator /// Create the dictionary of object. /// /// The OData to Open API context. + /// The Open API document. /// The created dictionary. - public static IDictionary CreateExamples(this ODataContext context) + public static IDictionary CreateExamples(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); IDictionary examples = new Dictionary(); @@ -43,10 +41,9 @@ public static IDictionary CreateExamples(this ODataConte { switch (element.SchemaElementKind) { - case EdmSchemaElementKind.TypeDefinition: // Type definition + case EdmSchemaElementKind.TypeDefinition when element is IEdmType reference: // Type definition { - IEdmType reference = (IEdmType)element; - OpenApiExample example = context.CreateExample(reference); + OpenApiExample example = context.CreateExample(reference, document); if (example != null) { examples.Add(reference.FullTypeName(), example); @@ -59,77 +56,19 @@ public static IDictionary CreateExamples(this ODataConte return examples; } - private static OpenApiExample CreateExample(this ODataContext context, IEdmType edmType) + private static OpenApiExample CreateExample(this ODataContext context, IEdmType edmType, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(edmType != null); - switch (edmType.TypeKind) + return edmType.TypeKind switch { - case EdmTypeKind.Complex: // complex type - case EdmTypeKind.Entity: // entity type - return CreateStructuredTypeExample((IEdmStructuredType)edmType); - } - - return null; - } - - private static OpenApiExample CreateStructuredTypeExample(IEdmStructuredType structuredType) - { - OpenApiExample example = new(); - - JsonObject value = new(); - - // properties - foreach (var property in structuredType.DeclaredProperties.OrderBy(static p => p.Name, StringComparer.Ordinal)) - { - IEdmTypeReference propertyType = property.Type; - - JsonNode item = GetTypeNameForExample(propertyType); - - if (propertyType.TypeKind() == EdmTypeKind.Primitive && - item is JsonValue jsonValue && - jsonValue.TryGetValue(out string stringAny) && - structuredType is IEdmEntityType entityType && - entityType.Key().Any(k => StringComparer.Ordinal.Equals(k.Name, property.Name))) + // complex type + EdmTypeKind.Complex or EdmTypeKind.Entity when edmType is IEdmStructuredType edmStructuredType => new() { - item = $"{stringAny} (identifier)"; - } - - value.Add(property.Name, item); - } - example.Value = value; - return example; - } - - private static JsonNode GetTypeNameForExample(IEdmTypeReference edmTypeReference) - { - return edmTypeReference.TypeKind() switch - { - // return new OpenApiBinary(new byte[] { 0x00 }); issue on binary writing - EdmTypeKind.Primitive when edmTypeReference.IsBinary() => Convert.ToBase64String(new byte[] { 0x00 }), - EdmTypeKind.Primitive when edmTypeReference.IsBoolean() => true, - EdmTypeKind.Primitive when edmTypeReference.IsByte() => 0x00, - EdmTypeKind.Primitive when edmTypeReference.IsDate() => DateTime.MinValue, - EdmTypeKind.Primitive when edmTypeReference.IsDateTimeOffset() => DateTimeOffset.MinValue, - EdmTypeKind.Primitive when edmTypeReference.IsDecimal() || edmTypeReference.IsDouble() => 0D, - EdmTypeKind.Primitive when edmTypeReference.IsFloating() => 0F, - EdmTypeKind.Primitive when edmTypeReference.IsGuid() => Guid.Empty.ToString(), - EdmTypeKind.Primitive when edmTypeReference.IsInt16() || edmTypeReference.IsInt32() => 0, - EdmTypeKind.Primitive when edmTypeReference.IsInt64() => 0L, - EdmTypeKind.Primitive => edmTypeReference.AsPrimitive().PrimitiveDefinition().Name, - EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() - {//TODO this is wrong for enums, and should instead use one of the enum members - [Constants.OdataType] = edmTypeReference.FullName() - }, - - EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(edmTypeReference.AsCollection().ElementType())), - - EdmTypeKind.TypeDefinition => GetTypeNameForExample(new EdmPrimitiveTypeReference(edmTypeReference.AsTypeDefinition().TypeDefinition().UnderlyingType, edmTypeReference.IsNullable)), - - EdmTypeKind.Untyped => new JsonObject(), - - _ => throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()), + Value = OpenApiSchemaGenerator.CreateStructuredTypePropertiesExample(context, edmStructuredType, document), + }, + _ => null, }; } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 078cd187b..34f6f4b1c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -607,7 +607,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex } } - private static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + internal static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { JsonObject example = []; @@ -618,19 +618,13 @@ private static JsonObject CreateStructuredTypePropertiesExample(ODataContext con JsonNode item = GetTypeNameForExample(context, propertyType, document); - EdmTypeKind typeKind = propertyType.TypeKind(); - if (typeKind == EdmTypeKind.Primitive && item is JsonValue jsonValue && jsonValue.TryGetValue(out string stringAny)) + if (propertyType.TypeKind() == EdmTypeKind.Primitive && + item is JsonValue jsonValue && + jsonValue.TryGetValue(out string stringAny) && + structuredType is IEdmEntityType entityType && + entityType.Key().Any(k => StringComparer.Ordinal.Equals(k.Name, property.Name))) { - string value = stringAny; - if (structuredType is IEdmEntityType entityType && entityType.Key().Any(k => k.Name == property.Name)) - { - value += " (identifier)"; - } - if (propertyType.IsDateTimeOffset() || propertyType.IsDate() || propertyType.IsTimeOfDay()) - { - value += " (timestamp)"; - } - item = value; + item = $"{stringAny} (identifier)"; } example.Add(property.Name, item); @@ -669,6 +663,17 @@ private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeRefe { return edmTypeReference.TypeKind() switch { + // return new OpenApiBinary(new byte[] { 0x00 }); issue on binary writing + EdmTypeKind.Primitive when edmTypeReference.IsBinary() => Convert.ToBase64String(new byte[] { 0x00 }), + EdmTypeKind.Primitive when edmTypeReference.IsBoolean() => true, + EdmTypeKind.Primitive when edmTypeReference.IsByte() => 0x00, + EdmTypeKind.Primitive when edmTypeReference.IsDate() => DateTime.MinValue, + EdmTypeKind.Primitive when edmTypeReference.IsDateTimeOffset() => DateTimeOffset.MinValue, + EdmTypeKind.Primitive when edmTypeReference.IsDecimal() || edmTypeReference.IsDouble() => 0D, + EdmTypeKind.Primitive when edmTypeReference.IsFloating() => 0F, + EdmTypeKind.Primitive when edmTypeReference.IsGuid() => Guid.Empty.ToString(), + EdmTypeKind.Primitive when edmTypeReference.IsInt16() || edmTypeReference.IsInt32() => 0, + EdmTypeKind.Primitive when edmTypeReference.IsInt64() => 0L, EdmTypeKind.Primitive => GetTypeNameForPrimitive(context, edmTypeReference, document), EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() @@ -677,6 +682,7 @@ private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeRefe }, EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(context, edmTypeReference.AsCollection().ElementType(), document)), + EdmTypeKind.TypeDefinition => GetTypeNameForExample(context, new EdmPrimitiveTypeReference(edmTypeReference.AsTypeDefinition().TypeDefinition().UnderlyingType, edmTypeReference.IsNullable), document), EdmTypeKind.Untyped => new JsonObject(), _ => throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()), }; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index b25082897..c8a3f9e89 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -542,7 +542,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""allOf"": [ { ""$ref"": ""#/components/schemas/NS.LandPlant"" @@ -576,10 +576,9 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() ""@odata.type"": ""NS.Continent"" }, ""Name"": ""string"", - ""Price"": ""decimal"" + ""Price"": 0 } -}" -.ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -613,7 +612,7 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""title"": ""Zoo"", ""type"": ""object"", ""properties"": { @@ -633,14 +632,14 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() }, ""description"": ""Entity type 'Zoo' description."", ""example"": { - ""Id"": ""number (identifier)"", + ""Id"": 0, ""Creatures"": [ { ""@odata.type"": ""NS.Creature"" } ] } -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -694,7 +693,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() _output.WriteLine(json); // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""allOf"": [ { ""$ref"": ""#/components/schemas/NS.Animal"" @@ -711,12 +710,11 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() } ], ""example"": { - ""Id"": ""number (identifier)"", - ""Age"": ""number"", + ""Id"": 0, + ""Age"": 0, ""Name"": ""string"" } -}" -.ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -736,7 +734,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(schema); - Assert.True(String.IsNullOrEmpty(schema.Type.ToIdentifier())); + Assert.True(string.IsNullOrEmpty(schema.Type.ToIdentifier())); Assert.NotNull(schema.AllOf); Assert.Null(schema.AnyOf); @@ -840,7 +838,7 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""title"": ""Color"", ""enum"": [ ""Blue"", @@ -848,7 +846,7 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() ], ""type"": ""string"", ""description"": ""Enum type 'Color' description."" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } #endregion @@ -877,15 +875,15 @@ public void CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSp if (specVersion == OpenApiSpecVersion.OpenApi2_0) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""$ref"": ""#/definitions/DefaultNs.Color"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""$ref"": ""#/components/schemas/DefaultNs.Color"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } } @@ -913,13 +911,13 @@ public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecV // Assert if (specVersion == OpenApiSpecVersion.OpenApi2_0) { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""$ref"": ""#/definitions/DefaultNs.Color"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } else { - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""anyOf"": [ { ""$ref"": ""#/components/schemas/DefaultNs.Color"" @@ -930,7 +928,7 @@ public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecV } ], ""default"": ""yellow"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } } @@ -1032,10 +1030,10 @@ public void NonNullableBooleanPropertyWithDefaultValueWorks() Assert.Equal(JsonSchemaType.Boolean, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""boolean"", ""default"": false -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -1057,12 +1055,12 @@ public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() Assert.Equal(JsonSchemaType.String, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maxLength"": 44, ""type"": ""string"", ""format"": ""base64url"", ""default"": ""T0RhdGE"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -1082,13 +1080,13 @@ public void NonNullableIntegerPropertyWithDefaultValueWorks() Assert.Equal(JsonSchemaType.Number, schema.Type); string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maximum"": 2147483647, ""minimum"": -2147483648, ""type"": ""number"", ""format"": ""int32"", ""default"": -128 -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } [Fact] @@ -1109,7 +1107,7 @@ public void NonNullableDoublePropertyWithDefaultStringWorks() string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); - Assert.Equal(@"{ + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""oneOf"": [ { ""type"": ""number"", @@ -1125,7 +1123,7 @@ public void NonNullableDoublePropertyWithDefaultStringWorks() } ], ""default"": ""3.1415926535897931"" -}".ChangeLineBreaks(), json); +}"), JsonNode.Parse(json))); } @@ -1138,9 +1136,9 @@ public void NonNullableUntypedPropertyWorks() { ShowSchemaExamples = true }); - EdmEntityType entitType = new EdmEntityType("NS", "Entity"); + EdmEntityType entityType = new EdmEntityType("NS", "Entity"); IEdmStructuralProperty property = new EdmStructuralProperty( - entitType, "UntypedProperty", EdmCoreModel.Instance.GetUntyped()); + entityType, "UntypedProperty", EdmCoreModel.Instance.GetUntyped()); // Act var schema = context.CreatePropertySchema(property, new()); From 2b33d7c51201ee7a49b1a920bed181273771d5f1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 13:54:06 -0500 Subject: [PATCH 043/103] chore: regroups numeric types Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGenerator.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 34f6f4b1c..2f3e7cf85 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -20,6 +20,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models.References; +using System.Globalization; namespace Microsoft.OpenApi.OData.Generator { @@ -667,13 +668,15 @@ private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeRefe EdmTypeKind.Primitive when edmTypeReference.IsBinary() => Convert.ToBase64String(new byte[] { 0x00 }), EdmTypeKind.Primitive when edmTypeReference.IsBoolean() => true, EdmTypeKind.Primitive when edmTypeReference.IsByte() => 0x00, - EdmTypeKind.Primitive when edmTypeReference.IsDate() => DateTime.MinValue, - EdmTypeKind.Primitive when edmTypeReference.IsDateTimeOffset() => DateTimeOffset.MinValue, - EdmTypeKind.Primitive when edmTypeReference.IsDecimal() || edmTypeReference.IsDouble() => 0D, - EdmTypeKind.Primitive when edmTypeReference.IsFloating() => 0F, - EdmTypeKind.Primitive when edmTypeReference.IsGuid() => Guid.Empty.ToString(), - EdmTypeKind.Primitive when edmTypeReference.IsInt16() || edmTypeReference.IsInt32() => 0, - EdmTypeKind.Primitive when edmTypeReference.IsInt64() => 0L, + EdmTypeKind.Primitive when edmTypeReference.IsDate() => DateTime.MinValue.ToString("o", CultureInfo.InvariantCulture), + EdmTypeKind.Primitive when edmTypeReference.IsDateTimeOffset() => DateTimeOffset.MinValue.ToString("o", CultureInfo.InvariantCulture), + EdmTypeKind.Primitive when edmTypeReference.IsGuid() => Guid.Empty.ToString("D", CultureInfo.InvariantCulture), + EdmTypeKind.Primitive when edmTypeReference.IsInt16() || + edmTypeReference.IsInt32() || + edmTypeReference.IsDecimal() || + edmTypeReference.IsInt64() || + edmTypeReference.IsFloating() || + edmTypeReference.IsDouble() => 0, EdmTypeKind.Primitive => GetTypeNameForPrimitive(context, edmTypeReference, document), EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() From 2e5d784a14fc898dbbb5c1e196aed799e70f8510 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 14:02:19 -0500 Subject: [PATCH 044/103] chore: updates basic example oAS v3 Signed-off-by: Vincent Biret --- .../Resources/Basic.OpenApi.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json index 8d3502333..2668552e7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json @@ -1084,7 +1084,7 @@ } }, "example": { - "Id": "number", + "Id": 0, "City": { "@odata.type": "DefaultNs.City" } @@ -1106,7 +1106,7 @@ } ], "example": { - "Id": "number", + "Id": 0, "City": { "@odata.type": "DefaultNs.City" }, @@ -1393,7 +1393,7 @@ "HomeAddress": { "@odata.type": "DefaultNs.Address" }, - "UserName": "String (identifier)", + "UserName": "string (identifier)", "WorkAddress": { "@odata.type": "DefaultNs.Address" } @@ -1401,12 +1401,12 @@ }, "DefaultNs.City": { "value": { - "Name": "String (identifier)" + "Name": "string (identifier)" } }, "DefaultNs.CountryOrRegion": { "value": { - "Name": "String (identifier)" + "Name": "string (identifier)" } }, "DefaultNs.Address": { @@ -1419,9 +1419,13 @@ }, "DefaultNs.WorkAddress": { "value": { + "City": { + "@odata.type": "DefaultNs.City" + }, "CountryOrRegion": { "@odata.type": "DefaultNs.CountryOrRegion" - } + }, + "Id": 0 } } }, From 5847ecf55fb6751ef1350eec408b5e4bc4d00df4 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 15:26:30 -0500 Subject: [PATCH 045/103] fix: multiple updates to test file Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.json | 240 ++++++++++-------- 1 file changed, 132 insertions(+), 108 deletions(-) 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 1230b1159..e444760de 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 @@ -4728,14 +4728,14 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", "Filename": "string", "NumberOfRevisions": "string", "Suffix": "string", "DomainId": "number", - "ModificationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", "Tags": [ { @@ -4841,7 +4841,7 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Number": "string", "Description": "string", @@ -4853,9 +4853,9 @@ "TypeId": "number", "DomainId": "number", "CreatedBy": "number", - "CreationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", - "ModificationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentDto" @@ -4973,22 +4973,22 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Number": "number", "DocumentId": "number", "DocumentName": "string", "DocumentDescription": "string", - "CreationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "CreatedBy": "number", "IsReviewed": true, "ReviewedBy": "number", - "ReviewedDate": "string (timestamp)", + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", "IsApproved": true, "ApprovedBy": "number", - "ApprovedDate": "string (timestamp)", + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", "IsRejected": true, "RejectedBy": "number", - "RejectedDate": "string (timestamp)", + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", "DomainId": "number", "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -5031,12 +5031,12 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", - "DomainId": "number" + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0 } }, "Siterra.Documents.App.DTO.DocumentTagRelDto": { @@ -5360,26 +5360,26 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", "StatusId": "number", "TypeId": "number", "Keywords": "string", - "CreationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "CreatedBy": "number", - "ModificationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", "DomainId": "number", "LibraryId": "number", "OwnerUserId": "number", - "StatusDate": "string (timestamp)", + "StatusDate": "0001-01-01T00:00:00.0000000+00:00", "LastRevisionId": "number", - "CheckoutDate": "string (timestamp)", + "CheckoutDate": "0001-01-01T00:00:00.0000000+00:00", "CheckoutPath": "string", "CheckoutUserId": "number", "Number": "string", - "OriginalDate": "string (timestamp)", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", "FileSized": "number", "FileClientPath": "string", "LastRevisionFileId": "number", @@ -5394,7 +5394,7 @@ "ReviewDescription": "string", "SourceDocumentId": "number", "ScraperMapId": "number", - "LastDownloadedDate": "string (timestamp)", + "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", "SmsId": "number", "IsApprovedOld": "number", "Suffix": "string", @@ -5500,9 +5500,9 @@ "ClassId": "number", "DocumentId": "number", "CreatedBy": "number", - "CreationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", - "ModificationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "IsPrimary": true, "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -5584,8 +5584,8 @@ "DomainId": "number", "CreatedBy": "number", "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "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" }, @@ -5873,7 +5873,7 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "DomainId": "number", "Name": "string", "ParentFolderId": "number", @@ -5883,8 +5883,8 @@ "TotalSize": "number", "FilesCounter": "number", "FoldersCounter": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", "CreatedBy": "number", "ProjectId": "number", @@ -6057,12 +6057,12 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "ModifiedBy": "number", "CreatedBy": "number", - "ModificationDate": "string (timestamp)", - "CreationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "DomainId": "number", "Description": "string", "XmlName": "string", @@ -6193,13 +6193,13 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Path": "string", "ModifiedBy": "number", "CreatedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Sized": "number", "ActualName": "string", "DomainId": "number", @@ -6265,14 +6265,14 @@ } }, "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)" + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00" } }, "Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag": { @@ -6294,14 +6294,14 @@ } ], "example": { - "Id": "number (identifier)", + "Id": 0, "DomainId": "number", "Name": "string", "Description": "string", "CreatedBy": "number", "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" @@ -6329,14 +6329,14 @@ } ], "example": { - "Id": "number (identifier)", + "Id": 0, "DomainId": "number", "Name": "string", "Description": "string", "CreatedBy": "number", "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -6364,14 +6364,14 @@ } ], "example": { - "Id": "number (identifier)", + "Id": 0, "DomainId": "number", "Name": "string", "Description": "string", "CreatedBy": "number", "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -6559,18 +6559,18 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Number": "number", "DocumentId": "number", - "ModificationDate": "string (timestamp)", - "CreationDate": "string (timestamp)", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": "number", "CreatedBy": "number", "Remarks": "string", "FileId": "number", "DocumentOwnerContact": "number", "DocumentDescription": "string", - "DocumentStatusDate": "string (timestamp)", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", "DocumentFolder": "string", "DocumentKeywords": "string", "DocumentStatus": "string", @@ -6588,9 +6588,9 @@ "RejectedBy": "number", "IsApproved": true, "ApprovedBy": "number", - "ReviewedDate": "string (timestamp)", - "RejectedDate": "string (timestamp)", - "ApprovedDate": "string (timestamp)", + "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" } @@ -7052,20 +7052,20 @@ "examples": { "Siterra.Documents.App.DTO.DocumentDto": { "value": { - "Description": "String", + "Description": "string", "DomainId": 0, - "Filename": "String", + "Filename": "string", "Id": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String", - "NumberOfRevisions": "String", + "Name": "string", + "NumberOfRevisions": "string", "Revisions": [ { "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" } ], - "Suffix": "String", + "Suffix": "string", "Tags": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" @@ -7079,7 +7079,7 @@ "AutoCreate": true, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "Documents": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentDto" @@ -7090,8 +7090,8 @@ "LibraryTemplateId": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String", - "Number": "String", + "Name": "string", + "Number": "string", "ParentId": 0, "ParentTypeId": 0, "TypeId": 0 @@ -7106,9 +7106,9 @@ "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" }, - "DocumentDescription": "String", + "DocumentDescription": "string", "DocumentId": 0, - "DocumentName": "String", + "DocumentName": "string", "DomainId": 0, "Id": 0, "IsApproved": true, @@ -7124,34 +7124,34 @@ "Siterra.Documents.App.DTO.CategoryDto": { "value": { "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "DomainId": 0, "Id": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "Name": "String" + "Name": "string" } }, "Siterra.Documents.App.DTO.DocumentTagRelDto": { "value": { - "Name": "String" + "Name": "string" } }, "Siterra.Documents.BusinessLogic.Entities.Document.Document": { "value": { "CategoryId": 0, "CheckoutDate": "0001-01-01T00:00:00.0000000+00:00", - "CheckoutPath": "String", + "CheckoutPath": "string", "CheckoutUserId": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "DocumentClasses": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" } ], "DomainId": 0, - "FileClientPath": "String", + "FileClientPath": "string", "FileSized": 0, "Id": 0, "IsApproved": 0, @@ -7160,9 +7160,9 @@ "IsNa": 0, "IsRejected": 0, "IsReviewed": 0, - "Keywords": "String", + "Keywords": "string", "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", - "LastFileName": "String", + "LastFileName": "string", "LastRevisionFile": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" }, @@ -7174,15 +7174,15 @@ "LibraryId": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "NaDescription": "String", - "Name": "String", - "NaReason": "String", - "Number": "String", + "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", + "RejectedDescription": "string", + "RejectedReason": "string", + "ReviewDescription": "string", "Revisions": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" @@ -7203,7 +7203,7 @@ "SourceDocumentId": 0, "StatusDate": "0001-01-01T00:00:00.0000000+00:00", "StatusId": 0, - "Suffix": "String", + "Suffix": "string", "Tags": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" @@ -7255,7 +7255,7 @@ "ContractId": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -7280,8 +7280,8 @@ }, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String", - "Number": "String", + "Name": "string", + "Number": "string", "OrganizationUnitId": 0, "OwnerUserId": 0, "ParentFolderId": 0, @@ -7320,7 +7320,7 @@ "ClassId": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "DomainId": 0, "HasChanged": true, "Id": 0, @@ -7335,19 +7335,19 @@ ], "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String", + "Name": "string", "Number": 0, "ParentId": 0, "ParentLibraryTypes": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, - "XmlName": "String" + "XmlName": "string" } }, "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile": { "value": { - "ActualName": "String", - "ClientPath": "String", + "ActualName": "string", + "ClientPath": "string", "ContentTypeId": 0, "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", @@ -7363,8 +7363,8 @@ "Longitude": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String", - "Path": "String", + "Name": "string", + "Path": "string", "Sized": 0, "SmsId": 0, "SourceClassId": 0 @@ -7374,39 +7374,63 @@ "value": { "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "Description": "String", + "Description": "string", "DomainId": 0, "Id": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "ModifiedBy": 0, - "Name": "String" + "Name": "string" } }, "Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag": { "value": { + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "Description": "string", "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": { + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "Description": "string", "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": { + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "Description": "string", "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": { @@ -7418,16 +7442,16 @@ "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" }, - "DocumentDescription": "String", - "DocumentFolder": "String", + "DocumentDescription": "string", + "DocumentFolder": "string", "DocumentId": 0, - "DocumentKeywords": "String", - "DocumentName": "String", - "DocumentNumber": "String", + "DocumentKeywords": "string", + "DocumentName": "string", + "DocumentNumber": "string", "DocumentOwnerContact": 0, - "DocumentStatus": "String", + "DocumentStatus": "string", "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", - "DocumentType": "String", + "DocumentType": "string", "DomainId": 0, "FileId": 0, "Id": 0, @@ -7440,10 +7464,10 @@ "Number": 0, "RejectedBy": 0, "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", - "RejectedDescription": "String", - "RejectedReason": "String", - "Remarks": "String", - "ReviewDescription": "String", + "RejectedDescription": "string", + "RejectedReason": "string", + "Remarks": "string", + "ReviewDescription": "string", "ReviewedBy": 0, "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00" } From cd2b472d8b2476f874413f36c15579c0529afe4f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 15:41:05 -0500 Subject: [PATCH 046/103] chore: additional test file fixes Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.json | 226 +++++++++--------- 1 file changed, 113 insertions(+), 113 deletions(-) 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 e444760de..98196ac13 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 @@ -4734,9 +4734,9 @@ "Filename": "string", "NumberOfRevisions": "string", "Suffix": "string", - "DomainId": "number", + "DomainId": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": "number", + "ModifiedBy": 0, "Tags": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" @@ -4845,16 +4845,16 @@ "Name": "string", "Number": "string", "Description": "string", - "LibraryTemplateId": "number", - "ParentTypeId": "number", - "ParentId": "number", + "LibraryTemplateId": 0, + "ParentTypeId": 0, + "ParentId": 0, "AllowMultiple": true, "AutoCreate": true, - "TypeId": "number", - "DomainId": "number", - "CreatedBy": "number", + "TypeId": 0, + "DomainId": 0, + "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": "number", + "ModifiedBy": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { @@ -4974,22 +4974,22 @@ }, "example": { "Id": 0, - "Number": "number", - "DocumentId": "number", + "Number": 0, + "DocumentId": 0, "DocumentName": "string", "DocumentDescription": "string", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "CreatedBy": "number", + "CreatedBy": 0, "IsReviewed": true, - "ReviewedBy": "number", + "ReviewedBy": 0, "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", "IsApproved": true, - "ApprovedBy": "number", + "ApprovedBy": 0, "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", "IsRejected": true, - "RejectedBy": "number", + "RejectedBy": 0, "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", - "DomainId": "number", + "DomainId": 0, "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } @@ -5363,46 +5363,46 @@ "Id": 0, "Name": "string", "Description": "string", - "StatusId": "number", - "TypeId": "number", + "StatusId": 0, + "TypeId": 0, "Keywords": "string", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "CreatedBy": "number", + "CreatedBy": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": "number", - "DomainId": "number", - "LibraryId": "number", - "OwnerUserId": "number", + "ModifiedBy": 0, + "DomainId": 0, + "LibraryId": 0, + "OwnerUserId": 0, "StatusDate": "0001-01-01T00:00:00.0000000+00:00", - "LastRevisionId": "number", + "LastRevisionId": 0, "CheckoutDate": "0001-01-01T00:00:00.0000000+00:00", "CheckoutPath": "string", - "CheckoutUserId": "number", + "CheckoutUserId": 0, "Number": "string", "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", - "FileSized": "number", + "FileSized": 0, "FileClientPath": "string", - "LastRevisionFileId": "number", - "IsDeleted": "number", - "IsNa": "number", - "IsRejected": "number", - "IsReviewed": "number", + "LastRevisionFileId": 0, + "IsDeleted": 0, + "IsNa": 0, + "IsRejected": 0, + "IsReviewed": 0, "NaDescription": "string", "NaReason": "string", "RejectedDescription": "string", "RejectedReason": "string", "ReviewDescription": "string", - "SourceDocumentId": "number", - "ScraperMapId": "number", + "SourceDocumentId": 0, + "ScraperMapId": 0, "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", - "SmsId": "number", - "IsApprovedOld": "number", + "SmsId": 0, + "IsApprovedOld": 0, "Suffix": "string", - "ScrapeResultId": "number", - "IsApproved": "number", - "CategoryId": "number", - "SectionId": "number", - "VersionCount": "number", + "ScrapeResultId": 0, + "IsApproved": 0, + "CategoryId": 0, + "SectionId": 0, + "VersionCount": 0, "LastFileName": "string", "DocumentClasses": [ { @@ -5496,12 +5496,12 @@ } }, "example": { - "ClassInstance": "number", - "ClassId": "number", - "DocumentId": "number", - "CreatedBy": "number", + "ClassInstance": 0, + "ClassId": 0, + "DocumentId": 0, + "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": "number", + "ModifiedBy": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "IsPrimary": true, "Document": { @@ -5579,11 +5579,11 @@ } }, "example": { - "DocumentId": "number", - "TagId": "number", - "DomainId": "number", - "CreatedBy": "number", - "ModifiedBy": "number", + "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": { @@ -5874,42 +5874,42 @@ }, "example": { "Id": 0, - "DomainId": "number", + "DomainId": 0, "Name": "string", - "ParentFolderId": "number", + "ParentFolderId": 0, "Number": "string", - "TypeId": "number", - "OwnerUserId": "number", - "TotalSize": "number", - "FilesCounter": "number", - "FoldersCounter": "number", + "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": "number", - "CreatedBy": "number", - "ProjectId": "number", - "SearchRingId": "number", - "SiteId": "number", - "AssetId": "number", + "ModifiedBy": 0, + "CreatedBy": 0, + "ProjectId": 0, + "SearchRingId": 0, + "SiteId": 0, + "AssetId": 0, "AllowMultiple": true, "AutoCreate": true, "Description": "string", "IsTemplate": true, - "ProgramId": "number", - "SourceFolderId": "number", - "TemplateClassId": "number", - "TemplateSubType": "number", + "ProgramId": 0, + "SourceFolderId": 0, + "TemplateClassId": 0, + "TemplateSubType": 0, "IsHidden": true, - "IsDeleted": "number", - "StatusId": "number", - "SmsId": "number", - "ContractId": "number", - "VendorId": "number", - "OrganizationUnitId": "number", - "IncidentId": "number", - "EventId": "number", - "ClassInstance": "number", - "ClassId": "number", + "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" }, @@ -6059,17 +6059,17 @@ "example": { "Id": 0, "Name": "string", - "ModifiedBy": "number", - "CreatedBy": "number", + "ModifiedBy": 0, + "CreatedBy": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "DomainId": "number", + "DomainId": 0, "Description": "string", "XmlName": "string", "MasterId": "number", - "Number": "number", - "ClassId": "number", - "ParentId": "number", + "Number": 0, + "ClassId": 0, + "ParentId": 0, "HasChanged": true, "MasterLibraryType": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" @@ -6196,20 +6196,20 @@ "Id": 0, "Name": "string", "Path": "string", - "ModifiedBy": "number", - "CreatedBy": "number", + "ModifiedBy": 0, + "CreatedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", - "Sized": "number", + "Sized": 0, "ActualName": "string", - "DomainId": "number", - "SourceClassId": "number", - "ContentTypeId": "number", + "DomainId": 0, + "SourceClassId": 0, + "ContentTypeId": 0, "ClientPath": "string", - "IsSelfHosted": "number", - "SmsId": "number", - "Latitude": "number", - "Longitude": "number", + "IsSelfHosted": 0, + "SmsId": 0, + "Latitude": 0, + "Longitude": 0, "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -6295,11 +6295,11 @@ ], "example": { "Id": 0, - "DomainId": "number", + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", + "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ @@ -6330,11 +6330,11 @@ ], "example": { "Id": 0, - "DomainId": "number", + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", + "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ @@ -6365,11 +6365,11 @@ ], "example": { "Id": 0, - "DomainId": "number", + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", + "CreatedBy": 0, + "ModifiedBy": 0, "CreationDate": "0001-01-01T00:00:00.0000000+00:00", "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ @@ -6560,15 +6560,15 @@ }, "example": { "Id": 0, - "Number": "number", - "DocumentId": "number", + "Number": 0, + "DocumentId": 0, "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "CreationDate": "0001-01-01T00:00:00.0000000+00:00", - "ModifiedBy": "number", - "CreatedBy": "number", + "ModifiedBy": 0, + "CreatedBy": 0, "Remarks": "string", - "FileId": "number", - "DocumentOwnerContact": "number", + "FileId": 0, + "DocumentOwnerContact": 0, "DocumentDescription": "string", "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", "DocumentFolder": "string", @@ -6577,17 +6577,17 @@ "DocumentType": "string", "DocumentName": "string", "DocumentNumber": "string", - "DomainId": "number", - "IsDeleted": "number", + "DomainId": 0, + "IsDeleted": 0, "IsReviewed": true, "ReviewDescription": "string", - "ReviewedBy": "number", + "ReviewedBy": 0, "IsRejected": true, "RejectedReason": "string", "RejectedDescription": "string", - "RejectedBy": "number", + "RejectedBy": 0, "IsApproved": true, - "ApprovedBy": "number", + "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", From 878c82106b065305ec69941eae2e025aeece5d02 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 15:57:04 -0500 Subject: [PATCH 047/103] chore: linting Signed-off-by: Vincent Biret --- .../Operation/DollarCountGetOperationHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index e021ac1d3..b50ee52f6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -49,12 +49,12 @@ protected override void Initialize(ODataContext context, ODataPath path) base.Initialize(context, path); // Get the first segment - firstSegment = path.Segments.First(); + firstSegment = path.Segments[0]; // get the last second segment pathCount = path.Segments.Count; if(pathCount >= SecondLastSegmentIndex) - SecondLastSegment = path.Segments.ElementAt(pathCount - SecondLastSegmentIndex); + SecondLastSegment = path.Segments[pathCount - SecondLastSegmentIndex]; if (SecondLastSegment is ODataNavigationSourceSegment sourceSegment) { @@ -80,7 +80,7 @@ protected override void SetTags(OpenApiOperation operation) } else if (SecondLastSegment is ODataTypeCastSegment) { - ODataSegment lastThirdSegment = Path.Segments.ElementAt(pathCount - 3); + ODataSegment lastThirdSegment = Path.Segments[pathCount - 3]; if (lastThirdSegment is ODataNavigationSourceSegment sourceSegment2) { tagName = TagNameFromNavigationSourceSegment(sourceSegment2); From 340ffb5e378b45c3863323b97938136c14a89234 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 16:10:36 -0500 Subject: [PATCH 048/103] fix: missing example type Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 98196ac13..5d1becb59 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 @@ -6066,7 +6066,7 @@ "DomainId": 0, "Description": "string", "XmlName": "string", - "MasterId": "number", + "MasterId": 0, "Number": 0, "ClassId": 0, "ParentId": 0, From 9423b95650f398f6afab64a7adbdfd8a08f72510 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jan 2025 16:12:26 -0500 Subject: [PATCH 049/103] fix: missing query parameters for $count operations Signed-off-by: Vincent Biret --- .../Operation/DollarCountGetOperationHandler.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index b50ee52f6..e66829a53 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -170,20 +170,15 @@ protected override void SetParameters(OpenApiOperation operation) { base.SetParameters(operation); - if (annotatable == null) - { - return; - } - OpenApiParameter parameter; - parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(annotatable, _document); + parameter = Context.CreateSearch(TargetPath, _document) ?? (annotatable is null ? null : Context.CreateSearch(annotatable, _document)); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(annotatable, _document); + parameter = Context.CreateFilter(TargetPath, _document) ?? (annotatable is null ? null : Context.CreateFilter(annotatable, _document)); if (parameter != null) { operation.Parameters.Add(parameter); From b60c41ff043b4802c8d8db68c166dd08b63c613f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 09:11:18 -0500 Subject: [PATCH 050/103] chore: linting Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.OData.Reader/Edm/ODataTypeCastSegment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataTypeCastSegment.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataTypeCastSegment.cs index 6a7e660e1..47da7fd4f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataTypeCastSegment.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataTypeCastSegment.cs @@ -43,7 +43,7 @@ public ODataTypeCastSegment(IEdmStructuredType structuredType, IEdmModel model) /// public override IEnumerable GetAnnotables() { - return new IEdmVocabularyAnnotatable[] { StructuredType as IEdmVocabularyAnnotatable }; + return [StructuredType as IEdmVocabularyAnnotatable]; } /// From c85928f362cfaf7f0cb6dcec00ba66d9decfc1ae Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 09:56:32 -0500 Subject: [PATCH 051/103] fix: updates trip service test file Signed-off-by: Vincent Biret --- .../Resources/TripService.OpenApi.json | 1898 +++++++---------- 1 file changed, 764 insertions(+), 1134 deletions(-) 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 6b0d7767e..bfb2c06cd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -4455,20 +4455,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.AddressInfo.GetCount-8488", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -4531,20 +4517,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-9375", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -4945,20 +4917,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -5021,20 +4979,6 @@ "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -5717,20 +5661,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -5815,20 +5745,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -7042,20 +6958,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -7140,20 +7042,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -8904,20 +8792,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsManager.AddressInfo.GetCount-75da", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -8980,20 +8854,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-f67e", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -9394,20 +9254,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -9470,20 +9316,6 @@ "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e", "parameters": [ - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -10147,20 +9979,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -10245,20 +10063,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -14489,20 +14293,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -14573,20 +14363,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -15074,20 +14850,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -15172,20 +14934,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -16039,20 +15787,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -16143,20 +15877,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -22475,20 +22195,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -22573,20 +22279,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -23085,20 +22777,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -23183,20 +22861,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -24017,20 +23681,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -24135,20 +23785,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -25588,20 +25224,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -25706,20 +25328,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -27804,20 +27412,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -27902,20 +27496,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -28414,20 +27994,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -28512,20 +28078,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -29327,20 +28879,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -29445,20 +28983,6 @@ }, "x-ms-docs-key-type": "Person" }, - { - "name": "ConsistencyLevel", - "in": "header", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "schema": { - "type": "string" - }, - "examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/components/parameters/search" }, @@ -34292,323 +33816,658 @@ }, "components": { "schemas": { - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { - "title": "Person", + "Edm.Geography": { + "$ref": "#/components/schemas/Edm.Geometry" + }, + "Edm.GeographyPoint": { + "$ref": "#/components/schemas/Edm.GeometryPoint" + }, + "Edm.GeographyLineString": { + "$ref": "#/components/schemas/Edm.GeometryLineString" + }, + "Edm.GeographyPolygon": { + "$ref": "#/components/schemas/Edm.GeometryPolygon" + }, + "Edm.GeographyMultiPoint": { + "$ref": "#/components/schemas/Edm.GeometryMultiPoint" + }, + "Edm.GeographyMultiLineString": { + "$ref": "#/components/schemas/Edm.GeometryMultiLineString" + }, + "Edm.GeographyMultiPolygon": { + "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" + }, + "Edm.GeographyCollection": { + "$ref": "#/components/schemas/Edm.GeometryCollection" + }, + "Edm.Geometry": { "type": "object", - "properties": { - "UserName": { - "type": "string" - }, - "FirstName": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/Edm.GeometryPoint" }, - "LastName": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/Edm.GeometryLineString" }, - "MiddleName": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/Edm.GeometryPolygon" }, - "Gender": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + { + "$ref": "#/components/schemas/Edm.GeometryMultiPoint" }, - "Age": { - "oneOf": [ - { - "type": "number", - "format": "int64", - "nullable": true - }, - { - "type": "string", - "nullable": true - } - ] + { + "$ref": "#/components/schemas/Edm.GeometryMultiLineString" }, - "Emails": { - "type": "array", - "items": { - "type": "string", - "nullable": true - } + { + "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" }, - "AddressInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" - } + { + "$ref": "#/components/schemas/Edm.GeometryCollection" + } + ] + }, + "Edm.GeometryPoint": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "Point" + ], + "type": "string", + "default": "Point" }, - "HomeAddress": { - "anyOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" - }, - { - "type": "object", - "nullable": true - } + "coordinates": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + }, + "Edm.GeometryLineString": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "LineString" ] }, - "FavoriteFeature": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" - }, - "Features": { + "coordinates": { + "minItems": 2, "type": "array", "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + "$ref": "#/components/schemas/GeoJSON.position" } + } + } + }, + "Edm.GeometryPolygon": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "Polygon" + ] }, - "Photo": { - "type": "string", - "format": "base64url", - "nullable": true - }, - "Friends": { + "coordinates": { + "minItems": 4, "type": "array", "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "description": "Friends of person", - "x-ms-navigationProperty": true - }, - "BestFriend": { - "anyOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - { - "type": "object", - "nullable": true + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" } - ], - "description": "The best friend.", - "x-ms-navigationProperty": true - }, - "Trips": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" - }, - "description": "Collection of trips.", - "x-ms-navigationProperty": true + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { - "title": "Airline", + "Edm.GeometryMultiPoint": { + "required": [ + "type", + "coordinates" + ], "type": "object", "properties": { - "AirlineCode": { - "type": "string" + "type": { + "enum": [ + "MultiPoint" + ] }, - "Name": { - "type": "string", - "nullable": true + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { - "title": "Airport", + "Edm.GeometryMultiLineString": { + "required": [ + "type", + "coordinates" + ], "type": "object", "properties": { - "Name": { - "type": "string", - "nullable": true - }, - "IcaoCode": { - "type": "string" - }, - "IataCode": { - "type": "string", - "nullable": true + "type": { + "enum": [ + "MultiLineString" + ] }, - "Location": { - "anyOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" - }, - { - "type": "object", - "nullable": true + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" } - ] + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { - "title": "Location", + "Edm.GeometryMultiPolygon": { + "required": [ + "type", + "coordinates" + ], "type": "object", "properties": { - "Address": { - "type": "string", - "nullable": true + "type": { + "enum": [ + "MultiPolygon" + ] }, - "City": { - "anyOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" - }, - { - "type": "object", - "nullable": true + "coordinates": { + "minItems": 4, + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } } - ] + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { - "title": "City", + "Edm.GeometryCollection": { + "required": [ + "type", + "coordinates" + ], "type": "object", "properties": { - "Name": { - "type": "string", - "nullable": true - }, - "CountryRegion": { - "type": "string", - "nullable": true + "type": { + "enum": [ + "GeometryCollection" + ] }, - "Region": { - "type": "string", - "nullable": true - } + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edm.Geometry" + } + } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { - "allOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + "GeoJSON.position": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError": { + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" }, - { - "title": "AirportLocation", - "type": "object", - "properties": { - "Loc": { - "$ref": "#/components/schemas/Edm.GeographyPoint" - }, - "EmergencyAuthority": { - "anyOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - { - "type": "object", - "nullable": true - } - ], - "description": "The person to contact in case of a crisis at this location.", - "x-ms-navigationProperty": true - } + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": "string", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails" } + }, + "innerError": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError" } - ] + } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { - "allOf": [ - { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" }, - { - "title": "EventLocation", - "type": "object", - "properties": { - "BuildingInfo": { - "type": "string", - "nullable": true - } + "message": { + "type": "string" + }, + "target": { + "type": "string", + "nullable": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError": { + "title": "InnerError", + "type": "object", + "properties": { + "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", + "format": "date-time", + "nullable": true + }, + "RequestId": { + "type": "string", + "nullable": true + } + } + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "StringCollectionResponse": { + "title": "Collection of string", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" } } - ] + } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { - "title": "Trip", + "ReferenceUpdate": { "type": "object", "properties": { - "TripId": { - "maximum": 2147483647, - "minimum": -2147483648, - "type": "number", - "format": "int32" + "@odata.id": { + "type": "string" }, - "ShareId": { - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "@odata.type": { "type": "string", - "format": "uuid" + "nullable": true + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": "string", + "nullable": true + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { + "title": "Person", + "type": "object", + "properties": { + "UserName": { + "type": "string" }, - "Name": { + "FirstName": { + "type": "string" + }, + "LastName": { "type": "string", "nullable": true }, - "Budget": { + "MiddleName": { + "type": "string", + "nullable": true + }, + "Gender": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": { "oneOf": [ { "type": "number", - "format": "float", + "format": "int64", "nullable": true }, { "type": "string", "nullable": true - }, - { - "$ref": "#/components/schemas/ReferenceNumeric" } ] }, - "Description": { - "type": "string", - "nullable": true - }, - "Tags": { + "Emails": { "type": "array", "items": { "type": "string", "nullable": true } }, - "TripData": { }, - "DestinationInfo": { + "AddressInfo": { "type": "array", - "items": { } + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } }, - "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])$", - "type": "string", - "format": "date-time" + "HomeAddress": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "type": "object", + "nullable": true + } + ] }, - "EndsAt": { - "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", - "format": "date-time" + "FavoriteFeature": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" }, - "PlanItems": { + "Features": { "type": "array", "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" - }, - "x-ms-navigationProperty": true - } - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { - "title": "PlanItem", - "type": "object", - "properties": { - "PlanItemId": { - "maximum": 2147483647, - "minimum": -2147483648, - "type": "number", - "format": "int32" + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } }, - "ConfirmationCode": { + "Photo": { "type": "string", + "format": "base64url", "nullable": true }, - "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])$", - "type": "string", - "format": "date-time" + "Friends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "description": "Friends of person", + "x-ms-navigationProperty": true + }, + "BestFriend": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": "object", + "nullable": true + } + ], + "description": "The best friend.", + "x-ms-navigationProperty": true + }, + "Trips": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + }, + "description": "Collection of trips.", + "x-ms-navigationProperty": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { + "title": "Airline", + "type": "object", + "properties": { + "AirlineCode": { + "type": "string" + }, + "Name": { + "type": "string", + "nullable": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { + "title": "Airport", + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "IcaoCode": { + "type": "string" + }, + "IataCode": { + "type": "string", + "nullable": true + }, + "Location": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + }, + { + "type": "object", + "nullable": true + } + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { + "title": "Location", + "type": "object", + "properties": { + "Address": { + "type": "string", + "nullable": true + }, + "City": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + { + "type": "object", + "nullable": true + } + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { + "title": "City", + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "CountryRegion": { + "type": "string", + "nullable": true + }, + "Region": { + "type": "string", + "nullable": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "title": "AirportLocation", + "type": "object", + "properties": { + "Loc": { + "$ref": "#/components/schemas/Edm.GeographyPoint" + }, + "EmergencyAuthority": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": "object", + "nullable": true + } + ], + "description": "The person to contact in case of a crisis at this location.", + "x-ms-navigationProperty": true + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "title": "EventLocation", + "type": "object", + "properties": { + "BuildingInfo": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { + "title": "Trip", + "type": "object", + "properties": { + "TripId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ShareId": { + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "type": "string", + "format": "uuid" + }, + "Name": { + "type": "string", + "nullable": true + }, + "Budget": { + "oneOf": [ + { + "type": "number", + "format": "float", + "nullable": true + }, + { + "type": "string", + "nullable": true + }, + { + "$ref": "#/components/schemas/ReferenceNumeric" + } + ] + }, + "Description": { + "type": "string", + "nullable": true + }, + "Tags": { + "type": "array", + "items": { + "type": "string", + "nullable": true + } + }, + "TripData": { }, + "DestinationInfo": { + "type": "array", + "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])$", + "type": "string", + "format": "date-time" + }, + "EndsAt": { + "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", + "format": "date-time" + }, + "PlanItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + }, + "x-ms-navigationProperty": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { + "title": "PlanItem", + "type": "object", + "properties": { + "PlanItemId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ConfirmationCode": { + "type": "string", + "nullable": true + }, + "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])$", + "type": "string", + "format": "date-time" }, "EndsAt": { "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])$", @@ -34789,349 +34648,58 @@ "DirectReports": { "type": "array", "items": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "x-ms-navigationProperty": true - } - } - } - ] - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { - "title": "PersonGender", - "enum": [ - "Male", - "Female", - "Unknow" - ], - "type": "string", - "description": "Gender of the person.", - "x-ms-enum": { - "name": "PersonGender", - "modelAsString": false, - "values": [ - { - "value": "Male", - "description": "The Male gender.", - "name": "Male" - }, - { - "value": "Female", - "description": "The Female gender.", - "name": "Female" - }, - { - "value": "Unknow", - "description": "Unknown gender or prefers not to say.", - "name": "Unknow" - } - ] - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature": { - "title": "Feature", - "enum": [ - "Feature1", - "Feature2", - "Feature3", - "Feature4" - ], - "type": "string", - "x-ms-enum-flags": { - "isFlags": true - } - }, - "Edm.Geography": { - "$ref": "#/components/schemas/Edm.Geometry" - }, - "Edm.GeographyPoint": { - "$ref": "#/components/schemas/Edm.GeometryPoint" - }, - "Edm.GeographyLineString": { - "$ref": "#/components/schemas/Edm.GeometryLineString" - }, - "Edm.GeographyPolygon": { - "$ref": "#/components/schemas/Edm.GeometryPolygon" - }, - "Edm.GeographyMultiPoint": { - "$ref": "#/components/schemas/Edm.GeometryMultiPoint" - }, - "Edm.GeographyMultiLineString": { - "$ref": "#/components/schemas/Edm.GeometryMultiLineString" - }, - "Edm.GeographyMultiPolygon": { - "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" - }, - "Edm.GeographyCollection": { - "$ref": "#/components/schemas/Edm.GeometryCollection" - }, - "Edm.Geometry": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/Edm.GeometryPoint" - }, - { - "$ref": "#/components/schemas/Edm.GeometryLineString" - }, - { - "$ref": "#/components/schemas/Edm.GeometryPolygon" - }, - { - "$ref": "#/components/schemas/Edm.GeometryMultiPoint" - }, - { - "$ref": "#/components/schemas/Edm.GeometryMultiLineString" - }, - { - "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" - }, - { - "$ref": "#/components/schemas/Edm.GeometryCollection" - } - ] - }, - "Edm.GeometryPoint": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "Point" - ], - "type": "string", - "default": "Point" - }, - "coordinates": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - }, - "Edm.GeometryLineString": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "LineString" - ] - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - } - }, - "Edm.GeometryPolygon": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "Polygon" - ] - }, - "coordinates": { - "minItems": 4, - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - } - } - }, - "Edm.GeometryMultiPoint": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiPoint" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - } - }, - "Edm.GeometryMultiLineString": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiLineString" - ] - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - } - } - }, - "Edm.GeometryMultiPolygon": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiPolygon" - ] - }, - "coordinates": { - "minItems": 4, - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJSON.position" - } - } - } - } - } - }, - "Edm.GeometryCollection": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "GeometryCollection" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edm.Geometry" - } - } - } - }, - "GeoJSON.position": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError": { - "required": [ - "error" - ], - "type": "object", - "properties": { - "error": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError" - } - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.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/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails" + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true + } } - }, - "innerError": { - "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError" } - } + ] }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails": { - "required": [ - "code", - "message" + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { + "title": "PersonGender", + "enum": [ + "Male", + "Female", + "Unknow" ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string", - "nullable": true - } + "type": "string", + "description": "Gender of the person.", + "x-ms-enum": { + "name": "PersonGender", + "modelAsString": false, + "values": [ + { + "value": "Male", + "description": "The Male gender.", + "name": "Male" + }, + { + "value": "Female", + "description": "The Female gender.", + "name": "Female" + }, + { + "value": "Unknow", + "description": "Unknown gender or prefers not to say.", + "name": "Unknow" + } + ] } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError": { - "title": "InnerError", - "type": "object", - "properties": { - "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", - "format": "date-time", - "nullable": true - }, - "RequestId": { - "type": "string", - "nullable": true - } + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature": { + "title": "Feature", + "enum": [ + "Feature1", + "Feature2", + "Feature3", + "Feature4" + ], + "type": "string", + "x-ms-enum-flags": { + "isFlags": true } }, - "ODataCountResponse": { - "type": "number", - "format": "int64" - }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { "title": "Collection of Person", "type": "object", @@ -35263,50 +34831,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": { @@ -35584,23 +35108,30 @@ "Microsoft.OData.Service.Sample.TrippinInMemory.Models.InnerError": { "value": { "Date": "0001-01-01T00:00:00.0000000+00:00", - "RequestId": "String" + "RequestId": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { "value": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], "AddressInfo": [ { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" } ], - "Age": 0, - "BestFriend": { - "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + "HomeAddress": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, - "Emails": [ - "String" - ], "FavoriteFeature": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" }, @@ -35609,48 +35140,41 @@ "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" } ], - "FirstName": "String", + "Photo": "string", "Friends": [ { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" } ], - "Gender": { - "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" - }, - "HomeAddress": { - "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, - "LastName": "String", - "MiddleName": "String", - "Photo": "Stream", "Trips": [ { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" } - ], - "UserName": "String (identifier)" + ] } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { "value": { - "AirlineCode": "String (identifier)", - "Name": "String" + "AirlineCode": "string (identifier)", + "Name": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { "value": { - "IataCode": "String", - "IcaoCode": "String (identifier)", + "Name": "string", + "IcaoCode": "string (identifier)", + "IataCode": "string", "Location": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" - }, - "Name": "String" + } } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { "value": { - "Address": "String", + "Address": "string", "City": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" } @@ -35658,75 +35182,99 @@ }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { "value": { - "CountryRegion": "String", - "Name": "String", - "Region": "String" + "Name": "string", + "CountryRegion": "string", + "Region": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { "value": { + "Address": "string", + "City": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + "Loc": "Edm.GeographyPoint", "EmergencyAuthority": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "Loc": "GeographyPoint" + } } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { "value": { - "BuildingInfo": "String" + "Address": "string", + "City": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + "BuildingInfo": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { "value": { + "TripId": 0, + "ShareId": "00000000-0000-0000-0000-000000000000", + "Name": "string", "Budget": 0, - "Description": "String", + "Description": "string", + "Tags": [ + "string" + ], + "TripData": { }, "DestinationInfo": [ { } ], + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", "EndsAt": "0001-01-01T00:00:00.0000000+00:00", - "Name": "String", "PlanItems": [ { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" } - ], - "ShareId": "00000000-0000-0000-0000-000000000000", - "StartsAt": "0001-01-01T00:00:00.0000000+00:00", - "Tags": [ - "String" - ], - "TripData": { }, - "TripId": 0 + ] } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { "value": { - "ConfirmationCode": "String", - "Duration": "Duration", - "EndsAt": "0001-01-01T00:00:00.0000000+00:00", "PlanItemId": 0, - "StartsAt": "0001-01-01T00:00:00.0000000+00:00" + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": { "value": { - "Description": "String", + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", "OccursAt": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" - } + }, + "Description": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": { "value": { - "SeatNumber": "String" + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", + "SeatNumber": "string" } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": { "value": { + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", + "SeatNumber": "string", + "FlightNumber": "string", "Airline": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" }, - "FlightNumber": "String", "From": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, @@ -35737,6 +35285,47 @@ }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { "value": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], + "AddressInfo": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + ], + "HomeAddress": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "FavoriteFeature": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + ], + "Photo": "string", + "Friends": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ], + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + ], "Cost": 0, "Peers": [ { @@ -35747,10 +35336,51 @@ }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { "value": { - "BossOffice": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], + "AddressInfo": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + ], + "HomeAddress": { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, + "FavoriteFeature": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + ], + "Photo": "string", + "Friends": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ], + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + ], "Budget": 0, + "BossOffice": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, "DirectReports": [ { "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" From 3b6a1580062dd0746cafb738e8b644ba191fb505 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 09:56:58 -0500 Subject: [PATCH 052/103] fix: adds missing custom parameters for count subsegments Signed-off-by: Vincent Biret --- .../DollarCountGetOperationHandler.cs | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index e66829a53..43d8d8407 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System; +using System.Collections.Generic; using System.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Vocabularies; @@ -41,7 +42,7 @@ public DollarCountGetOperationHandler(OpenApiDocument document) : base(document) private ODataSegment firstSegment; private int pathCount; private const int SecondLastSegmentIndex = 2; - private IEdmVocabularyAnnotatable annotatable; + private readonly List annotatables = []; /// protected override void Initialize(ODataContext context, ODataPath path) @@ -56,13 +57,25 @@ protected override void Initialize(ODataContext context, ODataPath path) if(pathCount >= SecondLastSegmentIndex) SecondLastSegment = path.Segments[pathCount - SecondLastSegmentIndex]; - if (SecondLastSegment is ODataNavigationSourceSegment sourceSegment) + AddODataSegmentToAnnotables(SecondLastSegment, path.Segments.Count > SecondLastSegmentIndex ? path.Segments.SkipLast(SecondLastSegmentIndex).ToArray() : []); + } + private void AddODataSegmentToAnnotables(ODataSegment oDataSegment, ODataSegment[] oDataSegments) + { + if (oDataSegment is ODataNavigationSourceSegment sourceSegment) + { + annotatables.Add(sourceSegment.NavigationSource as IEdmEntitySet); + } + else if (oDataSegment is ODataNavigationPropertySegment navigationPropertySegment) { - annotatable = sourceSegment.NavigationSource as IEdmEntitySet; + annotatables.Add(navigationPropertySegment.NavigationProperty); } - else if (SecondLastSegment is ODataNavigationPropertySegment navigationPropertySegment) + else if (oDataSegment is ODataTypeCastSegment odataTypeCastSegment) { - annotatable = navigationPropertySegment.NavigationProperty; + annotatables.Add(odataTypeCastSegment.StructuredType as IEdmVocabularyAnnotatable); + if (annotatables.Count == 1 && oDataSegments.Length > 0) + {// we want to look at the parent navigation property or entity set + AddODataSegmentToAnnotables(oDataSegments[oDataSegments.Length - 1], oDataSegments.SkipLast(1).ToArray()); + } } } @@ -172,13 +185,13 @@ protected override void SetParameters(OpenApiOperation operation) OpenApiParameter parameter; - parameter = Context.CreateSearch(TargetPath, _document) ?? (annotatable is null ? null : Context.CreateSearch(annotatable, _document)); + parameter = Context.CreateSearch(TargetPath, _document) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateSearch(x, _document)).FirstOrDefault(static x => x is not null)); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath, _document) ?? (annotatable is null ? null : Context.CreateFilter(annotatable, _document)); + parameter = Context.CreateFilter(TargetPath, _document) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateFilter(x, _document)).FirstOrDefault(static x => x is not null)); if (parameter != null) { operation.Parameters.Add(parameter); @@ -187,15 +200,13 @@ protected override void SetParameters(OpenApiOperation operation) protected override void AppendCustomParameters(OpenApiOperation operation) { - if (annotatable == null) + ReadRestrictionsType readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); + if (annotatables.Count > 0) { - return; + ReadRestrictionsType annotatableReadRestrictions = annotatables.Select(x => Context.Model.GetRecord(x, CapabilitiesConstants.ReadRestrictions)).FirstOrDefault(static x => x is not null); + readRestrictions?.MergePropertiesIfNull(annotatableReadRestrictions); + readRestrictions ??= annotatableReadRestrictions; } - - ReadRestrictionsType readRestrictions = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.ReadRestrictions); - ReadRestrictionsType annotatableReadRestrictions = Context.Model.GetRecord(annotatable, CapabilitiesConstants.ReadRestrictions); - readRestrictions?.MergePropertiesIfNull(annotatableReadRestrictions); - readRestrictions ??= annotatableReadRestrictions; if (readRestrictions == null) { From 44c95bf59cf154133f189e4f31e0cbd001ee832b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:38:19 -0500 Subject: [PATCH 053/103] fix: minor adjustments to basic v2 json sample Signed-off-by: Vincent Biret --- .../Resources/Basic.OpenApi.V2.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json index b904fcecd..2eb08cef5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json @@ -981,7 +981,7 @@ } }, "example": { - "Id": "number", + "Id": 0, "City": { "@odata.type": "DefaultNs.City" } @@ -1003,7 +1003,7 @@ } ], "example": { - "Id": "number", + "Id": 0, "City": { "@odata.type": "DefaultNs.City" }, @@ -1074,8 +1074,8 @@ "type": "object" }, "ODataCountResponse": { - "format": "int32", - "type": "integer" + "format": "int64", + "type": "number" }, "DefaultNs.PersonCollectionResponse": { "title": "Collection of Person", @@ -1161,14 +1161,16 @@ "in": "query", "name": "$top", "description": "Show only the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "skip": { "in": "query", "name": "$skip", "description": "Skip the first n items", - "type": "integer", + "type": "number", + "format": "int64", "minimum": 0 }, "count": { From e3b773e63a1993443f6f9d2f3b3bb7c65edf0dc6 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:41:40 -0500 Subject: [PATCH 054/103] fix: minor ordering changes in sample Signed-off-by: Vincent Biret --- .../Resources/Empty.OpenApi.V2.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 a79a8c508..df22b9f6a 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 @@ -9,17 +9,17 @@ schemes: paths: { } definitions: ODataErrors.ODataError: + type: object required: - error - type: object properties: error: $ref: '#/definitions/ODataErrors.MainError' ODataErrors.MainError: + type: object required: - code - message - type: object properties: code: type: string @@ -35,10 +35,10 @@ definitions: innerError: $ref: '#/definitions/ODataErrors.InnerError' ODataErrors.ErrorDetails: + type: object required: - code - message - type: object properties: code: type: string @@ -47,11 +47,11 @@ definitions: target: type: string ODataErrors.InnerError: - description: The structure of this object is service-specific type: object + description: The structure of this object is service-specific ODataCountResponse: - format: int64 type: number + format: int64 ReferenceUpdate: type: object properties: @@ -67,11 +67,11 @@ definitions: additionalProperties: type: object ReferenceNumeric: + type: string enum: - '-INF' - INF - NaN - type: string parameters: top: in: query From 1bdd49cd2089785491dabfc60ae475a08435726d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:45:19 -0500 Subject: [PATCH 055/103] fix: minor adjustments to basic v2 yaml sample Signed-off-by: Vincent Biret --- .../Resources/Basic.OpenApi.V2.yaml | 198 +++++++++--------- 1 file changed, 100 insertions(+), 98 deletions(-) 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 272fd865a..430082f1c 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 @@ -24,26 +24,26 @@ paths: description: Order items by property values type: array items: + type: string enum: - Name - Name desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/DefaultNs.CityCollectionResponse' @@ -94,17 +94,17 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': description: Retrieved entity @@ -194,26 +194,26 @@ paths: description: Order items by property values type: array items: + type: string enum: - Name - Name desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/DefaultNs.CountryOrRegionCollectionResponse' @@ -264,17 +264,17 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': description: Retrieved entity @@ -361,20 +361,20 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - UserName - HomeAddress - WorkAddress - Addresses - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': description: Retrieved entity @@ -422,6 +422,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - UserName - UserName desc @@ -431,26 +432,25 @@ paths: - WorkAddress desc - Addresses - Addresses desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - UserName - HomeAddress - WorkAddress - Addresses - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/DefaultNs.PersonCollectionResponse' @@ -501,20 +501,20 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - UserName - HomeAddress - WorkAddress - Addresses - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': description: Retrieved entity @@ -588,16 +588,80 @@ paths: $ref: '#/responses/error' x-description: Provides operations to count the resources in the collection. definitions: + DefaultNs.ODataErrors.ODataError: + type: object + required: + - error + properties: + error: + $ref: '#/definitions/DefaultNs.ODataErrors.MainError' + DefaultNs.ODataErrors.MainError: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: string + details: + type: array + items: + $ref: '#/definitions/DefaultNs.ODataErrors.ErrorDetails' + innerError: + $ref: '#/definitions/DefaultNs.ODataErrors.InnerError' + DefaultNs.ODataErrors.ErrorDetails: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + target: + type: string + DefaultNs.ODataErrors.InnerError: + type: object + description: The structure of this object is service-specific + ODataCountResponse: + type: number + format: int64 + ReferenceUpdate: + type: object + properties: + '@odata.id': + type: string + '@odata.type': + type: string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + type: string + enum: + - '-INF' + - INF + - NaN DefaultNs.Color: - title: Color + type: string description: Enum type 'Color' description. + title: Color enum: - Blue - White - type: string DefaultNs.Person: - title: Person type: object + title: Person properties: UserName: type: string @@ -618,158 +682,96 @@ definitions: Addresses: - '@odata.type': DefaultNs.Address DefaultNs.City: - title: City type: object + title: City properties: Name: type: string example: Name: string (identifier) DefaultNs.CountryOrRegion: - title: CountryOrRegion type: object + title: CountryOrRegion properties: Name: type: string example: Name: string (identifier) DefaultNs.Address: - title: Address type: object + title: Address properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number City: $ref: '#/definitions/DefaultNs.City' example: - Id: number + Id: 0 City: '@odata.type': DefaultNs.City DefaultNs.WorkAddress: allOf: - $ref: '#/definitions/DefaultNs.Address' - - title: WorkAddress - type: object + - type: object + title: WorkAddress properties: CountryOrRegion: $ref: '#/definitions/DefaultNs.CountryOrRegion' example: - Id: number + Id: 0 City: '@odata.type': DefaultNs.City CountryOrRegion: '@odata.type': DefaultNs.CountryOrRegion - DefaultNs.ODataErrors.ODataError: - required: - - error - type: object - properties: - error: - $ref: '#/definitions/DefaultNs.ODataErrors.MainError' - DefaultNs.ODataErrors.MainError: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - x-ms-primary-error-message: true - target: - type: string - details: - type: array - items: - $ref: '#/definitions/DefaultNs.ODataErrors.ErrorDetails' - innerError: - $ref: '#/definitions/DefaultNs.ODataErrors.InnerError' - DefaultNs.ODataErrors.ErrorDetails: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - target: - type: string - DefaultNs.ODataErrors.InnerError: - description: The structure of this object is service-specific - type: object - ODataCountResponse: - format: int32 - type: integer DefaultNs.PersonCollectionResponse: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array items: $ref: '#/definitions/DefaultNs.Person' DefaultNs.CityCollectionResponse: - title: Collection of City type: object + title: Collection of City properties: value: type: array items: $ref: '#/definitions/DefaultNs.City' DefaultNs.CountryOrRegionCollectionResponse: - title: Collection of CountryOrRegion type: object + title: Collection of CountryOrRegion properties: value: type: array items: $ref: '#/definitions/DefaultNs.CountryOrRegion' DefaultNs.AddressCollectionResponse: - title: Collection of DefaultNs.Address type: object + title: Collection of DefaultNs.Address properties: value: type: array items: $ref: '#/definitions/DefaultNs.Address' - ReferenceUpdate: - type: object - properties: - '@odata.id': - type: string - '@odata.type': - type: string - ReferenceCreate: - type: object - properties: - '@odata.id': - type: string - additionalProperties: - type: object - ReferenceNumeric: - enum: - - '-INF' - - INF - - NaN - type: string parameters: top: in: query name: $top description: Show only the first n items - type: integer + type: number + format: int64 minimum: 0 skip: in: query name: $skip description: Skip the first n items - type: integer + type: number + format: int64 minimum: 0 count: in: query From e22b41300ece2acb29d9acec60614a47adad53da Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:47:38 -0500 Subject: [PATCH 056/103] fix: minor fixes for basic v3 yaml sample Signed-off-by: Vincent Biret --- .../Resources/Basic.OpenApi.yaml | 161 +++++++++--------- 1 file changed, 83 insertions(+), 78 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml index be4edfc1e..20c86ff7f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml @@ -657,6 +657,74 @@ paths: $ref: '#/components/responses/error' components: schemas: + DefaultNs.ODataErrors.ODataError: + required: + - error + type: object + properties: + error: + $ref: '#/components/schemas/DefaultNs.ODataErrors.MainError' + DefaultNs.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/DefaultNs.ODataErrors.ErrorDetails' + innerError: + $ref: '#/components/schemas/DefaultNs.ODataErrors.InnerError' + DefaultNs.ODataErrors.ErrorDetails: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + target: + type: string + nullable: true + DefaultNs.ODataErrors.InnerError: + type: object + description: The structure of this object is service-specific + ODataCountResponse: + type: number + format: int64 + 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 DefaultNs.Color: title: Color enum: @@ -714,7 +782,7 @@ components: City: $ref: '#/components/schemas/DefaultNs.City' example: - Id: number + Id: 0 City: '@odata.type': DefaultNs.City DefaultNs.WorkAddress: @@ -726,57 +794,11 @@ components: CountryOrRegion: $ref: '#/components/schemas/DefaultNs.CountryOrRegion' example: - Id: number + Id: 0 City: '@odata.type': DefaultNs.City CountryOrRegion: '@odata.type': DefaultNs.CountryOrRegion - DefaultNs.ODataErrors.ODataError: - required: - - error - type: object - properties: - error: - $ref: '#/components/schemas/DefaultNs.ODataErrors.MainError' - DefaultNs.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/DefaultNs.ODataErrors.ErrorDetails' - innerError: - $ref: '#/components/schemas/DefaultNs.ODataErrors.InnerError' - DefaultNs.ODataErrors.ErrorDetails: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - target: - type: string - nullable: true - DefaultNs.ODataErrors.InnerError: - type: object - description: The structure of this object is service-specific - ODataCountResponse: - type: integer - format: int32 DefaultNs.PersonCollectionResponse: title: Collection of Person type: object @@ -809,28 +831,6 @@ components: type: array items: $ref: '#/components/schemas/DefaultNs.Address' - 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: error: description: error @@ -877,7 +877,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 example: 50 skip: name: $skip @@ -887,7 +888,8 @@ components: explode: false schema: minimum: 0 - type: integer + type: number + format: int64 count: name: $count in: query @@ -915,26 +917,29 @@ components: examples: DefaultNs.Person: value: - Addresses: - - '@odata.type': DefaultNs.Address + UserName: string (identifier) HomeAddress: '@odata.type': DefaultNs.Address - UserName: String (identifier) WorkAddress: '@odata.type': DefaultNs.Address + Addresses: + - '@odata.type': DefaultNs.Address DefaultNs.City: value: - Name: String (identifier) + Name: string (identifier) DefaultNs.CountryOrRegion: value: - Name: String (identifier) + Name: string (identifier) DefaultNs.Address: value: + Id: 0 City: '@odata.type': DefaultNs.City - Id: 0 DefaultNs.WorkAddress: value: + Id: 0 + City: + '@odata.type': DefaultNs.City CountryOrRegion: '@odata.type': DefaultNs.CountryOrRegion requestBodies: From 6615672ebc471d583409570d34ed6d3a640f94ba Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:54:47 -0500 Subject: [PATCH 057/103] fix: minor fixes to multiple schema v3 yaml sample Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.yaml | 892 +++++++++--------- 1 file changed, 458 insertions(+), 434 deletions(-) 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 2e0a01807..28f9a52e3 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 @@ -3276,6 +3276,82 @@ paths: $ref: '#/components/responses/error' 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 @@ -3326,15 +3402,15 @@ components: $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Description: string Filename: string NumberOfRevisions: string Suffix: string - DomainId: number - ModificationDate: string (timestamp) - ModifiedBy: number + DomainId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 Tags: - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto Revisions: @@ -3413,21 +3489,21 @@ components: $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Number: string Description: string - LibraryTemplateId: number - ParentTypeId: number - ParentId: number + LibraryTemplateId: 0 + ParentTypeId: 0 + ParentId: 0 AllowMultiple: true AutoCreate: true - TypeId: number - DomainId: number - CreatedBy: number - CreationDate: string (timestamp) - ModifiedBy: number - ModificationDate: string (timestamp) + 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 Siterra.Documents.App.DTO.RevisionDto: @@ -3516,23 +3592,23 @@ components: nullable: true x-ms-navigationProperty: true example: - Id: number (identifier) - Number: number - DocumentId: number + Id: 0 + Number: 0 + DocumentId: 0 DocumentName: string DocumentDescription: string - CreationDate: string (timestamp) - CreatedBy: number + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + CreatedBy: 0 IsReviewed: true - ReviewedBy: number - ReviewedDate: string (timestamp) + ReviewedBy: 0 + ReviewedDate: '0001-01-01T00:00:00.0000000+00:00' IsApproved: true - ApprovedBy: number - ApprovedDate: string (timestamp) + ApprovedBy: 0 + ApprovedDate: '0001-01-01T00:00:00.0000000+00:00' IsRejected: true - RejectedBy: number - RejectedDate: string (timestamp) - DomainId: number + RejectedBy: 0 + RejectedDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Document: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.App.DTO.CategoryDto: @@ -3564,12 +3640,12 @@ components: type: number format: int32 example: - Id: number (identifier) + Id: 0 Name: string Description: string - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - DomainId: number + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Siterra.Documents.App.DTO.DocumentTagRelDto: title: DocumentTagRelDto type: object @@ -3816,49 +3892,49 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Description: string - StatusId: number - TypeId: number + StatusId: 0 + TypeId: 0 Keywords: string - CreationDate: string (timestamp) - CreatedBy: number - ModificationDate: string (timestamp) - ModifiedBy: number - DomainId: number - LibraryId: number - OwnerUserId: number - StatusDate: string (timestamp) - LastRevisionId: number - CheckoutDate: string (timestamp) + 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: number + CheckoutUserId: 0 Number: string - OriginalDate: string (timestamp) - FileSized: number + OriginalDate: '0001-01-01T00:00:00.0000000+00:00' + FileSized: 0 FileClientPath: string - LastRevisionFileId: number - IsDeleted: number - IsNa: number - IsRejected: number - IsReviewed: number + LastRevisionFileId: 0 + IsDeleted: 0 + IsNa: 0 + IsRejected: 0 + IsReviewed: 0 NaDescription: string NaReason: string RejectedDescription: string RejectedReason: string ReviewDescription: string - SourceDocumentId: number - ScraperMapId: number - LastDownloadedDate: string (timestamp) - SmsId: number - IsApprovedOld: number + SourceDocumentId: 0 + ScraperMapId: 0 + LastDownloadedDate: '0001-01-01T00:00:00.0000000+00:00' + SmsId: 0 + IsApprovedOld: 0 Suffix: string - ScrapeResultId: number - IsApproved: number - CategoryId: number - SectionId: number - VersionCount: number + ScrapeResultId: 0 + IsApproved: 0 + CategoryId: 0 + SectionId: 0 + VersionCount: 0 LastFileName: string DocumentClasses: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass @@ -3920,13 +3996,13 @@ components: nullable: true x-ms-navigationProperty: true example: - ClassInstance: number - ClassId: number - DocumentId: number - CreatedBy: number - CreationDate: string (timestamp) - ModifiedBy: number - ModificationDate: string (timestamp) + 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 @@ -3980,13 +4056,13 @@ components: nullable: true x-ms-navigationProperty: true example: - DocumentId: number - TagId: number - DomainId: number - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + 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 Tag: @@ -4208,43 +4284,43 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string - ParentFolderId: number + ParentFolderId: 0 Number: string - TypeId: number - OwnerUserId: number - TotalSize: number - FilesCounter: number - FoldersCounter: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - ModifiedBy: number - CreatedBy: number - ProjectId: number - SearchRingId: number - SiteId: number - AssetId: number + 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 Description: string IsTemplate: true - ProgramId: number - SourceFolderId: number - TemplateClassId: number - TemplateSubType: number + ProgramId: 0 + SourceFolderId: 0 + TemplateClassId: 0 + TemplateSubType: 0 IsHidden: true - IsDeleted: number - StatusId: number - SmsId: number - ContractId: number - VendorId: number - OrganizationUnitId: number - IncidentId: number - EventId: number - ClassInstance: number - ClassId: number + 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: @@ -4347,19 +4423,19 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string - ModifiedBy: number - CreatedBy: number - ModificationDate: string (timestamp) - CreationDate: string (timestamp) - DomainId: number + ModifiedBy: 0 + CreatedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Description: string XmlName: string - MasterId: number - Number: number - ClassId: number - ParentId: number + MasterId: 0 + Number: 0 + ClassId: 0 + ParentId: 0 HasChanged: true MasterLibraryType: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType @@ -4453,23 +4529,23 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Path: string - ModifiedBy: number - CreatedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - Sized: number + ModifiedBy: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Sized: 0 ActualName: string - DomainId: number - SourceClassId: number - ContentTypeId: number + DomainId: 0 + SourceClassId: 0 + ContentTypeId: 0 ClientPath: string - IsSelfHosted: number - SmsId: number - Latitude: number - Longitude: number + IsSelfHosted: 0 + SmsId: 0 + Latitude: 0 + Longitude: 0 Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Tag: @@ -4511,14 +4587,14 @@ components: type: string format: date-time example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag: allOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' @@ -4530,14 +4606,14 @@ components: items: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel Siterra.Documents.BusinessLogic.Entities.Tags.Section: @@ -4552,14 +4628,14 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Category: @@ -4574,14 +4650,14 @@ components: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Revision.Revision: @@ -4725,88 +4801,42 @@ components: nullable: true x-ms-navigationProperty: true example: - Id: number (identifier) - Number: number - DocumentId: number - ModificationDate: string (timestamp) - CreationDate: string (timestamp) - ModifiedBy: number - CreatedBy: number + Id: 0 + Number: 0 + DocumentId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 Remarks: string - FileId: number - DocumentOwnerContact: number + FileId: 0 + DocumentOwnerContact: 0 DocumentDescription: string - DocumentStatusDate: string (timestamp) + DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' DocumentFolder: string DocumentKeywords: string DocumentStatus: string DocumentType: string DocumentName: string DocumentNumber: string - DomainId: number - IsDeleted: number + DomainId: 0 + IsDeleted: 0 IsReviewed: true ReviewDescription: string - ReviewedBy: number + ReviewedBy: 0 IsRejected: true RejectedReason: string RejectedDescription: string - RejectedBy: number + RejectedBy: 0 IsApproved: true - ApprovedBy: number - ReviewedDate: string (timestamp) - RejectedDate: string (timestamp) - ApprovedDate: string (timestamp) + 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 - 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 + Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: + title: Collection of DocumentDto type: object properties: value: @@ -4893,36 +4923,6 @@ components: type: array items: $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' - 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: error: description: error @@ -5063,309 +5063,333 @@ components: examples: Siterra.Documents.App.DTO.DocumentDto: value: - Description: String - DomainId: 0 - Filename: String Id: 0 + Name: string + Description: string + Filename: string + NumberOfRevisions: string + Suffix: string + DomainId: 0 ModificationDate: '0001-01-01T00:00:00.0000000+00:00' ModifiedBy: 0 - Name: String - NumberOfRevisions: String - Revisions: - - '@odata.type': Siterra.Documents.App.DTO.RevisionDto - Suffix: String Tags: - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto + Revisions: + - '@odata.type': Siterra.Documents.App.DTO.RevisionDto Siterra.Documents.App.DTO.LibraryDto: value: + 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' - Description: String + 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 - DocumentId: 0 - DocumentName: String - DomainId: 0 Id: 0 + Number: 0 + DocumentId: 0 + DocumentName: string + 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: value: - Name: String + Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: value: - CategoryId: 0 - CheckoutDate: '0001-01-01T00:00:00.0000000+00:00' - CheckoutPath: String - CheckoutUserId: 0 - CreatedBy: 0 + Id: 0 + Name: string + Description: string + StatusId: 0 + TypeId: 0 + Keywords: string CreationDate: '0001-01-01T00:00:00.0000000+00:00' - Description: String - DocumentClasses: - - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass + CreatedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 DomainId: 0 - FileClientPath: String + 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 + 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 + NaDescription: string + NaReason: string + RejectedDescription: string + RejectedReason: string + ReviewDescription: string + SourceDocumentId: 0 + ScraperMapId: 0 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: - - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision + SmsId: 0 + IsApprovedOld: 0 + Suffix: string ScrapeResultId: 0 - ScraperMapId: 0 + IsApproved: 0 + CategoryId: 0 SectionId: 0 - SmsId: 0 + VersionCount: 0 + LastFileName: string + DocumentClasses: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass + 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 SourceDocumentChildren: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document - SourceDocumentId: 0 - StatusDate: '0001-01-01T00:00:00.0000000+00:00' - StatusId: 0 - Suffix: String - Tags: - - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel - TypeId: 0 - VersionCount: 0 + Revisions: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision 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 - AssetId: 0 - AutoCreate: true - ClassId: 0 - ClassInstance: 0 - ContractId: 0 - CreatedBy: 0 - CreationDate: '0001-01-01T00:00:00.0000000+00:00' - Description: String - Documents: - - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Id: 0 DomainId: 0 - EventId: 0 + Name: string + ParentFolderId: 0 + Number: string + TypeId: 0 + OwnerUserId: 0 + TotalSize: 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 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' ModificationDate: '0001-01-01T00:00:00.0000000+00:00' ModifiedBy: 0 - Name: String - Number: String - OrganizationUnitId: 0 - OwnerUserId: 0 - ParentFolderId: 0 - ProgramId: 0 + CreatedBy: 0 ProjectId: 0 SearchRingId: 0 SiteId: 0 - SmsId: 0 - SourceFolder: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + AssetId: 0 + AllowMultiple: true + AutoCreate: true + Description: string + IsTemplate: true + ProgramId: 0 SourceFolderId: 0 - SourceLibraryChildren: - - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library - StatusId: 0 TemplateClassId: 0 TemplateSubType: 0 - TotalSize: 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 - TypeId: 0 - VendorId: 0 + SourceFolder: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + LibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + SourceLibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library 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 - MasterLibraryType: - '@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 + ClassId: 0 ParentId: 0 + HasChanged: true + MasterLibraryType: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType ParentLibraryTypes: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType - XmlName: String + MasterLibraryTypeChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + 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: + Id: 0 + DomainId: 0 + Name: string + Description: string CreatedBy: 0 + ModifiedBy: 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' - ModifiedBy: 0 - Name: String 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Revision.Revision: 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 - DocumentFolder: String + Id: 0 + Number: 0 DocumentId: 0 - DocumentKeywords: String - DocumentName: String - DocumentNumber: String + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 + Remarks: string + FileId: 0 DocumentOwnerContact: 0 - DocumentStatus: String + DocumentDescription: string DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' - DocumentType: String + DocumentFolder: string + DocumentKeywords: string + DocumentStatus: string + 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 + ReviewDescription: string ReviewedBy: 0 + 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 requestBodies: refPostBody: description: New navigation property ref value From bc42a65475280d5e8336e9bd6cd1f190d6b4a760 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 10:59:06 -0500 Subject: [PATCH 058/103] fix: minor fixes to trip service v3 yaml sample Signed-off-by: Vincent Biret --- .../Resources/TripService.OpenApi.yaml | 1040 +++++++---------- 1 file changed, 402 insertions(+), 638 deletions(-) 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 66dc6a5d4..eab28ac49 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -2959,15 +2959,6 @@ paths: summary: Get the number of the resource operationId: Me.AsEmployee.AddressInfo.GetCount-8488 parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -3009,15 +3000,6 @@ paths: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-9375 parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -3291,15 +3273,6 @@ paths: summary: Get the number of the resource operationId: Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -3341,15 +3314,6 @@ paths: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -3811,15 +3775,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -3876,15 +3831,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -4698,15 +4644,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -4763,15 +4700,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -5961,15 +5889,6 @@ paths: summary: Get the number of the resource operationId: Me.AsManager.AddressInfo.GetCount-75da parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -6011,15 +5930,6 @@ paths: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-f67e parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -6293,15 +6203,6 @@ paths: summary: Get the number of the resource operationId: Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6 parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -6343,15 +6244,6 @@ paths: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e parameters: - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -6800,15 +6692,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -6865,15 +6748,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -9733,15 +9607,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -9786,15 +9651,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -10126,15 +9982,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -10191,15 +10038,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -10773,15 +10611,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -10840,15 +10669,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -15075,15 +14895,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -15140,15 +14951,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -15489,15 +15291,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -15554,15 +15347,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -16119,15 +15903,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -16198,15 +15973,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -17177,15 +16943,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -17256,15 +17013,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -18685,15 +18433,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -18750,15 +18489,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -19099,15 +18829,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -19164,15 +18885,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -19716,15 +19428,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -19795,15 +19498,6 @@ paths: schema: type: string x-ms-docs-key-type: Person - - name: ConsistencyLevel - in: header - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - schema: - type: string - examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: @@ -23083,99 +22777,318 @@ paths: x-ms-docs-operation-type: actionImport components: schemas: - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: - title: Person + Edm.Geography: + $ref: '#/components/schemas/Edm.Geometry' + Edm.GeographyPoint: + $ref: '#/components/schemas/Edm.GeometryPoint' + Edm.GeographyLineString: + $ref: '#/components/schemas/Edm.GeometryLineString' + Edm.GeographyPolygon: + $ref: '#/components/schemas/Edm.GeometryPolygon' + Edm.GeographyMultiPoint: + $ref: '#/components/schemas/Edm.GeometryMultiPoint' + Edm.GeographyMultiLineString: + $ref: '#/components/schemas/Edm.GeometryMultiLineString' + Edm.GeographyMultiPolygon: + $ref: '#/components/schemas/Edm.GeometryMultiPolygon' + Edm.GeographyCollection: + $ref: '#/components/schemas/Edm.GeometryCollection' + Edm.Geometry: + type: object + oneOf: + - $ref: '#/components/schemas/Edm.GeometryPoint' + - $ref: '#/components/schemas/Edm.GeometryLineString' + - $ref: '#/components/schemas/Edm.GeometryPolygon' + - $ref: '#/components/schemas/Edm.GeometryMultiPoint' + - $ref: '#/components/schemas/Edm.GeometryMultiLineString' + - $ref: '#/components/schemas/Edm.GeometryMultiPolygon' + - $ref: '#/components/schemas/Edm.GeometryCollection' + Edm.GeometryPoint: + required: + - type + - coordinates type: object properties: - UserName: - type: string - FirstName: - type: string - LastName: - type: string - nullable: true - MiddleName: + type: + enum: + - Point type: string - nullable: true - Gender: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' - Age: - oneOf: - - type: number - format: int64 - nullable: true - - type: string - nullable: true - Emails: + default: Point + coordinates: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryLineString: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - LineString + coordinates: + minItems: 2 type: array items: - type: string - nullable: true - AddressInfo: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryPolygon: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - Polygon + coordinates: + minItems: 4 type: array items: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - HomeAddress: - anyOf: - - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - type: object - nullable: true - FavoriteFeature: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' - Features: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiPoint: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiPoint + coordinates: type: array items: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' - Photo: - type: string - format: base64url - nullable: true - Friends: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiLineString: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiLineString + coordinates: + minItems: 2 type: array items: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - description: Friends of person - x-ms-navigationProperty: true - BestFriend: - anyOf: - - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true - description: The best friend. - x-ms-navigationProperty: true - Trips: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiPolygon: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiPolygon + coordinates: + minItems: 4 type: array items: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' - description: Collection of trips. - x-ms-navigationProperty: true - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: - title: Airline + type: array + items: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryCollection: + required: + - type + - coordinates type: object properties: - AirlineCode: - type: string - Name: - type: string - nullable: true - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: - title: Airport + type: + enum: + - GeometryCollection + coordinates: + type: array + items: + $ref: '#/components/schemas/Edm.Geometry' + GeoJSON.position: + minItems: 2 + type: array + items: + type: number + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError: + required: + - error type: object properties: - Name: + error: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError: + required: + - code + - message + type: object + properties: + code: type: string - nullable: true - IcaoCode: + message: type: string - IataCode: + x-ms-primary-error-message: true + target: type: string nullable: true - Location: - anyOf: - - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - - type: object - nullable: true - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: + details: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails' + innerError: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + target: + type: string + nullable: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: + title: InnerError + type: object + properties: + 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 + format: date-time + nullable: true + RequestId: + type: string + nullable: true + 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 + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: + title: Person + type: object + properties: + UserName: + type: string + FirstName: + type: string + LastName: + type: string + nullable: true + MiddleName: + type: string + nullable: true + Gender: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' + Age: + oneOf: + - type: number + format: int64 + nullable: true + - type: string + nullable: true + Emails: + type: array + items: + type: string + nullable: true + AddressInfo: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + HomeAddress: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + - type: object + nullable: true + FavoriteFeature: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Features: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Photo: + type: string + format: base64url + nullable: true + Friends: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + description: Friends of person + x-ms-navigationProperty: true + BestFriend: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: object + nullable: true + description: The best friend. + x-ms-navigationProperty: true + Trips: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + description: Collection of trips. + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: + title: Airline + type: object + properties: + AirlineCode: + type: string + Name: + type: string + nullable: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: + title: Airport + type: object + properties: + Name: + type: string + nullable: true + IcaoCode: + type: string + IataCode: + type: string + nullable: true + Location: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' + - type: object + nullable: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object properties: @@ -23419,195 +23332,6 @@ components: type: string x-ms-enum-flags: isFlags: true - Edm.Geography: - $ref: '#/components/schemas/Edm.Geometry' - Edm.GeographyPoint: - $ref: '#/components/schemas/Edm.GeometryPoint' - Edm.GeographyLineString: - $ref: '#/components/schemas/Edm.GeometryLineString' - Edm.GeographyPolygon: - $ref: '#/components/schemas/Edm.GeometryPolygon' - Edm.GeographyMultiPoint: - $ref: '#/components/schemas/Edm.GeometryMultiPoint' - Edm.GeographyMultiLineString: - $ref: '#/components/schemas/Edm.GeometryMultiLineString' - Edm.GeographyMultiPolygon: - $ref: '#/components/schemas/Edm.GeometryMultiPolygon' - Edm.GeographyCollection: - $ref: '#/components/schemas/Edm.GeometryCollection' - Edm.Geometry: - type: object - oneOf: - - $ref: '#/components/schemas/Edm.GeometryPoint' - - $ref: '#/components/schemas/Edm.GeometryLineString' - - $ref: '#/components/schemas/Edm.GeometryPolygon' - - $ref: '#/components/schemas/Edm.GeometryMultiPoint' - - $ref: '#/components/schemas/Edm.GeometryMultiLineString' - - $ref: '#/components/schemas/Edm.GeometryMultiPolygon' - - $ref: '#/components/schemas/Edm.GeometryCollection' - Edm.GeometryPoint: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - Point - type: string - default: Point - coordinates: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryLineString: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - LineString - coordinates: - minItems: 2 - type: array - items: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryPolygon: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - Polygon - coordinates: - minItems: 4 - type: array - items: - type: array - items: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryMultiPoint: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiPoint - coordinates: - type: array - items: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryMultiLineString: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiLineString - coordinates: - minItems: 2 - type: array - items: - type: array - items: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryMultiPolygon: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiPolygon - coordinates: - minItems: 4 - type: array - items: - type: array - items: - type: array - items: - $ref: '#/components/schemas/GeoJSON.position' - Edm.GeometryCollection: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - GeometryCollection - coordinates: - type: array - items: - $ref: '#/components/schemas/Edm.Geometry' - GeoJSON.position: - minItems: 2 - type: array - items: - type: number - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError: - required: - - error - type: object - properties: - error: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError' - Microsoft.OData.Service.Sample.TrippinInMemory.Models.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/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails' - innerError: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError' - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - target: - type: string - nullable: true - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: - title: InnerError - type: object - properties: - 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 - format: date-time - nullable: true - RequestId: - type: string - nullable: true - ODataCountResponse: - type: number - format: int64 Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: title: Collection of Person type: object @@ -23696,36 +23420,6 @@ components: type: array items: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - 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: error: description: error @@ -23904,112 +23598,182 @@ components: Microsoft.OData.Service.Sample.TrippinInMemory.Models.InnerError: value: Date: '0001-01-01T00:00:00.0000000+00:00' - RequestId: String + RequestId: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: value: - AddressInfo: - - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender Age: 0 - BestFriend: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person Emails: - - String + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location FavoriteFeature: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature Features: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature - FirstName: String + Photo: string Friends: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person - Gender: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender - HomeAddress: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location - LastName: String - MiddleName: String - Photo: Stream + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person Trips: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip - UserName: String (identifier) Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: value: - AirlineCode: String (identifier) - Name: String + AirlineCode: string (identifier) + Name: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: value: - IataCode: String - IcaoCode: String (identifier) + Name: string + IcaoCode: string (identifier) + IataCode: string Location: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation - Name: String Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: value: - Address: String + Address: string City: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: value: - CountryRegion: String - Name: String - Region: String + Name: string + CountryRegion: string + Region: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: value: + Address: string + City: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City + Loc: Edm.GeographyPoint EmergencyAuthority: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person - Loc: GeographyPoint Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: value: - BuildingInfo: String + Address: string + City: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City + BuildingInfo: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: value: + TripId: 0 + ShareId: 00000000-0000-0000-0000-000000000000 + Name: string Budget: 0 - Description: String + Description: string + Tags: + - string + TripData: { } DestinationInfo: - { } + StartsAt: '0001-01-01T00:00:00.0000000+00:00' EndsAt: '0001-01-01T00:00:00.0000000+00:00' - Name: String PlanItems: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem - ShareId: 00000000-0000-0000-0000-000000000000 - StartsAt: '0001-01-01T00:00:00.0000000+00:00' - Tags: - - String - TripData: { } - TripId: 0 Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: value: - ConfirmationCode: String - Duration: Duration - EndsAt: '0001-01-01T00:00:00.0000000+00:00' PlanItemId: 0 + ConfirmationCode: string StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: value: - Description: String + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string OccursAt: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + Description: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: value: - SeatNumber: String + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + SeatNumber: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: value: + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + SeatNumber: string + FlightNumber: string Airline: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline - FlightNumber: String From: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport To: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: value: + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender + Age: 0 + Emails: + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + FavoriteFeature: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Features: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Photo: string + Friends: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Trips: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip Cost: 0 Peers: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: value: - BossOffice: + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender + Age: 0 + Emails: + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + FavoriteFeature: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Features: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Photo: string + Friends: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Trips: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip Budget: 0 + BossOffice: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location DirectReports: - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person requestBodies: From bd2f491d20787e7f161ff258ca60905e34a89451 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 12:30:10 -0500 Subject: [PATCH 059/103] chore: removes obsolete member Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs index cfd80728f..92e46b120 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Constants.cs @@ -167,12 +167,6 @@ internal static class Constants /// public const string StringType = "string"; - /// - /// integer type - /// - [Obsolete("integer is not a valid OpenAPI type. Use number instead.")] - public const string IntegerType = "integer"; - /// /// number type /// From eb11c2cfa8d00a437cc95b175be5b65813f08184 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 12:47:40 -0500 Subject: [PATCH 060/103] fix: missing host document for request body references Signed-off-by: Vincent Biret --- .../Operation/EdmActionOperationHandler.cs | 2 +- .../Operation/RefPostOperationHandler.cs | 2 +- .../Operation/RefPutOperationHandler.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index a16b5162f..39549df1f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -54,7 +54,7 @@ protected override void SetRequestBody(OpenApiOperation operation) { if (Context.Model.OperationTargetsMultiplePaths(action)) { - operation.RequestBody = new OpenApiRequestBodyReference($"{action.Name}RequestBody", null); + operation.RequestBody = new OpenApiRequestBodyReference($"{action.Name}RequestBody", _document); } else { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index 9032ebd5d..05eff1f0c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -56,7 +56,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePostRequestBodyName, null); + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePostRequestBodyName, _document); base.SetRequestBody(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index 9bd4562b4..efe34925f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -56,7 +56,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePutRequestBodyName, null); + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePutRequestBodyName, _document); base.SetRequestBody(operation); } From f42589cf432915f68fb483251a998619ff633ef3 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 12:49:53 -0500 Subject: [PATCH 061/103] fix: minor updates to multi schema v2 json sample Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.V2.json | 1432 ++++++++--------- 1 file changed, 716 insertions(+), 716 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json index 35b44a0a9..1135119d8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json @@ -39,6 +39,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -52,8 +53,7 @@ "ModificationDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } }, { @@ -62,6 +62,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -69,8 +70,7 @@ "CreationDate", "ModificationDate", "DomainId" - ], - "type": "string" + ] } }, { @@ -79,10 +79,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -161,6 +161,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -168,8 +169,7 @@ "CreationDate", "ModificationDate", "DomainId" - ], - "type": "string" + ] } }, { @@ -178,10 +178,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -331,6 +331,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -352,8 +353,7 @@ "ModifiedBy desc", "Tags", "Tags desc" - ], - "type": "string" + ] } }, { @@ -362,6 +362,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -374,8 +375,7 @@ "ModifiedBy", "Tags", "Revisions" - ], - "type": "string" + ] } }, { @@ -384,11 +384,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Revisions" - ], - "type": "string" + ] } } ], @@ -467,6 +467,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -479,8 +480,7 @@ "ModifiedBy", "Tags", "Revisions" - ], - "type": "string" + ] } }, { @@ -489,11 +489,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Revisions" - ], - "type": "string" + ] } } ], @@ -660,6 +660,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -695,8 +696,7 @@ "RejectedDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } }, { @@ -705,6 +705,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Number", @@ -724,8 +725,7 @@ "RejectedDate", "DomainId", "Document" - ], - "type": "string" + ] } }, { @@ -734,11 +734,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document" - ], - "type": "string" + ] } } ], @@ -880,6 +880,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -915,8 +916,7 @@ "RejectedDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } } ], @@ -1046,11 +1046,11 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Name", "Name desc" - ], - "type": "string" + ] } }, { @@ -1059,10 +1059,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -1071,10 +1071,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -1277,6 +1277,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -1308,8 +1309,7 @@ "ModifiedBy desc", "ModificationDate", "ModificationDate desc" - ], - "type": "string" + ] } }, { @@ -1318,6 +1318,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -1335,8 +1336,7 @@ "ModifiedBy", "ModificationDate", "Documents" - ], - "type": "string" + ] } }, { @@ -1345,11 +1345,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Documents" - ], - "type": "string" + ] } } ], @@ -1428,6 +1428,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -1445,8 +1446,7 @@ "ModifiedBy", "ModificationDate", "Documents" - ], - "type": "string" + ] } }, { @@ -1455,11 +1455,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Documents" - ], - "type": "string" + ] } } ], @@ -1594,6 +1594,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -1615,8 +1616,7 @@ "ModifiedBy desc", "Tags", "Tags desc" - ], - "type": "string" + ] } }, { @@ -1625,6 +1625,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -1637,8 +1638,7 @@ "ModifiedBy", "Tags", "Revisions" - ], - "type": "string" + ] } }, { @@ -1647,11 +1647,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Revisions" - ], - "type": "string" + ] } } ], @@ -1767,11 +1767,11 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Name", "Name desc" - ], - "type": "string" + ] } }, { @@ -1780,10 +1780,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -1792,10 +1792,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -2053,6 +2053,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -2074,8 +2075,7 @@ "ModifiedBy desc", "Tags", "Tags desc" - ], - "type": "string" + ] } } ], @@ -2220,6 +2220,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -2255,8 +2256,7 @@ "RejectedDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } }, { @@ -2265,6 +2265,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Number", @@ -2284,8 +2285,7 @@ "RejectedDate", "DomainId", "Document" - ], - "type": "string" + ] } }, { @@ -2294,11 +2294,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document" - ], - "type": "string" + ] } } ], @@ -2377,6 +2377,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Number", @@ -2396,8 +2397,7 @@ "RejectedDate", "DomainId", "Document" - ], - "type": "string" + ] } }, { @@ -2406,11 +2406,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document" - ], - "type": "string" + ] } } ], @@ -2533,6 +2533,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -2585,8 +2586,7 @@ "SourceDocument", "SourceDocumentChildren", "Revisions" - ], - "type": "string" + ] } }, { @@ -2595,6 +2595,7 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Library", @@ -2602,8 +2603,7 @@ "SourceDocument", "SourceDocumentChildren", "Revisions" - ], - "type": "string" + ] } } ], @@ -2767,6 +2767,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "ClassInstance", "ClassInstance desc", @@ -2784,8 +2785,7 @@ "ModificationDate desc", "IsPrimary", "IsPrimary desc" - ], - "type": "string" + ] } }, { @@ -2794,6 +2794,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "ClassInstance", "ClassId", @@ -2804,8 +2805,7 @@ "ModificationDate", "IsPrimary", "Document" - ], - "type": "string" + ] } }, { @@ -2814,11 +2814,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document" - ], - "type": "string" + ] } } ], @@ -3006,6 +3006,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "DocumentId", "DocumentId desc", @@ -3021,8 +3022,7 @@ "CreationDate desc", "ModificationDate", "ModificationDate desc" - ], - "type": "string" + ] } }, { @@ -3031,6 +3031,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "DocumentId", "TagId", @@ -3041,8 +3042,7 @@ "ModificationDate", "Document", "Tag" - ], - "type": "string" + ] } }, { @@ -3051,12 +3051,12 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document", "Tag" - ], - "type": "string" + ] } } ], @@ -3259,6 +3259,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -3280,8 +3281,7 @@ "ModifiedBy desc", "Tags", "Tags desc" - ], - "type": "string" + ] } }, { @@ -3290,6 +3290,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -3302,8 +3303,7 @@ "ModifiedBy", "Tags", "Revisions" - ], - "type": "string" + ] } }, { @@ -3312,11 +3312,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Revisions" - ], - "type": "string" + ] } } ], @@ -3395,6 +3395,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Name", @@ -3407,8 +3408,7 @@ "ModifiedBy", "Tags", "Revisions" - ], - "type": "string" + ] } }, { @@ -3417,11 +3417,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Revisions" - ], - "type": "string" + ] } } ], @@ -3588,6 +3588,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -3623,8 +3624,7 @@ "RejectedDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } }, { @@ -3633,6 +3633,7 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Number", @@ -3652,8 +3653,7 @@ "RejectedDate", "DomainId", "Document" - ], - "type": "string" + ] } }, { @@ -3662,11 +3662,11 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*", "Document" - ], - "type": "string" + ] } } ], @@ -3808,6 +3808,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Id", "Id desc", @@ -3843,8 +3844,7 @@ "RejectedDate desc", "DomainId", "DomainId desc" - ], - "type": "string" + ] } } ], @@ -3974,11 +3974,11 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Name", "Name desc" - ], - "type": "string" + ] } }, { @@ -3987,10 +3987,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -3999,10 +3999,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -4178,15 +4178,122 @@ } }, "definitions": { + "Default.ODataErrors.ODataError": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "$ref": "#/definitions/Default.ODataErrors.MainError" + } + } + }, + "Default.ODataErrors.MainError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/Default.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/definitions/Default.ODataErrors.InnerError" + } + } + }, + "Default.ODataErrors.ErrorDetails": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": "string" + } + } + }, + "Default.ODataErrors.InnerError": { + "type": "object", + "description": "The structure of this object is service-specific" + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "StringCollectionResponse": { + "type": "object", + "title": "Collection of string", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": "string" + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "type": "string", + "enum": [ + "-INF", + "INF", + "NaN" + ] + }, "Siterra.Documents.App.DTO.DocumentDto": { - "title": "DocumentDto", "type": "object", + "title": "DocumentDto", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -4204,21 +4311,21 @@ "type": "string" }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Tags": { "type": "array", @@ -4235,15 +4342,15 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", "Filename": "string", "NumberOfRevisions": "string", "Suffix": "string", - "DomainId": "number", - "ModificationDate": "string (timestamp)", - "ModifiedBy": "number", + "DomainId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, "Tags": [ { "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" @@ -4257,14 +4364,14 @@ } }, "Siterra.Documents.App.DTO.LibraryDto": { - "title": "LibraryDto", "type": "object", + "title": "LibraryDto", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -4276,22 +4383,22 @@ "type": "string" }, "LibraryTemplateId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ParentTypeId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ParentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "AllowMultiple": { "type": "boolean" @@ -4300,38 +4407,38 @@ "type": "boolean" }, "TypeId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "Documents": { "type": "array", @@ -4342,21 +4449,21 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Number": "string", "Description": "string", - "LibraryTemplateId": "number", - "ParentTypeId": "number", - "ParentId": "number", + "LibraryTemplateId": 0, + "ParentTypeId": 0, + "ParentId": 0, "AllowMultiple": true, "AutoCreate": true, - "TypeId": "number", - "DomainId": "number", - "CreatedBy": "number", - "CreationDate": "string (timestamp)", - "ModifiedBy": "number", - "ModificationDate": "string (timestamp)", + "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" @@ -4365,26 +4472,26 @@ } }, "Siterra.Documents.App.DTO.RevisionDto": { - "title": "RevisionDto", "type": "object", + "title": "RevisionDto", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Number": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentName": { "type": "string" @@ -4393,100 +4500,100 @@ "type": "string" }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsReviewed": { "type": "boolean" }, "ReviewedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ReviewedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "IsApproved": { "type": "boolean" }, "ApprovedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ApprovedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "IsRejected": { "type": "boolean" }, "RejectedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "RejectedDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Document": { "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" } }, "example": { - "Id": "number (identifier)", - "Number": "number", - "DocumentId": "number", + "Id": 0, + "Number": 0, + "DocumentId": 0, "DocumentName": "string", "DocumentDescription": "string", - "CreationDate": "string (timestamp)", - "CreatedBy": "number", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreatedBy": 0, "IsReviewed": true, - "ReviewedBy": "number", - "ReviewedDate": "string (timestamp)", + "ReviewedBy": 0, + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", "IsApproved": true, - "ApprovedBy": "number", - "ApprovedDate": "string (timestamp)", + "ApprovedBy": 0, + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", "IsRejected": true, - "RejectedBy": "number", - "RejectedDate": "string (timestamp)", - "DomainId": "number", + "RejectedBy": 0, + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, "Document": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" } } }, "Siterra.Documents.App.DTO.CategoryDto": { - "title": "CategoryDto", "type": "object", + "title": "CategoryDto", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -4495,34 +4602,34 @@ "type": "string" }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", - "DomainId": "number" + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0 } }, "Siterra.Documents.App.DTO.DocumentTagRelDto": { - "title": "DocumentTagRelDto", "type": "object", + "title": "DocumentTagRelDto", "properties": { "Name": { "type": "string" @@ -4533,14 +4640,14 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.Document": { - "title": "Document", "type": "object", + "title": "Document", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -4549,123 +4656,123 @@ "type": "string" }, "StatusId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "TypeId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Keywords": { "type": "string" }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "LibraryId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "OwnerUserId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "StatusDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CheckoutDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "CheckoutPath": { "type": "string" }, "CheckoutUserId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Number": { "type": "string" }, "OriginalDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "FileSized": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "FileClientPath": { "type": "string" }, "LastRevisionFileId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsDeleted": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsNa": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "IsRejected": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "IsReviewed": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "NaDescription": { "type": "string" @@ -4683,64 +4790,64 @@ "type": "string" }, "SourceDocumentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ScraperMapId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "LastDownloadedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "SmsId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsApprovedOld": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Suffix": { "type": "string" }, "ScrapeResultId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsApproved": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "CategoryId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SectionId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "VersionCount": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "LastFileName": { "type": "string" @@ -4782,49 +4889,49 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Description": "string", - "StatusId": "number", - "TypeId": "number", + "StatusId": 0, + "TypeId": 0, "Keywords": "string", - "CreationDate": "string (timestamp)", - "CreatedBy": "number", - "ModificationDate": "string (timestamp)", - "ModifiedBy": "number", - "DomainId": "number", - "LibraryId": "number", - "OwnerUserId": "number", - "StatusDate": "string (timestamp)", - "LastRevisionId": "number", - "CheckoutDate": "string (timestamp)", + "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": "number", + "CheckoutUserId": 0, "Number": "string", - "OriginalDate": "string (timestamp)", - "FileSized": "number", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", + "FileSized": 0, "FileClientPath": "string", - "LastRevisionFileId": "number", - "IsDeleted": "number", - "IsNa": "number", - "IsRejected": "number", - "IsReviewed": "number", + "LastRevisionFileId": 0, + "IsDeleted": 0, + "IsNa": 0, + "IsRejected": 0, + "IsReviewed": 0, "NaDescription": "string", "NaReason": "string", "RejectedDescription": "string", "RejectedReason": "string", "ReviewDescription": "string", - "SourceDocumentId": "number", - "ScraperMapId": "number", - "LastDownloadedDate": "string (timestamp)", - "SmsId": "number", - "IsApprovedOld": "number", + "SourceDocumentId": 0, + "ScraperMapId": 0, + "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", + "SmsId": 0, + "IsApprovedOld": 0, "Suffix": "string", - "ScrapeResultId": "number", - "IsApproved": "number", - "CategoryId": "number", - "SectionId": "number", - "VersionCount": "number", + "ScrapeResultId": 0, + "IsApproved": 0, + "CategoryId": 0, + "SectionId": 0, + "VersionCount": 0, "LastFileName": "string", "DocumentClasses": [ { @@ -4858,48 +4965,48 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass": { - "title": "DocumentClass", "type": "object", + "title": "DocumentClass", "properties": { "ClassInstance": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ClassId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "IsPrimary": { "type": "boolean" @@ -4909,13 +5016,13 @@ } }, "example": { - "ClassInstance": "number", - "ClassId": "number", - "DocumentId": "number", - "CreatedBy": "number", - "CreationDate": "string (timestamp)", - "ModifiedBy": "number", - "ModificationDate": "string (timestamp)", + "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" @@ -4923,48 +5030,48 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel": { - "title": "DocumentTagRel", "type": "object", + "title": "DocumentTagRel", "properties": { "DocumentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "TagId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModifiedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "Document": { "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -4974,13 +5081,13 @@ } }, "example": { - "DocumentId": "number", - "TagId": "number", - "DomainId": "number", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "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" }, @@ -4990,106 +5097,106 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Library.Library": { - "title": "Library", "type": "object", + "title": "Library", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" }, "ParentFolderId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Number": { "type": "string" }, "TypeId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "OwnerUserId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "TotalSize": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "FilesCounter": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "FoldersCounter": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ProjectId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SearchRingId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SiteId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "AssetId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "AllowMultiple": { "type": "boolean" @@ -5104,91 +5211,91 @@ "type": "boolean" }, "ProgramId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SourceFolderId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "TemplateClassId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "TemplateSubType": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsHidden": { "type": "boolean" }, "IsDeleted": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "StatusId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SmsId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ContractId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "VendorId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "OrganizationUnitId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IncidentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "EventId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ClassInstance": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ClassId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "LibraryParent": { "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.Library" @@ -5222,43 +5329,43 @@ } }, "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", - "ParentFolderId": "number", + "ParentFolderId": 0, "Number": "string", - "TypeId": "number", - "OwnerUserId": "number", - "TotalSize": "number", - "FilesCounter": "number", - "FoldersCounter": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", - "ModifiedBy": "number", - "CreatedBy": "number", - "ProjectId": "number", - "SearchRingId": "number", - "SiteId": "number", - "AssetId": "number", + "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, "Description": "string", "IsTemplate": true, - "ProgramId": "number", - "SourceFolderId": "number", - "TemplateClassId": "number", - "TemplateSubType": "number", + "ProgramId": 0, + "SourceFolderId": 0, + "TemplateClassId": 0, + "TemplateSubType": 0, "IsHidden": true, - "IsDeleted": "number", - "StatusId": "number", - "SmsId": "number", - "ContractId": "number", - "VendorId": "number", - "OrganizationUnitId": "number", - "IncidentId": "number", - "EventId": "number", - "ClassInstance": "number", - "ClassId": "number", + "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" }, @@ -5286,45 +5393,45 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType": { - "title": "LibraryType", "type": "object", + "title": "LibraryType", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" }, "ModifiedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Description": { "type": "string" @@ -5333,28 +5440,28 @@ "type": "string" }, "MasterId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Number": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ClassId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ParentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "HasChanged": { "type": "boolean" @@ -5381,19 +5488,19 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", - "ModifiedBy": "number", - "CreatedBy": "number", - "ModificationDate": "string (timestamp)", - "CreationDate": "string (timestamp)", - "DomainId": "number", + "ModifiedBy": 0, + "CreatedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, "Description": "string", "XmlName": "string", - "MasterId": "number", - "Number": "number", - "ClassId": "number", - "ParentId": "number", + "MasterId": 0, + "Number": 0, + "ClassId": 0, + "ParentId": 0, "HasChanged": true, "MasterLibraryType": { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" @@ -5414,14 +5521,14 @@ } }, "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile": { - "title": "DocumentFile", "type": "object", + "title": "DocumentFile", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -5430,74 +5537,74 @@ "type": "string" }, "ModifiedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "Sized": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "ActualName": { "type": "string" }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "SourceClassId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ContentTypeId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ClientPath": { "type": "string" }, "IsSelfHosted": { + "type": "number", "format": "int16", "maximum": 32767, - "minimum": -32768, - "type": "number" + "minimum": -32768 }, "SmsId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Latitude": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "Longitude": { - "format": "decimal", - "type": "number" + "type": "number", + "format": "decimal" }, "Documents": { "type": "array", @@ -5508,23 +5615,23 @@ } }, "example": { - "Id": "number (identifier)", + "Id": 0, "Name": "string", "Path": "string", - "ModifiedBy": "number", - "CreatedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", - "Sized": "number", + "ModifiedBy": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Sized": 0, "ActualName": "string", - "DomainId": "number", - "SourceClassId": "number", - "ContentTypeId": "number", + "DomainId": 0, + "SourceClassId": 0, + "ContentTypeId": 0, "ClientPath": "string", - "IsSelfHosted": "number", - "SmsId": "number", - "Latitude": "number", - "Longitude": "number", + "IsSelfHosted": 0, + "SmsId": 0, + "Latitude": 0, + "Longitude": 0, "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -5533,20 +5640,20 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Tags.Tag": { - "title": "Tag", "type": "object", + "title": "Tag", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Name": { "type": "string" @@ -5555,37 +5662,37 @@ "type": "string" }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModifiedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" } }, "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)" + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00" } }, "Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag": { @@ -5594,8 +5701,8 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" }, { - "title": "UserDefinedTag", "type": "object", + "title": "UserDefinedTag", "properties": { "Documents": { "type": "array", @@ -5607,14 +5714,14 @@ } ], "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" @@ -5628,8 +5735,8 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" }, { - "title": "Section", "type": "object", + "title": "Section", "properties": { "Documents": { "type": "array", @@ -5642,14 +5749,14 @@ } ], "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -5663,8 +5770,8 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" }, { - "title": "Category", "type": "object", + "title": "Category", "properties": { "Documents": { "type": "array", @@ -5677,14 +5784,14 @@ } ], "example": { - "Id": "number (identifier)", - "DomainId": "number", + "Id": 0, + "DomainId": 0, "Name": "string", "Description": "string", - "CreatedBy": "number", - "ModifiedBy": "number", - "CreationDate": "string (timestamp)", - "ModificationDate": "string (timestamp)", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", "Documents": [ { "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" @@ -5693,71 +5800,71 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Revision.Revision": { - "title": "Revision", "type": "object", + "title": "Revision", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Number": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ModificationDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "CreationDate": { + "type": "string", "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])$", - "type": "string" + "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", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "CreatedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "Remarks": { "type": "string" }, "FileId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentOwnerContact": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "DocumentDescription": { "type": "string" }, "DocumentStatusDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "DocumentFolder": { "type": "string" @@ -5778,16 +5885,16 @@ "type": "string" }, "DomainId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsDeleted": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsReviewed": { "type": "boolean" @@ -5796,10 +5903,10 @@ "type": "string" }, "ReviewedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsRejected": { "type": "boolean" @@ -5811,145 +5918,80 @@ "type": "string" }, "RejectedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "IsApproved": { "type": "boolean" }, "ApprovedBy": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ReviewedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "RejectedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "ApprovedDate": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "Document": { "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" } }, "example": { - "Id": "number (identifier)", - "Number": "number", - "DocumentId": "number", - "ModificationDate": "string (timestamp)", - "CreationDate": "string (timestamp)", - "ModifiedBy": "number", - "CreatedBy": "number", + "Id": 0, + "Number": 0, + "DocumentId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, "Remarks": "string", - "FileId": "number", - "DocumentOwnerContact": "number", + "FileId": 0, + "DocumentOwnerContact": 0, "DocumentDescription": "string", - "DocumentStatusDate": "string (timestamp)", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", "DocumentFolder": "string", "DocumentKeywords": "string", "DocumentStatus": "string", "DocumentType": "string", "DocumentName": "string", "DocumentNumber": "string", - "DomainId": "number", - "IsDeleted": "number", + "DomainId": 0, + "IsDeleted": 0, "IsReviewed": true, "ReviewDescription": "string", - "ReviewedBy": "number", + "ReviewedBy": 0, "IsRejected": true, "RejectedReason": "string", "RejectedDescription": "string", - "RejectedBy": "number", + "RejectedBy": 0, "IsApproved": true, - "ApprovedBy": "number", - "ReviewedDate": "string (timestamp)", - "RejectedDate": "string (timestamp)", - "ApprovedDate": "string (timestamp)", + "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" } } }, - "Default.ODataErrors.ODataError": { - "required": [ - "error" - ], - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/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" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/Default.ODataErrors.ErrorDetails" - } - }, - "innerError": { - "$ref": "#/definitions/Default.ODataErrors.InnerError" - } - } - }, - "Default.ODataErrors.ErrorDetails": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "Default.ODataErrors.InnerError": { - "description": "The structure of this object is service-specific", - "type": "object" - }, - "ODataCountResponse": { - "format": "int64", - "type": "number" - }, "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { - "title": "Collection of DocumentDto", "type": "object", + "title": "Collection of DocumentDto", "properties": { "value": { "type": "array", @@ -5960,8 +6002,8 @@ } }, "Siterra.Documents.App.DTO.LibraryDtoCollectionResponse": { - "title": "Collection of LibraryDto", "type": "object", + "title": "Collection of LibraryDto", "properties": { "value": { "type": "array", @@ -5972,8 +6014,8 @@ } }, "Siterra.Documents.App.DTO.RevisionDtoCollectionResponse": { - "title": "Collection of RevisionDto", "type": "object", + "title": "Collection of RevisionDto", "properties": { "value": { "type": "array", @@ -5984,8 +6026,8 @@ } }, "Siterra.Documents.App.DTO.CategoryDtoCollectionResponse": { - "title": "Collection of CategoryDto", "type": "object", + "title": "Collection of CategoryDto", "properties": { "value": { "type": "array", @@ -5996,8 +6038,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse": { - "title": "Collection of Document", "type": "object", + "title": "Collection of Document", "properties": { "value": { "type": "array", @@ -6008,8 +6050,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse": { - "title": "Collection of Revision", "type": "object", + "title": "Collection of Revision", "properties": { "value": { "type": "array", @@ -6020,8 +6062,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse": { - "title": "Collection of Library", "type": "object", + "title": "Collection of Library", "properties": { "value": { "type": "array", @@ -6032,8 +6074,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse": { - "title": "Collection of LibraryType", "type": "object", + "title": "Collection of LibraryType", "properties": { "value": { "type": "array", @@ -6044,8 +6086,8 @@ } }, "Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse": { - "title": "Collection of Siterra.Documents.App.DTO.DocumentTagRelDto", "type": "object", + "title": "Collection of Siterra.Documents.App.DTO.DocumentTagRelDto", "properties": { "value": { "type": "array", @@ -6056,8 +6098,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse": { - "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass", "type": "object", + "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass", "properties": { "value": { "type": "array", @@ -6068,8 +6110,8 @@ } }, "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse": { - "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel", "type": "object", + "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel", "properties": { "value": { "type": "array", @@ -6078,48 +6120,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" - } - } - }, - "ReferenceCreate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - } - }, - "additionalProperties": { - "type": "object" - } - }, - "ReferenceNumeric": { - "enum": [ - "-INF", - "INF", - "NaN" - ], - "type": "string" } }, "parameters": { From fa98f46448588f6fdc8dd59e3dc4074e27185cb9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 12:53:56 -0500 Subject: [PATCH 062/103] fix: minor changes to multi schema v2 yaml sample Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.V2.yaml | 956 +++++++++--------- 1 file changed, 478 insertions(+), 478 deletions(-) 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 a05f7e39a..674dbc771 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 @@ -24,6 +24,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -37,12 +38,12 @@ paths: - ModificationDate desc - DomainId - DomainId desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -50,15 +51,14 @@ paths: - CreationDate - ModificationDate - DomainId - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.CategoryDtoCollectionResponse' @@ -112,6 +112,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -119,15 +120,14 @@ paths: - CreationDate - ModificationDate - DomainId - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': description: Retrieved entity @@ -223,6 +223,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -244,12 +245,12 @@ paths: - ModifiedBy desc - Tags - Tags desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -262,16 +263,15 @@ paths: - ModifiedBy - Tags - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Revisions - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' @@ -325,6 +325,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -337,16 +338,15 @@ paths: - ModifiedBy - Tags - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Revisions - type: string responses: '200': description: Retrieved entity @@ -459,6 +459,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -494,12 +495,12 @@ paths: - RejectedDate desc - DomainId - DomainId desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Number @@ -519,16 +520,15 @@ paths: - RejectedDate - DomainId - Document - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' @@ -622,6 +622,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -657,7 +658,6 @@ paths: - RejectedDate desc - DomainId - DomainId desc - type: string responses: '200': $ref: '#/responses/StringCollectionResponse' @@ -743,26 +743,26 @@ paths: description: Order items by property values type: array items: + type: string enum: - Name - Name desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' @@ -891,6 +891,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -922,12 +923,12 @@ paths: - ModifiedBy desc - ModificationDate - ModificationDate desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -945,16 +946,15 @@ paths: - ModifiedBy - ModificationDate - Documents - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Documents - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.LibraryDtoCollectionResponse' @@ -1008,6 +1008,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -1025,16 +1026,15 @@ paths: - ModifiedBy - ModificationDate - Documents - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Documents - type: string responses: '200': description: Retrieved entity @@ -1124,6 +1124,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -1145,12 +1146,12 @@ paths: - ModifiedBy desc - Tags - Tags desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -1163,16 +1164,15 @@ paths: - ModifiedBy - Tags - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Revisions - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' @@ -1251,26 +1251,26 @@ paths: description: Order items by property values type: array items: + type: string enum: - Name - Name desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' @@ -1444,6 +1444,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -1465,7 +1466,6 @@ paths: - ModifiedBy desc - Tags - Tags desc - type: string responses: '200': $ref: '#/responses/StringCollectionResponse' @@ -1557,6 +1557,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -1592,12 +1593,12 @@ paths: - RejectedDate desc - DomainId - DomainId desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Number @@ -1617,16 +1618,15 @@ paths: - RejectedDate - DomainId - Document - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' @@ -1680,6 +1680,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Number @@ -1699,16 +1700,15 @@ paths: - RejectedDate - DomainId - Document - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - type: string responses: '200': description: Retrieved entity @@ -1795,6 +1795,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -1847,12 +1848,12 @@ paths: - SourceDocument - SourceDocumentChildren - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Library @@ -1860,7 +1861,6 @@ paths: - SourceDocument - SourceDocumentChildren - Revisions - type: string responses: '200': description: Retrieved navigation property @@ -1970,6 +1970,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - ClassInstance - ClassInstance desc @@ -1987,12 +1988,12 @@ paths: - ModificationDate desc - IsPrimary - IsPrimary desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - ClassInstance - ClassId @@ -2003,16 +2004,15 @@ paths: - ModificationDate - IsPrimary - Document - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - type: string responses: '200': $ref: '#/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse' @@ -2135,6 +2135,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - DocumentId - DocumentId desc @@ -2150,12 +2151,12 @@ paths: - CreationDate desc - ModificationDate - ModificationDate desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - DocumentId - TagId @@ -2166,17 +2167,16 @@ paths: - ModificationDate - Document - Tag - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - Tag - type: string responses: '200': $ref: '#/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse' @@ -2305,6 +2305,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -2326,12 +2327,12 @@ paths: - ModifiedBy desc - Tags - Tags desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -2344,16 +2345,15 @@ paths: - ModifiedBy - Tags - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Revisions - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' @@ -2407,6 +2407,7 @@ paths: description: Select properties to be returned type: array items: + type: string enum: - Id - Name @@ -2419,16 +2420,15 @@ paths: - ModifiedBy - Tags - Revisions - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Revisions - type: string responses: '200': description: Retrieved entity @@ -2541,6 +2541,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -2576,12 +2577,12 @@ paths: - RejectedDate desc - DomainId - DomainId desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Id - Number @@ -2601,16 +2602,15 @@ paths: - RejectedDate - DomainId - Document - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - Document - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' @@ -2704,6 +2704,7 @@ paths: description: Order items by property values type: array items: + type: string enum: - Id - Id desc @@ -2739,7 +2740,6 @@ paths: - RejectedDate desc - DomainId - DomainId desc - type: string responses: '200': $ref: '#/responses/StringCollectionResponse' @@ -2825,26 +2825,26 @@ paths: description: Order items by property values type: array items: + type: string enum: - Name - Name desc - type: string - in: query name: $select description: Select properties to be returned type: array items: + type: string enum: - Name - type: string - in: query name: $expand description: Expand related entities type: array items: + type: string enum: - '*' - type: string responses: '200': $ref: '#/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' @@ -2957,15 +2957,87 @@ paths: $ref: '#/responses/error' x-description: Provides operations to count the resources in the collection. definitions: + Default.ODataErrors.ODataError: + type: object + required: + - error + properties: + error: + $ref: '#/definitions/Default.ODataErrors.MainError' + Default.ODataErrors.MainError: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: string + details: + type: array + items: + $ref: '#/definitions/Default.ODataErrors.ErrorDetails' + innerError: + $ref: '#/definitions/Default.ODataErrors.InnerError' + Default.ODataErrors.ErrorDetails: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + target: + type: string + Default.ODataErrors.InnerError: + type: object + description: The structure of this object is service-specific + ODataCountResponse: + type: number + format: int64 + StringCollectionResponse: + type: object + title: Collection of string + properties: + value: + type: array + items: + type: string + ReferenceUpdate: + type: object + properties: + '@odata.id': + type: string + '@odata.type': + type: string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + type: string + enum: + - '-INF' + - INF + - NaN Siterra.Documents.App.DTO.DocumentDto: - title: DocumentDto type: object + title: DocumentDto properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Description: @@ -2977,19 +3049,19 @@ definitions: Suffix: type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Tags: type: array items: @@ -3000,28 +3072,28 @@ definitions: $ref: '#/definitions/Siterra.Documents.App.DTO.RevisionDto' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Description: string Filename: string NumberOfRevisions: string Suffix: string - DomainId: number - ModificationDate: string (timestamp) - ModifiedBy: number + DomainId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 Tags: - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto Revisions: - '@odata.type': Siterra.Documents.App.DTO.RevisionDto Siterra.Documents.App.DTO.LibraryDto: - title: LibraryDto type: object + title: LibraryDto properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Number: @@ -3029,316 +3101,316 @@ definitions: Description: type: string LibraryTemplateId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ParentTypeId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ParentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number AllowMultiple: type: boolean AutoCreate: type: boolean TypeId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string Documents: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.DocumentDto' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Number: string Description: string - LibraryTemplateId: number - ParentTypeId: number - ParentId: number + LibraryTemplateId: 0 + ParentTypeId: 0 + ParentId: 0 AllowMultiple: true AutoCreate: true - TypeId: number - DomainId: number - CreatedBy: number - CreationDate: string (timestamp) - ModifiedBy: number - ModificationDate: string (timestamp) + 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 Siterra.Documents.App.DTO.RevisionDto: - title: RevisionDto type: object + title: RevisionDto properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Number: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentName: type: string DocumentDescription: type: string CreationDate: + type: string 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])$' - type: string CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsReviewed: type: boolean ReviewedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ReviewedDate: + type: string 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])$' - type: string IsApproved: type: boolean ApprovedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ApprovedDate: + type: string 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])$' - type: string IsRejected: type: boolean RejectedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number RejectedDate: + type: string 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])$' - type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Document: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' example: - Id: number (identifier) - Number: number - DocumentId: number + Id: 0 + Number: 0 + DocumentId: 0 DocumentName: string DocumentDescription: string - CreationDate: string (timestamp) - CreatedBy: number + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + CreatedBy: 0 IsReviewed: true - ReviewedBy: number - ReviewedDate: string (timestamp) + ReviewedBy: 0 + ReviewedDate: '0001-01-01T00:00:00.0000000+00:00' IsApproved: true - ApprovedBy: number - ApprovedDate: string (timestamp) + ApprovedBy: 0 + ApprovedDate: '0001-01-01T00:00:00.0000000+00:00' IsRejected: true - RejectedBy: number - RejectedDate: string (timestamp) - DomainId: number + RejectedBy: 0 + RejectedDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Document: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.App.DTO.CategoryDto: - title: CategoryDto type: object + title: CategoryDto properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Description: type: string CreationDate: + type: string 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])$' - type: string ModificationDate: + type: string 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])$' - type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number example: - Id: number (identifier) + Id: 0 Name: string Description: string - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - DomainId: number + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Siterra.Documents.App.DTO.DocumentTagRelDto: - title: DocumentTagRelDto type: object + title: DocumentTagRelDto properties: Name: type: string example: Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: - title: Document type: object + title: Document properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Description: type: string StatusId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number TypeId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Keywords: type: string CreationDate: + type: string 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])$' - type: string CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number LibraryId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number OwnerUserId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number StatusDate: + type: string 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])$' - type: string LastRevisionId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CheckoutDate: + type: string 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])$' - type: string CheckoutPath: type: string CheckoutUserId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Number: type: string OriginalDate: + type: string 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])$' - type: string FileSized: - format: decimal type: number + format: decimal FileClientPath: type: string LastRevisionFileId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsDeleted: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsNa: - format: decimal type: number - IsRejected: format: decimal + IsRejected: type: number - IsReviewed: format: decimal + IsReviewed: type: number + format: decimal NaDescription: type: string NaReason: @@ -3350,54 +3422,54 @@ definitions: ReviewDescription: type: string SourceDocumentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ScraperMapId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number LastDownloadedDate: + type: string 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])$' - type: string SmsId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsApprovedOld: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Suffix: type: string ScrapeResultId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsApproved: - format: decimal type: number + format: decimal CategoryId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SectionId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number VersionCount: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number LastFileName: type: string DocumentClasses: @@ -3425,49 +3497,49 @@ definitions: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Revision.Revision' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Description: string - StatusId: number - TypeId: number + StatusId: 0 + TypeId: 0 Keywords: string - CreationDate: string (timestamp) - CreatedBy: number - ModificationDate: string (timestamp) - ModifiedBy: number - DomainId: number - LibraryId: number - OwnerUserId: number - StatusDate: string (timestamp) - LastRevisionId: number - CheckoutDate: string (timestamp) + 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: number + CheckoutUserId: 0 Number: string - OriginalDate: string (timestamp) - FileSized: number + OriginalDate: '0001-01-01T00:00:00.0000000+00:00' + FileSized: 0 FileClientPath: string - LastRevisionFileId: number - IsDeleted: number - IsNa: number - IsRejected: number - IsReviewed: number + LastRevisionFileId: 0 + IsDeleted: 0 + IsNa: 0 + IsRejected: 0 + IsReviewed: 0 NaDescription: string NaReason: string RejectedDescription: string RejectedReason: string ReviewDescription: string - SourceDocumentId: number - ScraperMapId: number - LastDownloadedDate: string (timestamp) - SmsId: number - IsApprovedOld: number + SourceDocumentId: 0 + ScraperMapId: 0 + LastDownloadedDate: '0001-01-01T00:00:00.0000000+00:00' + SmsId: 0 + IsApprovedOld: 0 Suffix: string - ScrapeResultId: number - IsApproved: number - CategoryId: number - SectionId: number - VersionCount: number + ScrapeResultId: 0 + IsApproved: 0 + CategoryId: 0 + SectionId: 0 + VersionCount: 0 LastFileName: string DocumentClasses: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass @@ -3484,194 +3556,194 @@ definitions: Revisions: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass: - title: DocumentClass type: object + title: DocumentClass properties: ClassInstance: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ClassId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string IsPrimary: type: boolean Document: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' example: - ClassInstance: number - ClassId: number - DocumentId: number - CreatedBy: number - CreationDate: string (timestamp) - ModifiedBy: number - ModificationDate: string (timestamp) + 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 Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel: - title: DocumentTagRel type: object + title: DocumentTagRel properties: DocumentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number TagId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModificationDate: + type: string 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])$' - type: string Document: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' Tag: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' example: - DocumentId: number - TagId: number - DomainId: number - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + 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 Tag: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Tags.Tag Siterra.Documents.BusinessLogic.Entities.Library.Library: - title: Library type: object + title: Library properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string ParentFolderId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Number: type: string TypeId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number OwnerUserId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number TotalSize: - format: decimal type: number + format: decimal FilesCounter: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number FoldersCounter: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModificationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ProjectId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SearchRingId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SiteId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number AssetId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number AllowMultiple: type: boolean AutoCreate: @@ -3681,77 +3753,77 @@ definitions: IsTemplate: type: boolean ProgramId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SourceFolderId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number TemplateClassId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number TemplateSubType: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsHidden: type: boolean IsDeleted: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number StatusId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SmsId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ContractId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number VendorId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number OrganizationUnitId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IncidentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number EventId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ClassInstance: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ClassId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number LibraryParent: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.Library' Type: @@ -3774,43 +3846,43 @@ definitions: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.Library' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string - ParentFolderId: number + ParentFolderId: 0 Number: string - TypeId: number - OwnerUserId: number - TotalSize: number - FilesCounter: number - FoldersCounter: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - ModifiedBy: number - CreatedBy: number - ProjectId: number - SearchRingId: number - SiteId: number - AssetId: number + 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 Description: string IsTemplate: true - ProgramId: number - SourceFolderId: number - TemplateClassId: number - TemplateSubType: number + ProgramId: 0 + SourceFolderId: 0 + TemplateClassId: 0 + TemplateSubType: 0 IsHidden: true - IsDeleted: number - StatusId: number - SmsId: number - ContractId: number - VendorId: number - OrganizationUnitId: number - IncidentId: number - EventId: number - ClassInstance: number - ClassId: number + 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: @@ -3824,63 +3896,63 @@ definitions: SourceLibraryChildren: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library Siterra.Documents.BusinessLogic.Entities.Library.LibraryType: - title: LibraryType type: object + title: LibraryType properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string CreationDate: + type: string 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])$' - type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Description: type: string XmlName: type: string MasterId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Number: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ClassId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ParentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number HasChanged: type: boolean MasterLibraryType: @@ -3898,19 +3970,19 @@ definitions: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string - ModifiedBy: number - CreatedBy: number - ModificationDate: string (timestamp) - CreationDate: string (timestamp) - DomainId: number + ModifiedBy: 0 + CreatedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Description: string XmlName: string - MasterId: number - Number: number - ClassId: number - ParentId: number + MasterId: 0 + Number: 0 + ClassId: 0 + ParentId: 0 HasChanged: true MasterLibraryType: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType @@ -3921,170 +3993,170 @@ definitions: ChildrenLibraryTypes: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile: - title: DocumentFile type: object + title: DocumentFile properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Path: type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModificationDate: + type: string 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])$' - type: string Sized: - format: decimal type: number + format: decimal ActualName: type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number SourceClassId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ContentTypeId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ClientPath: type: string IsSelfHosted: + type: number format: int16 maximum: 32767 minimum: -32768 - type: number SmsId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Latitude: - format: decimal type: number - Longitude: format: decimal + Longitude: type: number + format: decimal Documents: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) + Id: 0 Name: string Path: string - ModifiedBy: number - CreatedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) - Sized: number + ModifiedBy: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Sized: 0 ActualName: string - DomainId: number - SourceClassId: number - ContentTypeId: number + DomainId: 0 + SourceClassId: 0 + ContentTypeId: 0 ClientPath: string - IsSelfHosted: number - SmsId: number - Latitude: number - Longitude: number + IsSelfHosted: 0 + SmsId: 0 + Latitude: 0 + Longitude: 0 Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Tag: - title: Tag type: object + title: Tag properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Name: type: string Description: type: string CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreationDate: + type: string 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])$' - type: string ModificationDate: + type: string 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])$' - type: string example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - - title: UserDefinedTag - type: object + - type: object + title: UserDefinedTag properties: Documents: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel Siterra.Documents.BusinessLogic.Entities.Tags.Section: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - - title: Section - type: object + - type: object + title: Section properties: Documents: type: array @@ -4092,21 +4164,21 @@ definitions: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Category: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - - title: Category - type: object + - type: object + title: Category properties: Documents: type: array @@ -4114,71 +4186,71 @@ definitions: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' x-ms-navigationProperty: true example: - Id: number (identifier) - DomainId: number + Id: 0 + DomainId: 0 Name: string Description: string - CreatedBy: number - ModifiedBy: number - CreationDate: string (timestamp) - ModificationDate: string (timestamp) + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Revision.Revision: - title: Revision type: object + title: Revision properties: Id: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Number: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ModificationDate: + type: string 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])$' - type: string CreationDate: + type: string 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])$' - type: string ModifiedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number CreatedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number Remarks: type: string FileId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentOwnerContact: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number DocumentDescription: type: string DocumentStatusDate: + type: string 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])$' - type: string DocumentFolder: type: string DocumentKeywords: @@ -4192,24 +4264,24 @@ definitions: DocumentNumber: type: string DomainId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsDeleted: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsReviewed: type: boolean ReviewDescription: type: string ReviewedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsRejected: type: boolean RejectedReason: @@ -4217,226 +4289,154 @@ definitions: RejectedDescription: type: string RejectedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number IsApproved: type: boolean ApprovedBy: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ReviewedDate: + type: string 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])$' - type: string RejectedDate: + type: string 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])$' - type: string ApprovedDate: + type: string 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])$' - type: string Document: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' example: - Id: number (identifier) - Number: number - DocumentId: number - ModificationDate: string (timestamp) - CreationDate: string (timestamp) - ModifiedBy: number - CreatedBy: number + Id: 0 + Number: 0 + DocumentId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 Remarks: string - FileId: number - DocumentOwnerContact: number + FileId: 0 + DocumentOwnerContact: 0 DocumentDescription: string - DocumentStatusDate: string (timestamp) + DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' DocumentFolder: string DocumentKeywords: string DocumentStatus: string DocumentType: string DocumentName: string DocumentNumber: string - DomainId: number - IsDeleted: number + DomainId: 0 + IsDeleted: 0 IsReviewed: true ReviewDescription: string - ReviewedBy: number + ReviewedBy: 0 IsRejected: true RejectedReason: string RejectedDescription: string - RejectedBy: number + RejectedBy: 0 IsApproved: true - ApprovedBy: number - ReviewedDate: string (timestamp) - RejectedDate: string (timestamp) - ApprovedDate: string (timestamp) + 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 - Default.ODataErrors.ODataError: - required: - - error - type: object - properties: - error: - $ref: '#/definitions/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 - details: - type: array - items: - $ref: '#/definitions/Default.ODataErrors.ErrorDetails' - innerError: - $ref: '#/definitions/Default.ODataErrors.InnerError' - Default.ODataErrors.ErrorDetails: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - target: - type: string - Default.ODataErrors.InnerError: - description: The structure of this object is service-specific - type: object - ODataCountResponse: - format: int64 - type: number Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: - title: Collection of DocumentDto type: object + title: Collection of DocumentDto properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.DocumentDto' Siterra.Documents.App.DTO.LibraryDtoCollectionResponse: - title: Collection of LibraryDto type: object + title: Collection of LibraryDto properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.LibraryDto' Siterra.Documents.App.DTO.RevisionDtoCollectionResponse: - title: Collection of RevisionDto type: object + title: Collection of RevisionDto properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.RevisionDto' Siterra.Documents.App.DTO.CategoryDtoCollectionResponse: - title: Collection of CategoryDto type: object + title: Collection of CategoryDto properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.CategoryDto' Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse: - title: Collection of Document type: object + title: Collection of Document properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document' Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse: - title: Collection of Revision type: object + title: Collection of Revision properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Revision.Revision' Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse: - title: Collection of Library type: object + title: Collection of Library properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.Library' Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse: - title: Collection of LibraryType type: object + title: Collection of LibraryType properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse: - title: Collection of Siterra.Documents.App.DTO.DocumentTagRelDto type: object + title: Collection of Siterra.Documents.App.DTO.DocumentTagRelDto properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.App.DTO.DocumentTagRelDto' Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse: - title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass type: object + title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass' Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse: - title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel type: object + title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel properties: value: type: array items: $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' - 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 - ReferenceCreate: - type: object - properties: - '@odata.id': - type: string - additionalProperties: - type: object - ReferenceNumeric: - enum: - - '-INF' - - INF - - NaN - type: string parameters: top: in: query From 51181c390d3d73f1afd2175826eb723debf96ecb Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 12:58:36 -0500 Subject: [PATCH 063/103] fix: minor fixes in trip service v2 json sample Signed-off-by: Vincent Biret --- .../Resources/TripService.OpenApi.V2.json | 1680 +++++++---------- 1 file changed, 636 insertions(+), 1044 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index 1e52c2b4b..f66b20163 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -1123,8 +1123,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -1156,8 +1156,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -2307,8 +2307,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -2339,8 +2339,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -3131,8 +3131,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -3171,8 +3171,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -3993,18 +3993,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.AddressInfo.GetCount-8488", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -4066,18 +4054,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-9375", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -4456,18 +4432,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -4529,18 +4493,6 @@ "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -4748,8 +4700,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -4780,8 +4732,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -5159,18 +5111,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -5250,18 +5190,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -5525,8 +5453,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -5565,8 +5493,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -6354,18 +6282,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -6445,18 +6361,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -6649,8 +6553,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -6689,8 +6593,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -7281,8 +7185,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -8043,18 +7947,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsManager.AddressInfo.GetCount-75da", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -8116,18 +8008,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-f67e", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -8506,18 +8386,6 @@ "summary": "Get the number of the resource", "operationId": "Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -8579,18 +8447,6 @@ "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e", "parameters": [ - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -8798,8 +8654,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -8830,8 +8686,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -9192,18 +9048,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -9283,18 +9127,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -9487,8 +9319,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -9527,8 +9359,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -10407,8 +10239,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -10447,8 +10279,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -11353,8 +11185,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -11846,8 +11678,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -11878,8 +11710,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -12311,8 +12143,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -13120,18 +12952,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -13197,18 +13017,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -13650,18 +13458,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -13741,18 +13537,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -14063,8 +13847,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -14103,8 +13887,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -14499,18 +14283,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -14592,18 +14364,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -14944,8 +14704,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -14985,8 +14745,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -15884,8 +15644,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -15917,8 +15677,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -16349,8 +16109,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -18181,8 +17941,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -18221,8 +17981,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -19142,8 +18902,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -19190,8 +18950,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -20177,18 +19937,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -20268,18 +20016,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -20732,18 +20468,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -20823,18 +20547,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -21086,8 +20798,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -21126,8 +20838,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -21561,18 +21273,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -21668,18 +21368,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -21983,8 +21671,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -22031,8 +21719,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -22950,18 +22638,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -23057,18 +22733,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -23293,8 +22957,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -23341,8 +23005,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -24021,8 +23685,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -24917,18 +24581,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -25008,18 +24660,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -25472,18 +25112,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -25563,18 +25191,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -25826,8 +25442,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -25866,8 +25482,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -26284,18 +25900,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -26391,18 +25995,6 @@ "type": "string", "x-ms-docs-key-type": "Person" }, - { - "in": "header", - "name": "ConsistencyLevel", - "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", - "type": "string", - "x-examples": { - "example-1": { - "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", - "value": "eventual" - } - } - }, { "$ref": "#/parameters/search" }, @@ -26627,8 +26219,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -26675,8 +26267,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -27699,8 +27291,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -27747,8 +27339,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -28791,8 +28383,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -29371,8 +28963,8 @@ "200": { "description": "Retrieved media content", "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } }, "default": { @@ -29416,8 +29008,8 @@ "description": "New media content.", "required": true, "schema": { - "format": "binary", - "type": "string" + "type": "string", + "format": "binary" } } ], @@ -29910,8 +29502,8 @@ "200": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -30697,158 +30289,469 @@ } }, "definitions": { - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { - "title": "Person", + "Edm.Geography": { + "$ref": "#/definitions/Edm.Geometry" + }, + "Edm.GeographyPoint": { + "$ref": "#/definitions/Edm.GeometryPoint" + }, + "Edm.GeographyLineString": { + "$ref": "#/definitions/Edm.GeometryLineString" + }, + "Edm.GeographyPolygon": { + "$ref": "#/definitions/Edm.GeometryPolygon" + }, + "Edm.GeographyMultiPoint": { + "$ref": "#/definitions/Edm.GeometryMultiPoint" + }, + "Edm.GeographyMultiLineString": { + "$ref": "#/definitions/Edm.GeometryMultiLineString" + }, + "Edm.GeographyMultiPolygon": { + "$ref": "#/definitions/Edm.GeometryMultiPolygon" + }, + "Edm.GeographyCollection": { + "$ref": "#/definitions/Edm.GeometryCollection" + }, + "Edm.Geometry": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Edm.GeometryPoint" + } + ] + }, + "Edm.GeometryPoint": { "type": "object", + "required": [ + "type", + "coordinates" + ], "properties": { - "UserName": { - "type": "string" - }, - "FirstName": { - "type": "string" - }, - "LastName": { - "type": "string" - }, - "MiddleName": { - "type": "string" - }, - "Gender": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + "type": { + "type": "string", + "default": "Point", + "enum": [ + "Point" + ] }, - "Age": { - "format": "int64", - "allOf": [ - { - "format": "int64", - "type": "number" - } + "coordinates": { + "$ref": "#/definitions/GeoJSON.position" + } + } + }, + "Edm.GeometryLineString": { + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "type": { + "enum": [ + "LineString" ] }, - "Emails": { + "coordinates": { "type": "array", + "minItems": 2, "items": { - "type": "string" + "$ref": "#/definitions/GeoJSON.position" } + } + } + }, + "Edm.GeometryPolygon": { + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "type": { + "enum": [ + "Polygon" + ] }, - "AddressInfo": { + "coordinates": { "type": "array", + "minItems": 4, "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + "type": "array", + "items": { + "$ref": "#/definitions/GeoJSON.position" + } } + } + } + }, + "Edm.GeometryMultiPoint": { + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "type": { + "enum": [ + "MultiPoint" + ] }, - "HomeAddress": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" - }, - "FavoriteFeature": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" - }, - "Features": { + "coordinates": { "type": "array", "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + "$ref": "#/definitions/GeoJSON.position" } + } + } + }, + "Edm.GeometryMultiLineString": { + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "type": { + "enum": [ + "MultiLineString" + ] }, - "Photo": { - "format": "base64url", - "type": "string" - }, - "Friends": { - "description": "Friends of person", + "coordinates": { "type": "array", + "minItems": 2, "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "x-ms-navigationProperty": true - }, - "BestFriend": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + "type": "array", + "items": { + "$ref": "#/definitions/GeoJSON.position" + } + } + } + } + }, + "Edm.GeometryMultiPolygon": { + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "type": { + "enum": [ + "MultiPolygon" + ] }, - "Trips": { - "description": "Collection of trips.", + "coordinates": { "type": "array", + "minItems": 4, "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" - }, - "x-ms-navigationProperty": true + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/GeoJSON.position" + } + } + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { - "title": "Airline", + "Edm.GeometryCollection": { "type": "object", + "required": [ + "type", + "coordinates" + ], "properties": { - "AirlineCode": { - "type": "string" + "type": { + "enum": [ + "GeometryCollection" + ] }, - "Name": { - "type": "string" + "coordinates": { + "type": "array", + "items": { + "$ref": "#/definitions/Edm.Geometry" + } } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { - "title": "Airport", + "GeoJSON.position": { + "type": "array", + "minItems": 2, + "items": { + "type": "number" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError": { "type": "object", + "required": [ + "error" + ], "properties": { - "Name": { - "type": "string" - }, - "IcaoCode": { - "type": "string" - }, - "IataCode": { - "type": "string" - }, - "Location": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + "error": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError" } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { - "title": "Location", + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError": { "type": "object", + "required": [ + "code", + "message" + ], "properties": { - "Address": { + "code": { "type": "string" }, - "City": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError" } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { - "title": "City", + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails": { "type": "object", + "required": [ + "code", + "message" + ], "properties": { - "Name": { + "code": { "type": "string" }, - "CountryRegion": { + "message": { "type": "string" }, - "Region": { + "target": { "type": "string" } } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { - "allOf": [ - { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError": { + "type": "object", + "title": "InnerError", + "properties": { + "Date": { + "type": "string", + "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])$" }, - { - "title": "AirportLocation", - "type": "object", - "properties": { - "Loc": { - "$ref": "#/definitions/Edm.GeographyPoint" - }, - "EmergencyAuthority": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - } - } + "RequestId": { + "type": "string" } - ] + } + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "StringCollectionResponse": { + "type": "object", + "title": "Collection of string", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": "string" + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "type": "string", + "enum": [ + "-INF", + "INF", + "NaN" + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { + "type": "object", + "title": "Person", + "properties": { + "UserName": { + "type": "string" + }, + "FirstName": { + "type": "string" + }, + "LastName": { + "type": "string" + }, + "MiddleName": { + "type": "string" + }, + "Gender": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": { + "format": "int64", + "allOf": [ + { + "type": "number", + "format": "int64" + } + ] + }, + "Emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "AddressInfo": { + "type": "array", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + }, + "HomeAddress": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "FavoriteFeature": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": { + "type": "array", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + }, + "Photo": { + "type": "string", + "format": "base64url" + }, + "Friends": { + "type": "array", + "description": "Friends of person", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true + }, + "BestFriend": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": { + "type": "array", + "description": "Collection of trips.", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + }, + "x-ms-navigationProperty": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { + "type": "object", + "title": "Airline", + "properties": { + "AirlineCode": { + "type": "string" + }, + "Name": { + "type": "string" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { + "type": "object", + "title": "Airport", + "properties": { + "Name": { + "type": "string" + }, + "IcaoCode": { + "type": "string" + }, + "IataCode": { + "type": "string" + }, + "Location": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { + "type": "object", + "title": "Location", + "properties": { + "Address": { + "type": "string" + }, + "City": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { + "type": "object", + "title": "City", + "properties": { + "Name": { + "type": "string" + }, + "CountryRegion": { + "type": "string" + }, + "Region": { + "type": "string" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { + "allOf": [ + { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "type": "object", + "title": "AirportLocation", + "properties": { + "Loc": { + "$ref": "#/definitions/Edm.GeographyPoint" + }, + "EmergencyAuthority": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + ] }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { "allOf": [ @@ -30856,8 +30759,8 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, { - "title": "EventLocation", "type": "object", + "title": "EventLocation", "properties": { "BuildingInfo": { "type": "string" @@ -30867,19 +30770,19 @@ ] }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { - "title": "Trip", "type": "object", + "title": "Trip", "properties": { "TripId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ShareId": { + "type": "string", "format": "uuid", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - "type": "string" + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "Name": { "type": "string" @@ -30888,8 +30791,8 @@ "format": "float", "allOf": [ { - "format": "float", - "type": "number" + "type": "number", + "format": "float" } ] }, @@ -30908,14 +30811,14 @@ "items": { } }, "StartsAt": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "EndsAt": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "PlanItems": { "type": "array", @@ -30927,32 +30830,32 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { - "title": "PlanItem", "type": "object", + "title": "PlanItem", "properties": { "PlanItemId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "ConfirmationCode": { "type": "string" }, "StartsAt": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "EndsAt": { + "type": "string", "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])$", - "type": "string" + "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])$" }, "Duration": { + "type": "string", "format": "duration", - "pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$", - "type": "string" + "pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$" } } }, @@ -30962,8 +30865,8 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" }, { - "title": "Event", "type": "object", + "title": "Event", "properties": { "OccursAt": { "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" @@ -30981,8 +30884,8 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" }, { - "title": "PublicTransportation", "type": "object", + "title": "PublicTransportation", "properties": { "SeatNumber": { "type": "string" @@ -30997,8 +30900,8 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation" }, { - "title": "Flight", "type": "object", + "title": "Flight", "properties": { "FlightNumber": { "type": "string" @@ -31013,386 +30916,117 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" } } - } - ] - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { - "allOf": [ - { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - { - "title": "Employee", - "type": "object", - "properties": { - "Cost": { - "format": "int64", - "allOf": [ - { - "format": "int64", - "type": "number" - } - ] - }, - "Peers": { - "type": "array", - "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "x-ms-navigationProperty": true - } - } - } - ] - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { - "allOf": [ - { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - { - "title": "Manager", - "type": "object", - "properties": { - "Budget": { - "format": "int64", - "allOf": [ - { - "format": "int64", - "type": "number" - } - ] - }, - "BossOffice": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" - }, - "DirectReports": { - "type": "array", - "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" - }, - "x-ms-navigationProperty": true - } - } - } - ] - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { - "title": "PersonGender", - "description": "Gender of the person.", - "enum": [ - "Male", - "Female", - "Unknow" - ], - "type": "string", - "x-ms-enum": { - "name": "PersonGender", - "modelAsString": false, - "values": [ - { - "value": "Male", - "description": "The Male gender.", - "name": "Male" - }, - { - "value": "Female", - "description": "The Female gender.", - "name": "Female" - }, - { - "value": "Unknow", - "description": "Unknown gender or prefers not to say.", - "name": "Unknow" - } - ] - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature": { - "title": "Feature", - "enum": [ - "Feature1", - "Feature2", - "Feature3", - "Feature4" - ], - "type": "string", - "x-ms-enum-flags": { - "isFlags": true - } - }, - "Edm.Geography": { - "$ref": "#/definitions/Edm.Geometry" - }, - "Edm.GeographyPoint": { - "$ref": "#/definitions/Edm.GeometryPoint" - }, - "Edm.GeographyLineString": { - "$ref": "#/definitions/Edm.GeometryLineString" - }, - "Edm.GeographyPolygon": { - "$ref": "#/definitions/Edm.GeometryPolygon" - }, - "Edm.GeographyMultiPoint": { - "$ref": "#/definitions/Edm.GeometryMultiPoint" - }, - "Edm.GeographyMultiLineString": { - "$ref": "#/definitions/Edm.GeometryMultiLineString" - }, - "Edm.GeographyMultiPolygon": { - "$ref": "#/definitions/Edm.GeometryMultiPolygon" - }, - "Edm.GeographyCollection": { - "$ref": "#/definitions/Edm.GeometryCollection" - }, - "Edm.Geometry": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Edm.GeometryPoint" - } - ] - }, - "Edm.GeometryPoint": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "default": "Point", - "enum": [ - "Point" - ], - "type": "string" - }, - "coordinates": { - "$ref": "#/definitions/GeoJSON.position" - } - } - }, - "Edm.GeometryLineString": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "LineString" - ] - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSON.position" - } - } - } - }, - "Edm.GeometryPolygon": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "Polygon" - ] - }, - "coordinates": { - "minItems": 4, - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSON.position" - } - } - } - } - }, - "Edm.GeometryMultiPoint": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiPoint" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSON.position" - } - } - } - }, - "Edm.GeometryMultiLineString": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiLineString" - ] - }, - "coordinates": { - "minItems": 2, - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/GeoJSON.position" - } - } - } - } - }, - "Edm.GeometryMultiPolygon": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "MultiPolygon" - ] + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "allOf": [ + { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, - "coordinates": { - "minItems": 4, - "type": "array", - "items": { - "type": "array", - "items": { + { + "type": "object", + "title": "Employee", + "properties": { + "Cost": { + "format": "int64", + "allOf": [ + { + "type": "number", + "format": "int64" + } + ] + }, + "Peers": { "type": "array", "items": { - "$ref": "#/definitions/GeoJSON.position" - } + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true } } } - } + ] }, - "Edm.GeometryCollection": { - "required": [ - "type", - "coordinates" - ], - "type": "object", - "properties": { - "type": { - "enum": [ - "GeometryCollection" - ] + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "allOf": [ + { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/definitions/Edm.Geometry" + { + "type": "object", + "title": "Manager", + "properties": { + "Budget": { + "format": "int64", + "allOf": [ + { + "type": "number", + "format": "int64" + } + ] + }, + "BossOffice": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "DirectReports": { + "type": "array", + "items": { + "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true + } } } - } - }, - "GeoJSON.position": { - "minItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError": { - "required": [ - "error" - ], - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError" - } - } + ] }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError": { - "required": [ - "code", - "message" + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { + "type": "string", + "description": "Gender of the person.", + "title": "PersonGender", + "enum": [ + "Male", + "Female", + "Unknow" ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string", - "x-ms-primary-error-message": true - }, - "target": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails" + "x-ms-enum": { + "name": "PersonGender", + "modelAsString": false, + "values": [ + { + "value": "Male", + "description": "The Male gender.", + "name": "Male" + }, + { + "value": "Female", + "description": "The Female gender.", + "name": "Female" + }, + { + "value": "Unknow", + "description": "Unknown gender or prefers not to say.", + "name": "Unknow" } - }, - "innerError": { - "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError" - } + ] } }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails": { - "required": [ - "code", - "message" + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature": { + "type": "string", + "title": "Feature", + "enum": [ + "Feature1", + "Feature2", + "Feature3", + "Feature4" ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError": { - "title": "InnerError", - "type": "object", - "properties": { - "Date": { - "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])$", - "type": "string" - }, - "RequestId": { - "type": "string" - } + "x-ms-enum-flags": { + "isFlags": true } }, - "ODataCountResponse": { - "format": "int64", - "type": "number" - }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -31403,8 +31037,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse": { - "title": "Collection of Airline", "type": "object", + "title": "Collection of Airline", "properties": { "value": { "type": "array", @@ -31415,8 +31049,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse": { - "title": "Collection of Airport", "type": "object", + "title": "Collection of Airport", "properties": { "value": { "type": "array", @@ -31427,8 +31061,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse": { - "title": "Collection of Trip", "type": "object", + "title": "Collection of Trip", "properties": { "value": { "type": "array", @@ -31439,8 +31073,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse": { - "title": "Collection of PlanItem", "type": "object", + "title": "Collection of PlanItem", "properties": { "value": { "type": "array", @@ -31451,8 +31085,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse": { - "title": "Collection of Employee", "type": "object", + "title": "Collection of Employee", "properties": { "value": { "type": "array", @@ -31463,8 +31097,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse": { - "title": "Collection of Manager", "type": "object", + "title": "Collection of Manager", "properties": { "value": { "type": "array", @@ -31475,8 +31109,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse": { - "title": "Collection of Event", "type": "object", + "title": "Collection of Event", "properties": { "value": { "type": "array", @@ -31487,8 +31121,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse": { - "title": "Collection of PublicTransportation", "type": "object", + "title": "Collection of PublicTransportation", "properties": { "value": { "type": "array", @@ -31499,8 +31133,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse": { - "title": "Collection of Flight", "type": "object", + "title": "Collection of Flight", "properties": { "value": { "type": "array", @@ -31511,8 +31145,8 @@ } }, "Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse": { - "title": "Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location", "type": "object", + "title": "Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location", "properties": { "value": { "type": "array", @@ -31521,48 +31155,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" - } - } - }, - "ReferenceCreate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - } - }, - "additionalProperties": { - "type": "object" - } - }, - "ReferenceNumeric": { - "enum": [ - "-INF", - "INF", - "NaN" - ], - "type": "string" } }, "parameters": { @@ -31630,10 +31222,10 @@ "type": "string" }, "tripId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 } } } @@ -31650,10 +31242,10 @@ "type": "string" }, "tripId": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 } } } @@ -31753,8 +31345,8 @@ "GetFriendsTripsResponse": { "description": "Success", "schema": { - "title": "Collection of Trip", "type": "object", + "title": "Collection of Trip", "properties": { "value": { "type": "array", @@ -31771,8 +31363,8 @@ "type": "object", "properties": { "value": { - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } } } @@ -31780,8 +31372,8 @@ "GetPeersForTripResponse": { "description": "Success", "schema": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", From 5e62a6890d030ac06a0e534444028f04d6cabc85 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 13:27:27 -0500 Subject: [PATCH 064/103] fix: minor fixes for trip service v2 yaml sample Signed-off-by: Vincent Biret --- .../Resources/TripService.OpenApi.V2.yaml | 976 +++++++----------- 1 file changed, 352 insertions(+), 624 deletions(-) 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 ad35b6435..2e7aed9c4 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 @@ -739,8 +739,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' put: @@ -762,8 +762,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -1537,8 +1537,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -1560,8 +1560,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -2098,8 +2098,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -2127,8 +2127,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -2666,14 +2666,6 @@ paths: summary: Get the number of the resource operationId: Me.AsEmployee.AddressInfo.GetCount-8488 parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -2715,14 +2707,6 @@ paths: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-9375 parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -2979,14 +2963,6 @@ paths: summary: Get the number of the resource operationId: Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -3028,14 +3004,6 @@ paths: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -3178,8 +3146,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -3201,8 +3169,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -3454,14 +3422,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -3516,14 +3476,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -3706,8 +3658,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -3735,8 +3687,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -4257,14 +4209,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -4319,14 +4263,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -4460,8 +4396,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -4489,8 +4425,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -4891,8 +4827,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -5403,14 +5339,6 @@ paths: summary: Get the number of the resource operationId: Me.AsManager.AddressInfo.GetCount-75da parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -5452,14 +5380,6 @@ paths: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-f67e parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -5716,14 +5636,6 @@ paths: summary: Get the number of the resource operationId: Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6 parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -5765,14 +5677,6 @@ paths: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e parameters: - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -5915,8 +5819,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -5938,8 +5842,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -6179,14 +6083,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -6241,14 +6137,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -6382,8 +6270,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -6411,8 +6299,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -7004,8 +6892,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -7033,8 +6921,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -7644,8 +7532,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -7983,8 +7871,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -8006,8 +7894,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -8304,8 +8192,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -8843,14 +8731,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -8893,14 +8773,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -9203,14 +9075,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -9265,14 +9129,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -9488,8 +9344,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -9517,8 +9373,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -9779,14 +9635,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -9841,14 +9689,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -10080,8 +9920,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' put: @@ -10109,8 +9949,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -10692,8 +10532,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' put: @@ -10715,8 +10555,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -11007,8 +10847,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -12251,8 +12091,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -12280,8 +12120,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -12915,8 +12755,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -12950,8 +12790,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -13612,14 +13452,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -13674,14 +13506,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -13993,14 +13817,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -14055,14 +13871,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -14237,8 +14045,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -14266,8 +14074,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -14561,14 +14369,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -14635,14 +14435,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -14855,8 +14647,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -14890,8 +14682,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -15509,14 +15301,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -15583,14 +15367,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -15748,8 +15524,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -15783,8 +15559,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -16251,8 +16027,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -16862,14 +16638,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -16924,14 +16692,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -17243,14 +17003,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -17305,14 +17057,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -17487,8 +17231,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -17516,8 +17260,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -17799,14 +17543,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -17873,14 +17609,6 @@ paths: required: true type: string x-ms-docs-key-type: Person - - in: header - name: ConsistencyLevel - description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' - type: string - x-examples: - example-1: - description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. - value: eventual - $ref: '#/parameters/search' - $ref: '#/parameters/filter' responses: @@ -18038,8 +17766,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -18073,8 +17801,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -18774,8 +18502,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -18809,8 +18537,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -19523,8 +19251,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -19927,8 +19655,8 @@ paths: '200': description: Retrieved media content schema: - format: binary type: string + format: binary default: $ref: '#/responses/error' deprecated: true @@ -19960,8 +19688,8 @@ paths: description: New media content. required: true schema: - format: binary type: string + format: binary responses: '204': description: Success @@ -20304,8 +20032,8 @@ paths: '200': description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array @@ -20828,69 +20556,276 @@ paths: x-ms-docs-operation-type: actionImport x-description: Provides operations to call the ResetDataSource method. definitions: - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: - title: Person + Edm.Geography: + $ref: '#/definitions/Edm.Geometry' + Edm.GeographyPoint: + $ref: '#/definitions/Edm.GeometryPoint' + Edm.GeographyLineString: + $ref: '#/definitions/Edm.GeometryLineString' + Edm.GeographyPolygon: + $ref: '#/definitions/Edm.GeometryPolygon' + Edm.GeographyMultiPoint: + $ref: '#/definitions/Edm.GeometryMultiPoint' + Edm.GeographyMultiLineString: + $ref: '#/definitions/Edm.GeometryMultiLineString' + Edm.GeographyMultiPolygon: + $ref: '#/definitions/Edm.GeometryMultiPolygon' + Edm.GeographyCollection: + $ref: '#/definitions/Edm.GeometryCollection' + Edm.Geometry: + type: object + allOf: + - $ref: '#/definitions/Edm.GeometryPoint' + Edm.GeometryPoint: type: object + required: + - type + - coordinates properties: - UserName: - type: string - FirstName: - type: string - LastName: - type: string - MiddleName: + type: type: string - Gender: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' - Age: - format: int64 - allOf: - - format: int64 - type: number - Emails: + default: Point + enum: + - Point + coordinates: + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryLineString: + type: object + required: + - type + - coordinates + properties: + type: + enum: + - LineString + coordinates: type: array + minItems: 2 items: - type: string - AddressInfo: + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryPolygon: + type: object + required: + - type + - coordinates + properties: + type: + enum: + - Polygon + coordinates: type: array + minItems: 4 items: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - HomeAddress: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - FavoriteFeature: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' - Features: + type: array + items: + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryMultiPoint: + type: object + required: + - type + - coordinates + properties: + type: + enum: + - MultiPoint + coordinates: type: array items: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' - Photo: - format: base64url - type: string - Friends: - description: Friends of person + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryMultiLineString: + type: object + required: + - type + - coordinates + properties: + type: + enum: + - MultiLineString + coordinates: type: array + minItems: 2 items: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - x-ms-navigationProperty: true - BestFriend: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - Trips: - description: Collection of trips. + type: array + items: + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryMultiPolygon: + type: object + required: + - type + - coordinates + properties: + type: + enum: + - MultiPolygon + coordinates: type: array + minItems: 4 items: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' - x-ms-navigationProperty: true - Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: - title: Airline + type: array + items: + type: array + items: + $ref: '#/definitions/GeoJSON.position' + Edm.GeometryCollection: type: object - properties: + required: + - type + - coordinates + properties: + type: + enum: + - GeometryCollection + coordinates: + type: array + items: + $ref: '#/definitions/Edm.Geometry' + GeoJSON.position: + type: array + minItems: 2 + items: + type: number + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError: + type: object + required: + - error + properties: + error: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: string + details: + type: array + items: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails' + innerError: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails: + type: object + required: + - code + - message + properties: + code: + type: string + message: + type: string + target: + type: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: + type: object + title: InnerError + properties: + Date: + type: string + 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])$' + RequestId: + type: string + ODataCountResponse: + type: number + format: int64 + StringCollectionResponse: + type: object + title: Collection of string + properties: + value: + type: array + items: + type: string + ReferenceUpdate: + type: object + properties: + '@odata.id': + type: string + '@odata.type': + type: string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + type: string + enum: + - '-INF' + - INF + - NaN + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: + type: object + title: Person + properties: + UserName: + type: string + FirstName: + type: string + LastName: + type: string + MiddleName: + type: string + Gender: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' + Age: + format: int64 + allOf: + - type: number + format: int64 + Emails: + type: array + items: + type: string + AddressInfo: + type: array + items: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + HomeAddress: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + FavoriteFeature: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Features: + type: array + items: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Photo: + type: string + format: base64url + Friends: + type: array + description: Friends of person + items: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + x-ms-navigationProperty: true + BestFriend: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + Trips: + type: array + description: Collection of trips. + items: + $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: + type: object + title: Airline + properties: AirlineCode: type: string Name: type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: - title: Airport type: object + title: Airport properties: Name: type: string @@ -20901,16 +20836,16 @@ definitions: Location: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: - title: Location type: object + title: Location properties: Address: type: string City: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: - title: City type: object + title: City properties: Name: type: string @@ -20921,8 +20856,8 @@ definitions: Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - title: AirportLocation - type: object + - type: object + title: AirportLocation properties: Loc: $ref: '#/definitions/Edm.GeographyPoint' @@ -20931,31 +20866,31 @@ definitions: Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - title: EventLocation - type: object + - type: object + title: EventLocation properties: BuildingInfo: type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: - title: Trip type: object + title: Trip properties: TripId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ShareId: + type: string format: uuid pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' - type: string Name: type: string Budget: format: float allOf: - - format: float - type: number + - type: number + format: float Description: type: string Tags: @@ -20967,46 +20902,46 @@ definitions: type: array items: { } StartsAt: + type: string 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])$' - type: string EndsAt: + type: string 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])$' - type: string PlanItems: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: - title: PlanItem type: object + title: PlanItem properties: PlanItemId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number ConfirmationCode: type: string StartsAt: + type: string 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])$' - type: string EndsAt: + type: string 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])$' - type: string Duration: + type: string format: duration pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$' - type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - - title: Event - type: object + - type: object + title: Event properties: OccursAt: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' @@ -21015,16 +20950,16 @@ definitions: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - - title: PublicTransportation - type: object + - type: object + title: PublicTransportation properties: SeatNumber: type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' - - title: Flight - type: object + - type: object + title: Flight properties: FlightNumber: type: string @@ -21037,14 +20972,14 @@ definitions: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - title: Employee - type: object + - type: object + title: Employee properties: Cost: format: int64 allOf: - - format: int64 - type: number + - type: number + format: int64 Peers: type: array items: @@ -21053,14 +20988,14 @@ definitions: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - title: Manager - type: object + - type: object + title: Manager properties: Budget: format: int64 allOf: - - format: int64 - type: number + - type: number + format: int64 BossOffice: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' DirectReports: @@ -21069,13 +21004,13 @@ definitions: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender: - title: PersonGender + type: string description: Gender of the person. + title: PersonGender enum: - Male - Female - Unknow - type: string x-ms-enum: name: PersonGender modelAsString: false @@ -21090,310 +21025,103 @@ definitions: description: Unknown gender or prefers not to say. name: Unknow Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature: + type: string title: Feature enum: - Feature1 - Feature2 - Feature3 - Feature4 - type: string x-ms-enum-flags: isFlags: true - Edm.Geography: - $ref: '#/definitions/Edm.Geometry' - Edm.GeographyPoint: - $ref: '#/definitions/Edm.GeometryPoint' - Edm.GeographyLineString: - $ref: '#/definitions/Edm.GeometryLineString' - Edm.GeographyPolygon: - $ref: '#/definitions/Edm.GeometryPolygon' - Edm.GeographyMultiPoint: - $ref: '#/definitions/Edm.GeometryMultiPoint' - Edm.GeographyMultiLineString: - $ref: '#/definitions/Edm.GeometryMultiLineString' - Edm.GeographyMultiPolygon: - $ref: '#/definitions/Edm.GeometryMultiPolygon' - Edm.GeographyCollection: - $ref: '#/definitions/Edm.GeometryCollection' - Edm.Geometry: - type: object - allOf: - - $ref: '#/definitions/Edm.GeometryPoint' - Edm.GeometryPoint: - required: - - type - - coordinates - type: object - properties: - type: - default: Point - enum: - - Point - type: string - coordinates: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryLineString: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - LineString - coordinates: - minItems: 2 - type: array - items: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryPolygon: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - Polygon - coordinates: - minItems: 4 - type: array - items: - type: array - items: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryMultiPoint: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiPoint - coordinates: - type: array - items: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryMultiLineString: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiLineString - coordinates: - minItems: 2 - type: array - items: - type: array - items: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryMultiPolygon: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - MultiPolygon - coordinates: - minItems: 4 - type: array - items: - type: array - items: - type: array - items: - $ref: '#/definitions/GeoJSON.position' - Edm.GeometryCollection: - required: - - type - - coordinates - type: object - properties: - type: - enum: - - GeometryCollection - coordinates: - type: array - items: - $ref: '#/definitions/Edm.Geometry' - GeoJSON.position: - minItems: 2 - type: array - items: - type: number - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError: - required: - - error - type: object - properties: - error: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError' - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - x-ms-primary-error-message: true - target: - type: string - details: - type: array - items: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails' - innerError: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError' - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails: - required: - - code - - message - type: object - properties: - code: - type: string - message: - type: string - target: - type: string - Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: - title: InnerError - type: object - properties: - Date: - 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])$' - type: string - RequestId: - type: string - ODataCountResponse: - format: int64 - type: number Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse: - title: Collection of Airline type: object + title: Collection of Airline properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse: - title: Collection of Airport type: object + title: Collection of Airport properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse: - title: Collection of Trip type: object + title: Collection of Trip properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse: - title: Collection of PlanItem type: object + title: Collection of PlanItem properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse: - title: Collection of Employee type: object + title: Collection of Employee properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse: - title: Collection of Manager type: object + title: Collection of Manager properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse: - title: Collection of Event type: object + title: Collection of Event properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event' Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse: - title: Collection of PublicTransportation type: object + title: Collection of PublicTransportation properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse: - title: Collection of Flight type: object + title: Collection of Flight properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight' Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse: - title: Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location type: object + title: Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location properties: value: type: array items: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - 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 - ReferenceCreate: - type: object - properties: - '@odata.id': - type: string - additionalProperties: - type: object - ReferenceNumeric: - enum: - - '-INF' - - INF - - NaN - type: string parameters: top: in: query @@ -21449,10 +21177,10 @@ parameters: userName: type: string tripId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number GetPeersForTripRequestBody: in: body name: body @@ -21464,10 +21192,10 @@ parameters: userName: type: string tripId: + type: number format: int32 maximum: 2147483647 minimum: -2147483648 - type: number responses: error: description: error @@ -21532,8 +21260,8 @@ responses: GetFriendsTripsResponse: description: Success schema: - title: Collection of Trip type: object + title: Collection of Trip properties: value: type: array @@ -21545,13 +21273,13 @@ responses: type: object properties: value: - default: false type: boolean + default: false GetPeersForTripResponse: description: Success schema: - title: Collection of Person type: object + title: Collection of Person properties: value: type: array From 3d02b91ece1833625a5f8781144a5af5cd2aa730 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 13:37:58 -0500 Subject: [PATCH 065/103] ci: adds a validation workflow for all descriptions Signed-off-by: Vincent Biret --- .github/workflows/validate-descriptions.yml | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/validate-descriptions.yml diff --git a/.github/workflows/validate-descriptions.yml b/.github/workflows/validate-descriptions.yml new file mode 100644 index 000000000..a15372e80 --- /dev/null +++ b/.github/workflows/validate-descriptions.yml @@ -0,0 +1,36 @@ +name: OpenAPI Parser Validation for latest OpenAPI docs + +on: + push: + branches: [ main, support/v1 ] + pull_request: + branches: [ main, support/v1 ] + +jobs: + + list-descriptions: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-descriptions.outputs.matrix }} + steps: + - uses: actions/checkout@v4 + - id: set-descriptions + run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | sed 's/\.[^.]*$//' | jq -R -s -c 'split("\n")[:-1]')" + + build: + needs: list-descriptions + strategy: + matrix: + descriptions: ${{ fromJson(needs.list-descriptions.outputs.matrix) }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Validate description with redocly + uses: fluximus-prime/redocly-cli-github-action@v1 + with: + args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000' \ No newline at end of file From 38f0b71be21ac0f1b8d7673faf4b86ac796ab90e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 13:40:51 -0500 Subject: [PATCH 066/103] ci: fix removes extension trimming Signed-off-by: Vincent Biret --- .github/workflows/validate-descriptions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-descriptions.yml b/.github/workflows/validate-descriptions.yml index a15372e80..a9a0d36df 100644 --- a/.github/workflows/validate-descriptions.yml +++ b/.github/workflows/validate-descriptions.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - id: set-descriptions - run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | sed 's/\.[^.]*$//' | jq -R -s -c 'split("\n")[:-1]')" + run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | jq -R -s -c 'split("\n")[:-1]')" build: needs: list-descriptions From 1cf33a9f96346e8ec794cee62615ddf68a30f068 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:07:53 -0500 Subject: [PATCH 067/103] chore: refactors integration tests Signed-off-by: Vincent Biret --- .../EdmModelOpenApiExtensionsTest.cs | 221 +++++------------- .../Resources/TripService.OpenApi.V2.yaml | 2 +- .../Resources/TripService.OpenApi.yaml | 2 +- 3 files changed, 58 insertions(+), 167 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index ea0405785..eafb36e72 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -33,9 +33,11 @@ public void ConvertToOpenApiThrowsArgumentNullModel() } [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; @@ -46,50 +48,19 @@ public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) }; // Act - string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); - _output.WriteLine(json); - var parsedJson = JsonNode.Parse(json); - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Empty.OpenApi.V2.json", - OpenApiSpecVersion.OpenApi3_0 => "Empty.OpenApi.json", - _ => throw new NotImplementedException() - }; + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + var fileName = $"Empty.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); + AssertDocumentsAreEqual(result, fileName, format); } [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void EmptyEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVersion) - { - // Arrange - IEdmModel model = EdmModelHelper.EmptyModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - IncludeAssemblyInfo = false - }; - - // Act - string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); - _output.WriteLine(yaml); - - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Empty.OpenApi.V2.yaml", - OpenApiSpecVersion.OpenApi3_0 => "Empty.OpenApi.yaml", - _ => throw new NotImplementedException() - }; - - // Assert - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); - } - - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void BasicEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; @@ -102,83 +73,19 @@ public void BasicEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) }; // Act - string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); - _output.WriteLine(json); - var parsedJson = JsonNode.Parse(json); - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Basic.OpenApi.V2.json", - OpenApiSpecVersion.OpenApi3_0 => "Basic.OpenApi.json", - _ => throw new NotImplementedException() - }; - - // Assert - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); - } - - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void BasicEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVersion) - { - // Arrange - IEdmModel model = EdmModelHelper.BasicEdmModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - ShowSchemaExamples = true, - IncludeAssemblyInfo = false, - UseStringArrayForQueryOptionsSchema = false - }; - - // Act - string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); - _output.WriteLine(yaml); - - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Basic.OpenApi.V2.yaml", - OpenApiSpecVersion.OpenApi3_0 => "Basic.OpenApi.yaml", - _ => throw new NotImplementedException() - }; - - // Assert - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); - } - - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void MultipleSchemasEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion) - { - // Arrange - IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - ShowLinks = true, // test Links - ShowSchemaExamples = true, - IncludeAssemblyInfo = false, - UseStringArrayForQueryOptionsSchema = false - }; - - // Act - string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); - _output.WriteLine(json); - - var parsedJson = JsonNode.Parse(json); - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Multiple.Schema.OpenApi.V2.json", - OpenApiSpecVersion.OpenApi3_0 => "Multiple.Schema.OpenApi.json", - _ => throw new NotImplementedException() - }; + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + var fileName = $"Basic.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); + AssertDocumentsAreEqual(result, fileName, format); } [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void MultipleSchemasEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVersion) + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; @@ -192,23 +99,20 @@ public void MultipleSchemasEdmModelToOpenApiYamlWorks(OpenApiSpecVersion specVer }; // Act - string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); - _output.WriteLine(yaml); + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "Multiple.Schema.OpenApi.V2.yaml", - OpenApiSpecVersion.OpenApi3_0 => "Multiple.Schema.OpenApi.yaml", - _ => throw new NotImplementedException() - }; + var fileName = $"Multiple.Schema.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); + AssertDocumentsAreEqual(result, fileName, format); } [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void TripServiceMetadataToOpenApiJsonWorks(OpenApiSpecVersion specVersion) + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; @@ -225,55 +129,42 @@ public void TripServiceMetadataToOpenApiJsonWorks(OpenApiSpecVersion specVersion IncludeAssemblyInfo = false }; // Act - string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, settings); - _output.WriteLine(json); - var parsedJson = JsonNode.Parse(json); + string result = WriteEdmModelAsOpenApi(model, format, settings); - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "TripService.OpenApi.V2.json", - OpenApiSpecVersion.OpenApi3_0 => "TripService.OpenApi.json", - _ => throw new NotImplementedException() - }; + var fileName = $"TripService.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); + AssertDocumentsAreEqual(result, fileName, format); } - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0)] - [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void TripServiceMetadataToOpenApiYamlWorks(OpenApiSpecVersion specVersion) + private void AssertDocumentsAreEqual(string result, string fileName, OpenApiFormat format) { - // Arrange - IEdmModel model = EdmModelHelper.TripServiceModel; - - OpenApiConvertSettings settings = new OpenApiConvertSettings + _output.WriteLine(result); + if (format is OpenApiFormat.Json) { - EnableKeyAsSegment = true, - SemVerVersion = "1.2.3", - ServiceRoot = new Uri("http://services.odata.org/TrippinRESTierService"), - IEEE754Compatible = true, - OpenApiSpecVersion = specVersion, - AddSingleQuotesForStringParameters = true, - AddEnumDescriptionExtension = true, - AppendBoundOperationsOnDerivedTypeCastSegments = true, - IncludeAssemblyInfo = false - }; - - // Act - string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, settings); - _output.WriteLine(yaml); - - var fileName = specVersion switch { - OpenApiSpecVersion.OpenApi2_0 => "TripService.OpenApi.V2.yaml", - OpenApiSpecVersion.OpenApi3_0 => "TripService.OpenApi.yaml", - _ => throw new NotImplementedException() - }; - - // Assert - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), yaml); + var parsedJson = JsonNode.Parse(result); + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); + } + else + { + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), result); + } } + private static string GetFormatExt(OpenApiFormat format) => + format switch { + OpenApiFormat.Json => "json", + OpenApiFormat.Yaml => "yaml", + _ => throw new NotImplementedException() + }; + + private static string GetVersion(OpenApiSpecVersion version) => + version switch { + OpenApiSpecVersion.OpenApi2_0 => "V2.", + OpenApiSpecVersion.OpenApi3_0 => string.Empty, + _ => throw new NotImplementedException() + }; + private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, OpenApiConvertSettings settings = null) { 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 2e7aed9c4..4a0ed4937 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 @@ -2,7 +2,7 @@ swagger: '2.0' info: title: OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models description: This OData service is located at http://services.odata.org/TrippinRESTierService - version: '1.2.3' + version: 1.0.1 host: services.odata.org basePath: /TrippinRESTierService schemes: 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 eab28ac49..26f209cec 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.4 info: title: OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models description: This OData service is located at http://services.odata.org/TrippinRESTierService - version: '1.2.3' + version: 1.0.1 servers: - url: http://services.odata.org/TrippinRESTierService paths: From 58591ddb0d03a875b9577dba28960f867c835020 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:10:36 -0500 Subject: [PATCH 068/103] chore: linting Signed-off-by: Vincent Biret --- .../EdmModelOpenApiExtensionsTest.cs | 289 +++++++++--------- 1 file changed, 141 insertions(+), 148 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index eafb36e72..ab086cefa 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -11,172 +11,165 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.OpenApi.OData.Tests +namespace Microsoft.OpenApi.OData.Tests; +public class EdmModelOpenApiExtensionsTest(ITestOutputHelper output) { - public class EdmModelOpenApiExtensionsTest + private readonly ITestOutputHelper _output = output; + + [Fact] + public void ConvertToOpenApiThrowsArgumentNullModel() { - private readonly ITestOutputHelper _output; + // Arrange + IEdmModel model = null; - public EdmModelOpenApiExtensionsTest(ITestOutputHelper output) - { - _output = output; - } + // Act & Assert + Assert.Throws("model", model.ConvertToOpenApi); + } - [Fact] - public void ConvertToOpenApiThrowsArgumentNullModel() + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + { + // Arrange + IEdmModel model = EdmModelHelper.EmptyModel; + var openApiConvertSettings = new OpenApiConvertSettings { - // Arrange - IEdmModel model = null; + OpenApiSpecVersion = specVersion, + IncludeAssemblyInfo = false + }; - // Act & Assert - Assert.Throws("model", () => model.ConvertToOpenApi()); - } + // Act + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + var fileName = $"Empty.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] - public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) - { - // Arrange - IEdmModel model = EdmModelHelper.EmptyModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - IncludeAssemblyInfo = false - }; - - // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); - var fileName = $"Empty.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - - // Assert - AssertDocumentsAreEqual(result, fileName, format); - } + // Assert + AssertDocumentsAreEqual(result, fileName, format); + } - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] - public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + { + // Arrange + IEdmModel model = EdmModelHelper.BasicEdmModel; + var openApiConvertSettings = new OpenApiConvertSettings { - // Arrange - IEdmModel model = EdmModelHelper.BasicEdmModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - ShowSchemaExamples = true, // test for schema examples - IncludeAssemblyInfo = false, - UseStringArrayForQueryOptionsSchema = false - }; - - // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); - var fileName = $"Basic.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - - // Assert - AssertDocumentsAreEqual(result, fileName, format); - } + OpenApiSpecVersion = specVersion, + ShowSchemaExamples = true, // test for schema examples + IncludeAssemblyInfo = false, + UseStringArrayForQueryOptionsSchema = false + }; - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] - public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) - { - // Arrange - IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; - var openApiConvertSettings = new OpenApiConvertSettings - { - OpenApiSpecVersion = specVersion, - ShowLinks = true, // test Links - ShowSchemaExamples = true, - IncludeAssemblyInfo = false, - UseStringArrayForQueryOptionsSchema = false - }; - - // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); - - var fileName = $"Multiple.Schema.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - - // Assert - AssertDocumentsAreEqual(result, fileName, format); - } + // Act + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + var fileName = $"Basic.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - [Theory] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] - [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] - [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] - public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) - { - // Arrange - IEdmModel model = EdmModelHelper.TripServiceModel; - OpenApiConvertSettings settings = new OpenApiConvertSettings - { - EnableKeyAsSegment = true, - SemVerVersion = "1.0.1", - ServiceRoot = new Uri("http://services.odata.org/TrippinRESTierService"), - IEEE754Compatible = true, - OpenApiSpecVersion = specVersion, - AddSingleQuotesForStringParameters = true, - AddEnumDescriptionExtension = true, - AppendBoundOperationsOnDerivedTypeCastSegments = true, - IncludeAssemblyInfo = false - }; - // Act - string result = WriteEdmModelAsOpenApi(model, format, settings); - - var fileName = $"TripService.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; - - // Assert - AssertDocumentsAreEqual(result, fileName, format); - } + // Assert + AssertDocumentsAreEqual(result, fileName, format); + } - private void AssertDocumentsAreEqual(string result, string fileName, OpenApiFormat format) + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + { + // Arrange + IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; + var openApiConvertSettings = new OpenApiConvertSettings { - _output.WriteLine(result); - if (format is OpenApiFormat.Json) - { - var parsedJson = JsonNode.Parse(result); - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); - } - else - { - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), result); - } - } - - private static string GetFormatExt(OpenApiFormat format) => - format switch { - OpenApiFormat.Json => "json", - OpenApiFormat.Yaml => "yaml", - _ => throw new NotImplementedException() + OpenApiSpecVersion = specVersion, + ShowLinks = true, // test Links + ShowSchemaExamples = true, + IncludeAssemblyInfo = false, + UseStringArrayForQueryOptionsSchema = false }; - private static string GetVersion(OpenApiSpecVersion version) => - version switch { - OpenApiSpecVersion.OpenApi2_0 => "V2.", - OpenApiSpecVersion.OpenApi3_0 => string.Empty, - _ => throw new NotImplementedException() + // Act + string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + + var fileName = $"Multiple.Schema.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; + + // Assert + AssertDocumentsAreEqual(result, fileName, format); + } + + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + { + // Arrange + IEdmModel model = EdmModelHelper.TripServiceModel; + OpenApiConvertSettings settings = new OpenApiConvertSettings + { + EnableKeyAsSegment = true, + SemVerVersion = "1.0.1", + ServiceRoot = new Uri("http://services.odata.org/TrippinRESTierService"), + IEEE754Compatible = true, + OpenApiSpecVersion = specVersion, + AddSingleQuotesForStringParameters = true, + AddEnumDescriptionExtension = true, + AppendBoundOperationsOnDerivedTypeCastSegments = true, + IncludeAssemblyInfo = false }; + // Act + string result = WriteEdmModelAsOpenApi(model, format, settings); - private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, - OpenApiConvertSettings settings = null) + var fileName = $"TripService.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; + + // Assert + AssertDocumentsAreEqual(result, fileName, format); + } + + private void AssertDocumentsAreEqual(string result, string fileName, OpenApiFormat format) + { + _output.WriteLine(result); + if (format is OpenApiFormat.Json) { - settings ??= new OpenApiConvertSettings(); - var document = model.ConvertToOpenApi(settings); - Assert.NotNull(document); // guard - - MemoryStream stream = new(); - document.Serialize(stream, settings.OpenApiSpecVersion, target); - stream.Flush(); - stream.Position = 0; - return new StreamReader(stream).ReadToEnd(); + var parsedJson = JsonNode.Parse(result); + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); } + else + { + Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), result); + } + } + + private static string GetFormatExt(OpenApiFormat format) => + format switch { + OpenApiFormat.Json => "json", + OpenApiFormat.Yaml => "yaml", + _ => throw new NotImplementedException() + }; + + private static string GetVersion(OpenApiSpecVersion version) => + version switch { + OpenApiSpecVersion.OpenApi2_0 => "V2.", + OpenApiSpecVersion.OpenApi3_0 => string.Empty, + _ => throw new NotImplementedException() + }; + + private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, + OpenApiConvertSettings settings = null) + { + settings ??= new OpenApiConvertSettings(); + var document = model.ConvertToOpenApi(settings); + Assert.NotNull(document); // guard + + MemoryStream stream = new(); + document.Serialize(stream, settings.OpenApiSpecVersion, target); + stream.Flush(); + stream.Position = 0; + return new StreamReader(stream).ReadToEnd(); } } From 3a9f343d23d9c573d93a357ca294fb0a1bcd8827 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:15:24 -0500 Subject: [PATCH 069/103] fix: wrong test name Signed-off-by: Vincent Biret --- .../EdmModelOpenApiExtensionsTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index ab086cefa..2cdd95950 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -31,7 +31,7 @@ public void ConvertToOpenApiThrowsArgumentNullModel() [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] - public void EmptyEdmModelToOpenApiJsonWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; From 0026276761e6f19a2c5f24707be69e53fa920667 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:19:33 -0500 Subject: [PATCH 070/103] chore: linting Signed-off-by: Vincent Biret --- .../Operation/MediaEntityOperationalHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index afb45966f..a3cc04f6a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -116,7 +116,7 @@ protected string GetOperationId(string prefix, string identifier) Utils.CheckArgumentNullOrEmpty(prefix, nameof(prefix)); Utils.CheckArgumentNullOrEmpty(identifier, nameof(identifier)); - IList items = new List + var items = new List { NavigationSourceSegment.Identifier }; From 29722295f5ea428ea69289590d35d4f590d70c86 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:33:19 -0500 Subject: [PATCH 071/103] fix: duplicate operation ids on media and cast segments Signed-off-by: Vincent Biret --- .../MediaEntityOperationalHandler.cs | 2 +- .../ODataTypeCastGetOperationHandler.cs | 13 +- .../MediaEntityDeleteOperationHandlerTests.cs | 6 +- .../MediaEntityGetOperationHandlerTests.cs | 4 +- .../MediaEntityPutOperationHandlerTests.cs | 4 +- .../ODataTypeCastGetOperationHandlerTests.cs | 12 +- .../Resources/TripService.OpenApi.V2.json | 308 +++++++++--------- .../Resources/TripService.OpenApi.V2.yaml | 308 +++++++++--------- .../Resources/TripService.OpenApi.json | 308 +++++++++--------- .../Resources/TripService.OpenApi.yaml | 308 +++++++++--------- 10 files changed, 636 insertions(+), 637 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index a3cc04f6a..b4874a3e5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -150,7 +150,7 @@ protected string GetOperationId(string prefix, string identifier) } } - return string.Join(".", items); + return $"{string.Join(".", items)}-{Path.GetPathHash(Context.Settings)}"; } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index cd3b965d9..66d8f0a20 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -72,7 +72,7 @@ private bool IsSingleElement /// protected override void Initialize(ODataContext context, ODataPath path) { - // reseting the fields as we're reusing the handler + // resetting the fields as we're reusing the handler singleton = null; isKeySegment = false; secondLastSegmentIsComplexProperty = false; @@ -198,7 +198,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) // OperationId if (Context.Settings.EnableOperationId) - operation.OperationId = EdmModelHelper.GenerateODataTypeCastPathOperationIdPrefix(Path, Context) + $".As{Utils.UpperFirstChar(TargetSchemaElement.Name)}"; + operation.OperationId = EdmModelHelper.GenerateODataTypeCastPathOperationIdPrefix(Path, Context) + $".As{Utils.UpperFirstChar(TargetSchemaElement.Name)}-{Path.GetPathHash(Context.Settings)}"; base.SetBasicInfo(operation); } @@ -244,12 +244,11 @@ protected override void SetTags(OpenApiOperation operation) else if ((SecondLastSegment is ODataKeySegment && !isIndexedCollValuedNavProp) || (SecondLastSegment is ODataNavigationSourceSegment)) { - var entitySet = navigationSource as IEdmEntitySet; - var singleton = navigationSource as IEdmSingleton; + var singletonNavigationSource = navigationSource as IEdmSingleton; - tagName = entitySet != null - ? entitySet.Name + "." + entitySet.EntityType.Name - : singleton.Name + "." + singleton.EntityType.Name; + tagName = navigationSource is IEdmEntitySet entitySetNavigationSource + ? entitySetNavigationSource.Name + "." + entitySetNavigationSource.EntityType.Name + : singletonNavigationSource.Name + "." + singletonNavigationSource.EntityType.Name; } else if (SecondLastSegment is ODataComplexPropertySegment) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs index 7286a5b42..78a879287 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs @@ -65,7 +65,7 @@ public void CreateMediaEntityPropertyDeleteOperationWithTargetPathAnnotationsRet Assert.Equal(2, operation.Responses.Count); Assert.Equal(new string[] { "204", "default" }, operation.Responses.Select(e => e.Key)); - Assert.Equal("People.Person.DeletePhoto", operation.OperationId); + Assert.Equal("People.Person.DeletePhoto-883f", operation.OperationId); } [Theory] @@ -180,8 +180,8 @@ private void VerifyMediaEntityDeleteOperation(string annotation, bool enableOper if (enableOperationId) { - Assert.Equal("Todos.Todo.DeleteLogo", deleteOperation.OperationId); - Assert.Equal("me.DeletePhotoContent", deleteOperation2.OperationId); + Assert.Equal("Todos.Todo.DeleteLogo-9540", deleteOperation.OperationId); + Assert.Equal("me.DeletePhotoContent-797b", deleteOperation2.OperationId); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index c6ede5cad..9eff3a36c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -144,8 +144,8 @@ private void VerifyMediaEntityGetOperation(string annotation, bool enableOperati if (enableOperationId) { - Assert.Equal("Todos.Todo.GetLogo", getOperation.OperationId); - Assert.Equal("me.GetPhotoContent", getOperation2.OperationId); + Assert.Equal("Todos.Todo.GetLogo-9540", getOperation.OperationId); + Assert.Equal("me.GetPhotoContent-797b", getOperation2.OperationId); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index d8e2d417c..9341b1694 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -158,8 +158,8 @@ private void VerifyMediaEntityPutOperation(string annotation, bool enableOperati if (enableOperationId) { - Assert.Equal("Todos.Todo.UpdateLogo", putOperation.OperationId); - Assert.Equal("me.UpdatePhotoContent", putOperation2.OperationId); + Assert.Equal("Todos.Todo.UpdateLogo-9540", putOperation.OperationId); + Assert.Equal("me.UpdatePhotoContent-797b", putOperation2.OperationId); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index f6dea1423..a229279ba 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -71,7 +71,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN if (enableOperationId) { - Assert.Equal("People.ListFriends.AsEmployee", operation.OperationId); + Assert.Equal("People.ListFriends.AsEmployee-11bf", operation.OperationId); } else { @@ -134,7 +134,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN if (enableOperationId) { - Assert.Equal("People.GetFriends.AsEmployee", operation.OperationId); + Assert.Equal("People.GetFriends.AsEmployee-11bf", operation.OperationId); } else { @@ -191,7 +191,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySet(b if (enableOperationId) { - Assert.Equal("People.Person.ListPerson.AsEmployee", operation.OperationId); + Assert.Equal("People.Person.ListPerson.AsEmployee-013a", operation.OperationId); } else { @@ -251,7 +251,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySetId if (enableOperationId) { - Assert.Equal("People.Person.GetPerson.AsEmployee", operation.OperationId); + Assert.Equal("People.Person.GetPerson.AsEmployee-317b", operation.OperationId); } else { @@ -312,7 +312,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig if (enableOperationId) { - Assert.Equal("People.GetBestFriend.AsEmployee", operation.OperationId); + Assert.Equal("People.GetBestFriend.AsEmployee-7188", operation.OperationId); } else { @@ -369,7 +369,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleton(b if (enableOperationId) { - Assert.Equal("Me.Person.GetPerson.AsEmployee", operation.OperationId); + Assert.Equal("Me.Person.GetPerson.AsEmployee-bd18", operation.OperationId); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index f66b20163..ed636a853 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -918,7 +918,7 @@ "Airports.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation", + "operationId": "Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9", "produces": [ "application/json" ], @@ -1071,7 +1071,7 @@ "Airports.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation", + "operationId": "Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9", "produces": [ "application/json" ], @@ -1105,7 +1105,7 @@ "Airports.Person" ], "summary": "Get Photo for the navigation property EmergencyAuthority from Airports", - "operationId": "Airports.GetEmergencyAuthorityPhoto", + "operationId": "Airports.GetEmergencyAuthorityPhoto-13fb", "produces": [ "application/octet-stream" ], @@ -1137,7 +1137,7 @@ "Airports.Person" ], "summary": "Update Photo for the navigation property EmergencyAuthority in Airports", - "operationId": "Airports.UpdateEmergencyAuthorityPhoto", + "operationId": "Airports.UpdateEmergencyAuthorityPhoto-13fb", "consumes": [ "application/octet-stream" ], @@ -1175,7 +1175,7 @@ "Airports.Person" ], "summary": "Delete Photo for the navigation property EmergencyAuthority in Airports", - "operationId": "Airports.DeleteEmergencyAuthorityPhoto", + "operationId": "Airports.DeleteEmergencyAuthorityPhoto-13fb", "parameters": [ { "in": "path", @@ -1580,7 +1580,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-b1a4", "produces": [ "application/json" ], @@ -2019,7 +2019,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-2154", "produces": [ "application/json" ], @@ -2166,7 +2166,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-a28d", "produces": [ "application/json" ], @@ -2197,7 +2197,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetBestFriend.AsEmployee", + "operationId": "Me.GetBestFriend.AsEmployee-dcf6", "produces": [ "application/json" ], @@ -2248,7 +2248,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetBestFriend.AsManager", + "operationId": "Me.GetBestFriend.AsManager-09a9", "produces": [ "application/json" ], @@ -2299,7 +2299,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-8333", "produces": [ "application/octet-stream" ], @@ -2328,7 +2328,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-8333", "consumes": [ "application/octet-stream" ], @@ -2365,7 +2365,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-8333", "parameters": [ { "in": "header", @@ -2749,7 +2749,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-f440", "produces": [ "application/json" ], @@ -2930,7 +2930,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-15cc", "produces": [ "application/json" ], @@ -2971,7 +2971,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetFriends.AsEmployee", + "operationId": "Me.GetFriends.AsEmployee-3dc7", "produces": [ "application/json" ], @@ -3042,7 +3042,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetFriends.AsManager", + "operationId": "Me.GetFriends.AsManager-ddec", "produces": [ "application/json" ], @@ -3113,7 +3113,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-287d", "produces": [ "application/octet-stream" ], @@ -3152,7 +3152,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-287d", "consumes": [ "application/octet-stream" ], @@ -3197,7 +3197,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-287d", "parameters": [ { "in": "path", @@ -3414,7 +3414,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsEmployee", + "operationId": "Me.ListFriends.AsEmployee-f4a5", "parameters": [ { "in": "header", @@ -3540,7 +3540,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsManager", + "operationId": "Me.ListFriends.AsManager-98ae", "parameters": [ { "in": "header", @@ -3752,7 +3752,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-ba49", "produces": [ "application/json" ], @@ -3783,7 +3783,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.Person.GetPerson.AsEmployee", + "operationId": "Me.Person.GetPerson.AsEmployee-bd18", "produces": [ "application/json" ], @@ -4024,7 +4024,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-989f", "produces": [ "application/json" ], @@ -4463,7 +4463,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-1d72", "produces": [ "application/json" ], @@ -4610,7 +4610,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-19b8", "produces": [ "application/json" ], @@ -4641,7 +4641,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetBestFriend.AsManager", + "operationId": "Me.GetBestFriend.AsManager-c104", "produces": [ "application/json" ], @@ -4692,7 +4692,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-4dc7", "produces": [ "application/octet-stream" ], @@ -4721,7 +4721,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-4dc7", "consumes": [ "application/octet-stream" ], @@ -4758,7 +4758,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-4dc7", "parameters": [ { "in": "header", @@ -5142,7 +5142,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-7b1e", "produces": [ "application/json" ], @@ -5323,7 +5323,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-600f", "produces": [ "application/json" ], @@ -5364,7 +5364,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetFriends.AsManager", + "operationId": "Me.GetFriends.AsManager-aa0c", "produces": [ "application/json" ], @@ -5435,7 +5435,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-6e41", "produces": [ "application/octet-stream" ], @@ -5474,7 +5474,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-6e41", "consumes": [ "application/octet-stream" ], @@ -5519,7 +5519,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-6e41", "parameters": [ { "in": "path", @@ -5736,7 +5736,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsManager", + "operationId": "Me.ListFriends.AsManager-f993", "parameters": [ { "in": "header", @@ -5948,7 +5948,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-6fc5", "produces": [ "application/json" ], @@ -6313,7 +6313,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Peers.ListAddressInfo.AsEventLocation", + "operationId": "Me.Peers.ListAddressInfo.AsEventLocation-1e59", "produces": [ "application/json" ], @@ -6494,7 +6494,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Peers.GetHomeAddress.AsEventLocation", + "operationId": "Me.Peers.GetHomeAddress.AsEventLocation-dc11", "produces": [ "application/json" ], @@ -6535,7 +6535,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Peers from Me", - "operationId": "Me.GetPeersPhoto", + "operationId": "Me.GetPeersPhoto-4c48", "produces": [ "application/octet-stream" ], @@ -6574,7 +6574,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Peers in Me", - "operationId": "Me.UpdatePeersPhoto", + "operationId": "Me.UpdatePeersPhoto-4c48", "consumes": [ "application/octet-stream" ], @@ -6619,7 +6619,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Peers in Me", - "operationId": "Me.DeletePeersPhoto", + "operationId": "Me.DeletePeersPhoto-4c48", "parameters": [ { "in": "path", @@ -7737,7 +7737,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.Person.GetPerson.AsManager", + "operationId": "Me.Person.GetPerson.AsManager-16dc", "produces": [ "application/json" ], @@ -7978,7 +7978,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-55be", "produces": [ "application/json" ], @@ -8417,7 +8417,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-987a", "produces": [ "application/json" ], @@ -8564,7 +8564,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-15c5", "produces": [ "application/json" ], @@ -8595,7 +8595,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetBestFriend.AsEmployee", + "operationId": "Me.GetBestFriend.AsEmployee-7bbe", "produces": [ "application/json" ], @@ -8646,7 +8646,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-bac8", "produces": [ "application/octet-stream" ], @@ -8675,7 +8675,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-bac8", "consumes": [ "application/octet-stream" ], @@ -8712,7 +8712,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-bac8", "parameters": [ { "in": "header", @@ -9079,7 +9079,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.DirectReports.ListAddressInfo.AsEventLocation", + "operationId": "Me.DirectReports.ListAddressInfo.AsEventLocation-660b", "produces": [ "application/json" ], @@ -9260,7 +9260,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.DirectReports.GetHomeAddress.AsEventLocation", + "operationId": "Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e", "produces": [ "application/json" ], @@ -9301,7 +9301,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property DirectReports from Me", - "operationId": "Me.GetDirectReportsPhoto", + "operationId": "Me.GetDirectReportsPhoto-e60c", "produces": [ "application/octet-stream" ], @@ -9340,7 +9340,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property DirectReports in Me", - "operationId": "Me.UpdateDirectReportsPhoto", + "operationId": "Me.UpdateDirectReportsPhoto-e60c", "consumes": [ "application/octet-stream" ], @@ -9385,7 +9385,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property DirectReports in Me", - "operationId": "Me.DeleteDirectReportsPhoto", + "operationId": "Me.DeleteDirectReportsPhoto-e60c", "parameters": [ { "in": "path", @@ -9928,7 +9928,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-1ad9", "produces": [ "application/json" ], @@ -10109,7 +10109,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-1e07", "produces": [ "application/json" ], @@ -10150,7 +10150,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetFriends.AsEmployee", + "operationId": "Me.GetFriends.AsEmployee-5b5f", "produces": [ "application/json" ], @@ -10221,7 +10221,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-64bd", "produces": [ "application/octet-stream" ], @@ -10260,7 +10260,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-64bd", "consumes": [ "application/octet-stream" ], @@ -10305,7 +10305,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-64bd", "parameters": [ { "in": "path", @@ -10522,7 +10522,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsEmployee", + "operationId": "Me.ListFriends.AsEmployee-fe32", "parameters": [ { "in": "header", @@ -10734,7 +10734,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-5d95", "produces": [ "application/json" ], @@ -11670,7 +11670,7 @@ "Me.Person" ], "summary": "Get Photo for Person from Me", - "operationId": "Me.Person.GetPhoto", + "operationId": "Me.Person.GetPhoto-ab7e", "produces": [ "application/octet-stream" ], @@ -11699,7 +11699,7 @@ "Me.Person" ], "summary": "Update Photo for Person in Me", - "operationId": "Me.Person.UpdatePhoto", + "operationId": "Me.Person.UpdatePhoto-ab7e", "consumes": [ "application/octet-stream" ], @@ -11736,7 +11736,7 @@ "Me.Person" ], "summary": "Delete Photo for Person in Me", - "operationId": "Me.Person.DeletePhoto", + "operationId": "Me.Person.DeletePhoto-ab7e", "parameters": [ { "in": "header", @@ -12976,7 +12976,7 @@ "NewComePeople.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.ListAddressInfo.AsEventLocation-d026", "produces": [ "application/json" ], @@ -13489,7 +13489,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa", "produces": [ "application/json" ], @@ -13670,7 +13670,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe", "produces": [ "application/json" ], @@ -13711,7 +13711,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "NewComePeople.GetBestFriend.AsEmployee", + "operationId": "NewComePeople.GetBestFriend.AsEmployee-7b75", "produces": [ "application/json" ], @@ -13770,7 +13770,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "NewComePeople.GetBestFriend.AsManager", + "operationId": "NewComePeople.GetBestFriend.AsManager-61ce", "produces": [ "application/json" ], @@ -13829,7 +13829,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for the navigation property BestFriend from NewComePeople", - "operationId": "NewComePeople.GetBestFriendPhoto", + "operationId": "NewComePeople.GetBestFriendPhoto-4f67", "produces": [ "application/octet-stream" ], @@ -13868,7 +13868,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for the navigation property BestFriend in NewComePeople", - "operationId": "NewComePeople.UpdateBestFriendPhoto", + "operationId": "NewComePeople.UpdateBestFriendPhoto-4f67", "consumes": [ "application/octet-stream" ], @@ -13913,7 +13913,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for the navigation property BestFriend in NewComePeople", - "operationId": "NewComePeople.DeleteBestFriendPhoto", + "operationId": "NewComePeople.DeleteBestFriendPhoto-4f67", "parameters": [ { "in": "path", @@ -14307,7 +14307,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.Friends.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4", "produces": [ "application/json" ], @@ -14492,7 +14492,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.Friends.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9", "produces": [ "application/json" ], @@ -14534,7 +14534,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "NewComePeople.GetFriends.AsEmployee", + "operationId": "NewComePeople.GetFriends.AsEmployee-2969", "produces": [ "application/json" ], @@ -14606,7 +14606,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "NewComePeople.GetFriends.AsManager", + "operationId": "NewComePeople.GetFriends.AsManager-708f", "produces": [ "application/json" ], @@ -14678,7 +14678,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for the navigation property Friends from NewComePeople", - "operationId": "NewComePeople.GetFriendsPhoto", + "operationId": "NewComePeople.GetFriendsPhoto-e9fc", "produces": [ "application/octet-stream" ], @@ -14718,7 +14718,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for the navigation property Friends in NewComePeople", - "operationId": "NewComePeople.UpdateFriendsPhoto", + "operationId": "NewComePeople.UpdateFriendsPhoto-e9fc", "consumes": [ "application/octet-stream" ], @@ -14764,7 +14764,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for the navigation property Friends in NewComePeople", - "operationId": "NewComePeople.DeleteFriendsPhoto", + "operationId": "NewComePeople.DeleteFriendsPhoto-e9fc", "parameters": [ { "in": "path", @@ -14986,7 +14986,7 @@ "NewComePeople.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "NewComePeople.ListFriends.AsEmployee", + "operationId": "NewComePeople.ListFriends.AsEmployee-2969", "parameters": [ { "in": "path", @@ -15114,7 +15114,7 @@ "NewComePeople.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "NewComePeople.ListFriends.AsManager", + "operationId": "NewComePeople.ListFriends.AsManager-708f", "parameters": [ { "in": "path", @@ -15330,7 +15330,7 @@ "NewComePeople.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.GetHomeAddress.AsEventLocation-3fd9", "produces": [ "application/json" ], @@ -15626,7 +15626,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for Person from NewComePeople", - "operationId": "NewComePeople.Person.GetPhoto", + "operationId": "NewComePeople.Person.GetPhoto-74be", "produces": [ "application/octet-stream" ], @@ -15658,7 +15658,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for Person in NewComePeople", - "operationId": "NewComePeople.Person.UpdatePhoto", + "operationId": "NewComePeople.Person.UpdatePhoto-74be", "consumes": [ "application/octet-stream" ], @@ -15696,7 +15696,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for Person in NewComePeople", - "operationId": "NewComePeople.Person.DeletePhoto", + "operationId": "NewComePeople.Person.DeletePhoto-74be", "parameters": [ { "in": "path", @@ -17047,7 +17047,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-e5b8", "produces": [ "application/json" ], @@ -17578,7 +17578,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-c332", "produces": [ "application/json" ], @@ -17759,7 +17759,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-53c4", "produces": [ "application/json" ], @@ -17800,7 +17800,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetBestFriend.AsEmployee", + "operationId": "People.GetBestFriend.AsEmployee-7188", "produces": [ "application/json" ], @@ -17864,7 +17864,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0" }, - "operationId": "People.GetBestFriend.AsManager", + "operationId": "People.GetBestFriend.AsManager-5f08", "produces": [ "application/json" ], @@ -17923,7 +17923,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-c3ac", "produces": [ "application/octet-stream" ], @@ -17962,7 +17962,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-c3ac", "consumes": [ "application/octet-stream" ], @@ -18007,7 +18007,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-c3ac", "parameters": [ { "in": "path", @@ -18456,7 +18456,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-a5f6", "produces": [ "application/json" ], @@ -18669,7 +18669,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-da5e", "produces": [ "application/json" ], @@ -18718,7 +18718,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetFriends.AsEmployee", + "operationId": "People.GetFriends.AsEmployee-11bf", "produces": [ "application/json" ], @@ -18797,7 +18797,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetFriends.AsManager", + "operationId": "People.GetFriends.AsManager-1cfb", "produces": [ "application/json" ], @@ -18876,7 +18876,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-12fc", "produces": [ "application/octet-stream" ], @@ -18923,7 +18923,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-12fc", "consumes": [ "application/octet-stream" ], @@ -18976,7 +18976,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-12fc", "parameters": [ { "in": "path", @@ -19247,7 +19247,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsEmployee", + "operationId": "People.ListFriends.AsEmployee-11bf", "parameters": [ { "in": "path", @@ -19389,7 +19389,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsManager", + "operationId": "People.ListFriends.AsManager-1cfb", "parameters": [ { "in": "path", @@ -19634,7 +19634,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-d0cf", "produces": [ "application/json" ], @@ -19675,7 +19675,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.Person.GetPerson.AsEmployee", + "operationId": "People.Person.GetPerson.AsEmployee-317b", "produces": [ "application/json" ], @@ -19968,7 +19968,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-1342", "produces": [ "application/json" ], @@ -20499,7 +20499,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-7cd9", "produces": [ "application/json" ], @@ -20680,7 +20680,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-7db9", "produces": [ "application/json" ], @@ -20721,7 +20721,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetBestFriend.AsManager", + "operationId": "People.GetBestFriend.AsManager-7b70", "produces": [ "application/json" ], @@ -20780,7 +20780,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-a839", "produces": [ "application/octet-stream" ], @@ -20819,7 +20819,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-a839", "consumes": [ "application/octet-stream" ], @@ -20864,7 +20864,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-a839", "parameters": [ { "in": "path", @@ -21304,7 +21304,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-d49e", "produces": [ "application/json" ], @@ -21517,7 +21517,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-d77d", "produces": [ "application/json" ], @@ -21566,7 +21566,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetFriends.AsManager", + "operationId": "People.GetFriends.AsManager-3e3c", "produces": [ "application/json" ], @@ -21645,7 +21645,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-1a66", "produces": [ "application/octet-stream" ], @@ -21692,7 +21692,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-1a66", "consumes": [ "application/octet-stream" ], @@ -21745,7 +21745,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-1a66", "parameters": [ { "in": "path", @@ -22002,7 +22002,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsManager", + "operationId": "People.ListFriends.AsManager-3e3c", "parameters": [ { "in": "path", @@ -22246,7 +22246,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-90e5", "produces": [ "application/json" ], @@ -22669,7 +22669,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Peers.ListAddressInfo.AsEventLocation", + "operationId": "People.Peers.ListAddressInfo.AsEventLocation-b918", "produces": [ "application/json" ], @@ -22882,7 +22882,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Peers.GetHomeAddress.AsEventLocation", + "operationId": "People.Peers.GetHomeAddress.AsEventLocation-311b", "produces": [ "application/json" ], @@ -22931,7 +22931,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Peers from People", - "operationId": "People.GetPeersPhoto", + "operationId": "People.GetPeersPhoto-ecda", "produces": [ "application/octet-stream" ], @@ -22978,7 +22978,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Peers in People", - "operationId": "People.UpdatePeersPhoto", + "operationId": "People.UpdatePeersPhoto-ecda", "consumes": [ "application/octet-stream" ], @@ -23031,7 +23031,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Peers in People", - "operationId": "People.DeletePeersPhoto", + "operationId": "People.DeletePeersPhoto-ecda", "parameters": [ { "in": "path", @@ -24319,7 +24319,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.Person.GetPerson.AsManager", + "operationId": "People.Person.GetPerson.AsManager-d051", "produces": [ "application/json" ], @@ -24612,7 +24612,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-7526", "produces": [ "application/json" ], @@ -25143,7 +25143,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-897f", "produces": [ "application/json" ], @@ -25324,7 +25324,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-545d", "produces": [ "application/json" ], @@ -25365,7 +25365,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetBestFriend.AsEmployee", + "operationId": "People.GetBestFriend.AsEmployee-0445", "produces": [ "application/json" ], @@ -25424,7 +25424,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-f05d", "produces": [ "application/octet-stream" ], @@ -25463,7 +25463,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-f05d", "consumes": [ "application/octet-stream" ], @@ -25508,7 +25508,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-f05d", "parameters": [ { "in": "path", @@ -25931,7 +25931,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.DirectReports.ListAddressInfo.AsEventLocation", + "operationId": "People.DirectReports.ListAddressInfo.AsEventLocation-1252", "produces": [ "application/json" ], @@ -26144,7 +26144,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.DirectReports.GetHomeAddress.AsEventLocation", + "operationId": "People.DirectReports.GetHomeAddress.AsEventLocation-cf8d", "produces": [ "application/json" ], @@ -26193,7 +26193,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property DirectReports from People", - "operationId": "People.GetDirectReportsPhoto", + "operationId": "People.GetDirectReportsPhoto-7149", "produces": [ "application/octet-stream" ], @@ -26240,7 +26240,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property DirectReports in People", - "operationId": "People.UpdateDirectReportsPhoto", + "operationId": "People.UpdateDirectReportsPhoto-7149", "consumes": [ "application/octet-stream" ], @@ -26293,7 +26293,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property DirectReports in People", - "operationId": "People.DeleteDirectReportsPhoto", + "operationId": "People.DeleteDirectReportsPhoto-7149", "parameters": [ { "in": "path", @@ -26924,7 +26924,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-f8c9", "produces": [ "application/json" ], @@ -27137,7 +27137,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-eb71", "produces": [ "application/json" ], @@ -27186,7 +27186,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetFriends.AsEmployee", + "operationId": "People.GetFriends.AsEmployee-161e", "produces": [ "application/json" ], @@ -27265,7 +27265,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-b97d", "produces": [ "application/octet-stream" ], @@ -27312,7 +27312,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-b97d", "consumes": [ "application/octet-stream" ], @@ -27365,7 +27365,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-b97d", "parameters": [ { "in": "path", @@ -27622,7 +27622,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsEmployee", + "operationId": "People.ListFriends.AsEmployee-161e", "parameters": [ { "in": "path", @@ -27866,7 +27866,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-e3dc", "produces": [ "application/json" ], @@ -28945,7 +28945,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.GetPhoto", + "operationId": "People.Person.GetPhoto-883f", "produces": [ "application/octet-stream" ], @@ -28989,7 +28989,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.UpdatePhoto", + "operationId": "People.Person.UpdatePhoto-883f", "consumes": [ "application/octet-stream" ], @@ -29039,7 +29039,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.DeletePhoto", + "operationId": "People.Person.DeletePhoto-883f", "parameters": [ { "in": "path", @@ -30021,7 +30021,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.Person.ListPerson.AsEmployee", + "operationId": "People.Person.ListPerson.AsEmployee-013a", "parameters": [ { "in": "header", @@ -30147,7 +30147,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.Person.ListPerson.AsManager", + "operationId": "People.Person.ListPerson.AsManager-3e14", "parameters": [ { "in": "header", 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 4a0ed4937..ae7875580 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 @@ -601,7 +601,7 @@ paths: tags: - Airports.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation + operationId: Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9 produces: - application/json parameters: @@ -702,7 +702,7 @@ paths: tags: - Airports.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation + operationId: Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9 produces: - application/json parameters: @@ -725,7 +725,7 @@ paths: tags: - Airports.Person summary: Get Photo for the navigation property EmergencyAuthority from Airports - operationId: Airports.GetEmergencyAuthorityPhoto + operationId: Airports.GetEmergencyAuthorityPhoto-13fb produces: - application/octet-stream parameters: @@ -747,7 +747,7 @@ paths: tags: - Airports.Person summary: Update Photo for the navigation property EmergencyAuthority in Airports - operationId: Airports.UpdateEmergencyAuthorityPhoto + operationId: Airports.UpdateEmergencyAuthorityPhoto-13fb consumes: - application/octet-stream parameters: @@ -773,7 +773,7 @@ paths: tags: - Airports.Person summary: Delete Photo for the navigation property EmergencyAuthority in Airports - operationId: Airports.DeleteEmergencyAuthorityPhoto + operationId: Airports.DeleteEmergencyAuthorityPhoto-13fb parameters: - in: path name: IcaoCode @@ -1041,7 +1041,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-b1a4 produces: - application/json responses: @@ -1338,7 +1338,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-2154 produces: - application/json responses: @@ -1438,7 +1438,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-a28d produces: - application/json responses: @@ -1460,7 +1460,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetBestFriend.AsEmployee + operationId: Me.GetBestFriend.AsEmployee-dcf6 produces: - application/json parameters: @@ -1495,7 +1495,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetBestFriend.AsManager + operationId: Me.GetBestFriend.AsManager-09a9 produces: - application/json parameters: @@ -1530,7 +1530,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-8333 produces: - application/octet-stream responses: @@ -1551,7 +1551,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-8333 consumes: - application/octet-stream parameters: @@ -1577,7 +1577,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-8333 parameters: - in: header name: If-Match @@ -1832,7 +1832,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-f440 produces: - application/json parameters: @@ -1957,7 +1957,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-15cc produces: - application/json parameters: @@ -1986,7 +1986,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetFriends.AsEmployee + operationId: Me.GetFriends.AsEmployee-3dc7 produces: - application/json parameters: @@ -2035,7 +2035,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetFriends.AsManager + operationId: Me.GetFriends.AsManager-ddec produces: - application/json parameters: @@ -2084,7 +2084,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-287d produces: - application/octet-stream parameters: @@ -2112,7 +2112,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-287d consumes: - application/octet-stream parameters: @@ -2144,7 +2144,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-287d parameters: - in: path name: UserName @@ -2288,7 +2288,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsEmployee + operationId: Me.ListFriends.AsEmployee-f4a5 parameters: - in: header name: ConsistencyLevel @@ -2367,7 +2367,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsManager + operationId: Me.ListFriends.AsManager-98ae parameters: - in: header name: ConsistencyLevel @@ -2505,7 +2505,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-ba49 produces: - application/json responses: @@ -2527,7 +2527,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.Person.GetPerson.AsEmployee + operationId: Me.Person.GetPerson.AsEmployee-bd18 produces: - application/json parameters: @@ -2685,7 +2685,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-989f produces: - application/json responses: @@ -2982,7 +2982,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-1d72 produces: - application/json responses: @@ -3082,7 +3082,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-19b8 produces: - application/json responses: @@ -3104,7 +3104,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetBestFriend.AsManager + operationId: Me.GetBestFriend.AsManager-c104 produces: - application/json parameters: @@ -3139,7 +3139,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-4dc7 produces: - application/octet-stream responses: @@ -3160,7 +3160,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-4dc7 consumes: - application/octet-stream parameters: @@ -3186,7 +3186,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-4dc7 parameters: - in: header name: If-Match @@ -3441,7 +3441,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-7b1e produces: - application/json parameters: @@ -3566,7 +3566,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-600f produces: - application/json parameters: @@ -3595,7 +3595,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetFriends.AsManager + operationId: Me.GetFriends.AsManager-aa0c produces: - application/json parameters: @@ -3644,7 +3644,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-6e41 produces: - application/octet-stream parameters: @@ -3672,7 +3672,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-6e41 consumes: - application/octet-stream parameters: @@ -3704,7 +3704,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-6e41 parameters: - in: path name: UserName @@ -3848,7 +3848,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsManager + operationId: Me.ListFriends.AsManager-f993 parameters: - in: header name: ConsistencyLevel @@ -3986,7 +3986,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-6fc5 produces: - application/json responses: @@ -4228,7 +4228,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Peers.ListAddressInfo.AsEventLocation + operationId: Me.Peers.ListAddressInfo.AsEventLocation-1e59 produces: - application/json parameters: @@ -4353,7 +4353,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Peers.GetHomeAddress.AsEventLocation + operationId: Me.Peers.GetHomeAddress.AsEventLocation-dc11 produces: - application/json parameters: @@ -4382,7 +4382,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Peers from Me - operationId: Me.GetPeersPhoto + operationId: Me.GetPeersPhoto-4c48 produces: - application/octet-stream parameters: @@ -4410,7 +4410,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Peers in Me - operationId: Me.UpdatePeersPhoto + operationId: Me.UpdatePeersPhoto-4c48 consumes: - application/octet-stream parameters: @@ -4442,7 +4442,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Peers in Me - operationId: Me.DeletePeersPhoto + operationId: Me.DeletePeersPhoto-4c48 parameters: - in: path name: UserName @@ -5200,7 +5200,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.Person.GetPerson.AsManager + operationId: Me.Person.GetPerson.AsManager-16dc produces: - application/json parameters: @@ -5358,7 +5358,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-55be produces: - application/json responses: @@ -5655,7 +5655,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-987a produces: - application/json responses: @@ -5755,7 +5755,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-15c5 produces: - application/json responses: @@ -5777,7 +5777,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetBestFriend.AsEmployee + operationId: Me.GetBestFriend.AsEmployee-7bbe produces: - application/json parameters: @@ -5812,7 +5812,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-bac8 produces: - application/octet-stream responses: @@ -5833,7 +5833,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-bac8 consumes: - application/octet-stream parameters: @@ -5859,7 +5859,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-bac8 parameters: - in: header name: If-Match @@ -6102,7 +6102,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.DirectReports.ListAddressInfo.AsEventLocation + operationId: Me.DirectReports.ListAddressInfo.AsEventLocation-660b produces: - application/json parameters: @@ -6227,7 +6227,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.DirectReports.GetHomeAddress.AsEventLocation + operationId: Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e produces: - application/json parameters: @@ -6256,7 +6256,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property DirectReports from Me - operationId: Me.GetDirectReportsPhoto + operationId: Me.GetDirectReportsPhoto-e60c produces: - application/octet-stream parameters: @@ -6284,7 +6284,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property DirectReports in Me - operationId: Me.UpdateDirectReportsPhoto + operationId: Me.UpdateDirectReportsPhoto-e60c consumes: - application/octet-stream parameters: @@ -6316,7 +6316,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property DirectReports in Me - operationId: Me.DeleteDirectReportsPhoto + operationId: Me.DeleteDirectReportsPhoto-e60c parameters: - in: path name: UserName @@ -6675,7 +6675,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-1ad9 produces: - application/json parameters: @@ -6800,7 +6800,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-1e07 produces: - application/json parameters: @@ -6829,7 +6829,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetFriends.AsEmployee + operationId: Me.GetFriends.AsEmployee-5b5f produces: - application/json parameters: @@ -6878,7 +6878,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-64bd produces: - application/octet-stream parameters: @@ -6906,7 +6906,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-64bd consumes: - application/octet-stream parameters: @@ -6938,7 +6938,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-64bd parameters: - in: path name: UserName @@ -7082,7 +7082,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsEmployee + operationId: Me.ListFriends.AsEmployee-fe32 parameters: - in: header name: ConsistencyLevel @@ -7220,7 +7220,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-5d95 produces: - application/json responses: @@ -7864,7 +7864,7 @@ paths: tags: - Me.Person summary: Get Photo for Person from Me - operationId: Me.Person.GetPhoto + operationId: Me.Person.GetPhoto-ab7e produces: - application/octet-stream responses: @@ -7885,7 +7885,7 @@ paths: tags: - Me.Person summary: Update Photo for Person in Me - operationId: Me.Person.UpdatePhoto + operationId: Me.Person.UpdatePhoto-ab7e consumes: - application/octet-stream parameters: @@ -7911,7 +7911,7 @@ paths: tags: - Me.Person summary: Delete Photo for Person in Me - operationId: Me.Person.DeletePhoto + operationId: Me.Person.DeletePhoto-ab7e parameters: - in: header name: If-Match @@ -8744,7 +8744,7 @@ paths: tags: - NewComePeople.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.ListAddressInfo.AsEventLocation + operationId: NewComePeople.ListAddressInfo.AsEventLocation-d026 produces: - application/json parameters: @@ -9094,7 +9094,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.BestFriend.ListAddressInfo.AsEventLocation + operationId: NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa produces: - application/json parameters: @@ -9219,7 +9219,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.BestFriend.GetHomeAddress.AsEventLocation + operationId: NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe produces: - application/json parameters: @@ -9248,7 +9248,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: NewComePeople.GetBestFriend.AsEmployee + operationId: NewComePeople.GetBestFriend.AsEmployee-7b75 produces: - application/json parameters: @@ -9289,7 +9289,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: NewComePeople.GetBestFriend.AsManager + operationId: NewComePeople.GetBestFriend.AsManager-61ce produces: - application/json parameters: @@ -9330,7 +9330,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for the navigation property BestFriend from NewComePeople - operationId: NewComePeople.GetBestFriendPhoto + operationId: NewComePeople.GetBestFriendPhoto-4f67 produces: - application/octet-stream parameters: @@ -9358,7 +9358,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for the navigation property BestFriend in NewComePeople - operationId: NewComePeople.UpdateBestFriendPhoto + operationId: NewComePeople.UpdateBestFriendPhoto-4f67 consumes: - application/octet-stream parameters: @@ -9390,7 +9390,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for the navigation property BestFriend in NewComePeople - operationId: NewComePeople.DeleteBestFriendPhoto + operationId: NewComePeople.DeleteBestFriendPhoto-4f67 parameters: - in: path name: UserName @@ -9648,7 +9648,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.Friends.ListAddressInfo.AsEventLocation + operationId: NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4 produces: - application/json parameters: @@ -9773,7 +9773,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.Friends.GetHomeAddress.AsEventLocation + operationId: NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9 produces: - application/json parameters: @@ -9802,7 +9802,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: NewComePeople.GetFriends.AsEmployee + operationId: NewComePeople.GetFriends.AsEmployee-2969 produces: - application/json parameters: @@ -9851,7 +9851,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: NewComePeople.GetFriends.AsManager + operationId: NewComePeople.GetFriends.AsManager-708f produces: - application/json parameters: @@ -9900,7 +9900,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for the navigation property Friends from NewComePeople - operationId: NewComePeople.GetFriendsPhoto + operationId: NewComePeople.GetFriendsPhoto-e9fc produces: - application/octet-stream parameters: @@ -9928,7 +9928,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for the navigation property Friends in NewComePeople - operationId: NewComePeople.UpdateFriendsPhoto + operationId: NewComePeople.UpdateFriendsPhoto-e9fc consumes: - application/octet-stream parameters: @@ -9960,7 +9960,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for the navigation property Friends in NewComePeople - operationId: NewComePeople.DeleteFriendsPhoto + operationId: NewComePeople.DeleteFriendsPhoto-e9fc parameters: - in: path name: UserName @@ -10104,7 +10104,7 @@ paths: tags: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: NewComePeople.ListFriends.AsEmployee + operationId: NewComePeople.ListFriends.AsEmployee-2969 parameters: - in: path name: UserName @@ -10183,7 +10183,7 @@ paths: tags: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: NewComePeople.ListFriends.AsManager + operationId: NewComePeople.ListFriends.AsManager-708f parameters: - in: path name: UserName @@ -10321,7 +10321,7 @@ paths: tags: - NewComePeople.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.GetHomeAddress.AsEventLocation + operationId: NewComePeople.GetHomeAddress.AsEventLocation-3fd9 produces: - application/json parameters: @@ -10518,7 +10518,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for Person from NewComePeople - operationId: NewComePeople.Person.GetPhoto + operationId: NewComePeople.Person.GetPhoto-74be produces: - application/octet-stream parameters: @@ -10540,7 +10540,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for Person in NewComePeople - operationId: NewComePeople.Person.UpdatePhoto + operationId: NewComePeople.Person.UpdatePhoto-74be consumes: - application/octet-stream parameters: @@ -10566,7 +10566,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for Person in NewComePeople - operationId: NewComePeople.Person.DeletePhoto + operationId: NewComePeople.Person.DeletePhoto-74be parameters: - in: path name: UserName @@ -11472,7 +11472,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-e5b8 produces: - application/json parameters: @@ -11837,7 +11837,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-c332 produces: - application/json parameters: @@ -11962,7 +11962,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-53c4 produces: - application/json parameters: @@ -11991,7 +11991,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetBestFriend.AsEmployee + operationId: People.GetBestFriend.AsEmployee-7188 produces: - application/json parameters: @@ -12036,7 +12036,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0 - operationId: People.GetBestFriend.AsManager + operationId: People.GetBestFriend.AsManager-5f08 produces: - application/json parameters: @@ -12077,7 +12077,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-c3ac produces: - application/octet-stream parameters: @@ -12105,7 +12105,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-c3ac consumes: - application/octet-stream parameters: @@ -12137,7 +12137,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-c3ac parameters: - in: path name: UserName @@ -12441,7 +12441,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-a5f6 produces: - application/json parameters: @@ -12590,7 +12590,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-da5e produces: - application/json parameters: @@ -12625,7 +12625,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetFriends.AsEmployee + operationId: People.GetFriends.AsEmployee-11bf produces: - application/json parameters: @@ -12680,7 +12680,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetFriends.AsManager + operationId: People.GetFriends.AsManager-1cfb produces: - application/json parameters: @@ -12735,7 +12735,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-12fc produces: - application/octet-stream parameters: @@ -12769,7 +12769,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-12fc consumes: - application/octet-stream parameters: @@ -12807,7 +12807,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-12fc parameters: - in: path name: UserName @@ -12992,7 +12992,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsEmployee + operationId: People.ListFriends.AsEmployee-11bf parameters: - in: path name: UserName @@ -13083,7 +13083,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsManager + operationId: People.ListFriends.AsManager-1cfb parameters: - in: path name: UserName @@ -13246,7 +13246,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-d0cf produces: - application/json parameters: @@ -13275,7 +13275,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.Person.GetPerson.AsEmployee + operationId: People.Person.GetPerson.AsEmployee-317b produces: - application/json parameters: @@ -13471,7 +13471,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-1342 produces: - application/json parameters: @@ -13836,7 +13836,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-7cd9 produces: - application/json parameters: @@ -13961,7 +13961,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-7db9 produces: - application/json parameters: @@ -13990,7 +13990,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetBestFriend.AsManager + operationId: People.GetBestFriend.AsManager-7b70 produces: - application/json parameters: @@ -14031,7 +14031,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-a839 produces: - application/octet-stream parameters: @@ -14059,7 +14059,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-a839 consumes: - application/octet-stream parameters: @@ -14091,7 +14091,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-a839 parameters: - in: path name: UserName @@ -14388,7 +14388,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-d49e produces: - application/json parameters: @@ -14537,7 +14537,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-d77d produces: - application/json parameters: @@ -14572,7 +14572,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetFriends.AsManager + operationId: People.GetFriends.AsManager-3e3c produces: - application/json parameters: @@ -14627,7 +14627,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-1a66 produces: - application/octet-stream parameters: @@ -14661,7 +14661,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-1a66 consumes: - application/octet-stream parameters: @@ -14699,7 +14699,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-1a66 parameters: - in: path name: UserName @@ -14873,7 +14873,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsManager + operationId: People.ListFriends.AsManager-3e3c parameters: - in: path name: UserName @@ -15035,7 +15035,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-90e5 produces: - application/json parameters: @@ -15320,7 +15320,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Peers.ListAddressInfo.AsEventLocation + operationId: People.Peers.ListAddressInfo.AsEventLocation-b918 produces: - application/json parameters: @@ -15469,7 +15469,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Peers.GetHomeAddress.AsEventLocation + operationId: People.Peers.GetHomeAddress.AsEventLocation-311b produces: - application/json parameters: @@ -15504,7 +15504,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Peers from People - operationId: People.GetPeersPhoto + operationId: People.GetPeersPhoto-ecda produces: - application/octet-stream parameters: @@ -15538,7 +15538,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Peers in People - operationId: People.UpdatePeersPhoto + operationId: People.UpdatePeersPhoto-ecda consumes: - application/octet-stream parameters: @@ -15576,7 +15576,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Peers in People - operationId: People.DeletePeersPhoto + operationId: People.DeletePeersPhoto-ecda parameters: - in: path name: UserName @@ -16461,7 +16461,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.Person.GetPerson.AsManager + operationId: People.Person.GetPerson.AsManager-d051 produces: - application/json parameters: @@ -16657,7 +16657,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-7526 produces: - application/json parameters: @@ -17022,7 +17022,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-897f produces: - application/json parameters: @@ -17147,7 +17147,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-545d produces: - application/json parameters: @@ -17176,7 +17176,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetBestFriend.AsEmployee + operationId: People.GetBestFriend.AsEmployee-0445 produces: - application/json parameters: @@ -17217,7 +17217,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-f05d produces: - application/octet-stream parameters: @@ -17245,7 +17245,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-f05d consumes: - application/octet-stream parameters: @@ -17277,7 +17277,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-f05d parameters: - in: path name: UserName @@ -17562,7 +17562,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.DirectReports.ListAddressInfo.AsEventLocation + operationId: People.DirectReports.ListAddressInfo.AsEventLocation-1252 produces: - application/json parameters: @@ -17711,7 +17711,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.DirectReports.GetHomeAddress.AsEventLocation + operationId: People.DirectReports.GetHomeAddress.AsEventLocation-cf8d produces: - application/json parameters: @@ -17746,7 +17746,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property DirectReports from People - operationId: People.GetDirectReportsPhoto + operationId: People.GetDirectReportsPhoto-7149 produces: - application/octet-stream parameters: @@ -17780,7 +17780,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property DirectReports in People - operationId: People.UpdateDirectReportsPhoto + operationId: People.UpdateDirectReportsPhoto-7149 consumes: - application/octet-stream parameters: @@ -17818,7 +17818,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property DirectReports in People - operationId: People.DeleteDirectReportsPhoto + operationId: People.DeleteDirectReportsPhoto-7149 parameters: - in: path name: UserName @@ -18243,7 +18243,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-f8c9 produces: - application/json parameters: @@ -18392,7 +18392,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-eb71 produces: - application/json parameters: @@ -18427,7 +18427,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetFriends.AsEmployee + operationId: People.GetFriends.AsEmployee-161e produces: - application/json parameters: @@ -18482,7 +18482,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-b97d produces: - application/octet-stream parameters: @@ -18516,7 +18516,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-b97d consumes: - application/octet-stream parameters: @@ -18554,7 +18554,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-b97d parameters: - in: path name: UserName @@ -18728,7 +18728,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsEmployee + operationId: People.ListFriends.AsEmployee-161e parameters: - in: path name: UserName @@ -18890,7 +18890,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-e3dc produces: - application/json parameters: @@ -19641,7 +19641,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0 - operationId: People.Person.GetPhoto + operationId: People.Person.GetPhoto-883f produces: - application/octet-stream parameters: @@ -19673,7 +19673,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0 - operationId: People.Person.UpdatePhoto + operationId: People.Person.UpdatePhoto-883f consumes: - application/octet-stream parameters: @@ -19709,7 +19709,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0 - operationId: People.Person.DeletePhoto + operationId: People.Person.DeletePhoto-883f parameters: - in: path name: UserName @@ -20388,7 +20388,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.Person.ListPerson.AsEmployee + operationId: People.Person.ListPerson.AsEmployee-013a parameters: - in: header name: ConsistencyLevel @@ -20467,7 +20467,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.Person.ListPerson.AsManager + operationId: People.Person.ListPerson.AsManager-3e14 parameters: - in: header name: ConsistencyLevel 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 bfb2c06cd..9edb27779 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -1040,7 +1040,7 @@ "Airports.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation", + "operationId": "Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9", "parameters": [ { "name": "IcaoCode", @@ -1212,7 +1212,7 @@ "Airports.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation", + "operationId": "Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9", "parameters": [ { "name": "IcaoCode", @@ -1249,7 +1249,7 @@ "Airports.Person" ], "summary": "Get Photo for the navigation property EmergencyAuthority from Airports", - "operationId": "Airports.GetEmergencyAuthorityPhoto", + "operationId": "Airports.GetEmergencyAuthorityPhoto-13fb", "parameters": [ { "name": "IcaoCode", @@ -1284,7 +1284,7 @@ "Airports.Person" ], "summary": "Update Photo for the navigation property EmergencyAuthority in Airports", - "operationId": "Airports.UpdateEmergencyAuthorityPhoto", + "operationId": "Airports.UpdateEmergencyAuthorityPhoto-13fb", "parameters": [ { "name": "IcaoCode", @@ -1323,7 +1323,7 @@ "Airports.Person" ], "summary": "Delete Photo for the navigation property EmergencyAuthority in Airports", - "operationId": "Airports.DeleteEmergencyAuthorityPhoto", + "operationId": "Airports.DeleteEmergencyAuthorityPhoto-13fb", "parameters": [ { "name": "IcaoCode", @@ -1801,7 +1801,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-b1a4", "responses": { "200": { "description": "Entity result.", @@ -2263,7 +2263,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-2154", "responses": { "200": { "description": "Entity result.", @@ -2419,7 +2419,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-a28d", "responses": { "200": { "description": "Entity result.", @@ -2451,7 +2451,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetBestFriend.AsEmployee", + "operationId": "Me.GetBestFriend.AsEmployee-dcf6", "parameters": [ { "name": "$select", @@ -2513,7 +2513,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetBestFriend.AsManager", + "operationId": "Me.GetBestFriend.AsManager-09a9", "parameters": [ { "name": "$select", @@ -2575,7 +2575,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-8333", "responses": { "200": { "description": "Retrieved media content", @@ -2605,7 +2605,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-8333", "requestBody": { "description": "New media content.", "content": { @@ -2639,7 +2639,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-8333", "parameters": [ { "name": "If-Match", @@ -3069,7 +3069,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-f440", "parameters": [ { "name": "UserName", @@ -3269,7 +3269,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-15cc", "parameters": [ { "name": "UserName", @@ -3313,7 +3313,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetFriends.AsEmployee", + "operationId": "Me.GetFriends.AsEmployee-3dc7", "parameters": [ { "name": "UserName", @@ -3399,7 +3399,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetFriends.AsManager", + "operationId": "Me.GetFriends.AsManager-ddec", "parameters": [ { "name": "UserName", @@ -3485,7 +3485,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-287d", "parameters": [ { "name": "UserName", @@ -3527,7 +3527,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-287d", "parameters": [ { "name": "UserName", @@ -3573,7 +3573,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-287d", "parameters": [ { "name": "UserName", @@ -3805,7 +3805,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsEmployee", + "operationId": "Me.ListFriends.AsEmployee-f4a5", "parameters": [ { "name": "ConsistencyLevel", @@ -3950,7 +3950,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsManager", + "operationId": "Me.ListFriends.AsManager-98ae", "parameters": [ { "name": "ConsistencyLevel", @@ -4189,7 +4189,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-ba49", "responses": { "200": { "description": "Entity result.", @@ -4221,7 +4221,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.Person.GetPerson.AsEmployee", + "operationId": "Me.Person.GetPerson.AsEmployee-bd18", "parameters": [ { "name": "$select", @@ -4486,7 +4486,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-989f", "responses": { "200": { "description": "Entity result.", @@ -4948,7 +4948,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-1d72", "responses": { "200": { "description": "Entity result.", @@ -5104,7 +5104,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-19b8", "responses": { "200": { "description": "Entity result.", @@ -5136,7 +5136,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetBestFriend.AsManager", + "operationId": "Me.GetBestFriend.AsManager-c104", "parameters": [ { "name": "$select", @@ -5198,7 +5198,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-4dc7", "responses": { "200": { "description": "Retrieved media content", @@ -5228,7 +5228,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-4dc7", "requestBody": { "description": "New media content.", "content": { @@ -5262,7 +5262,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-4dc7", "parameters": [ { "name": "If-Match", @@ -5692,7 +5692,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-7b1e", "parameters": [ { "name": "UserName", @@ -5892,7 +5892,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-600f", "parameters": [ { "name": "UserName", @@ -5936,7 +5936,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.GetFriends.AsManager", + "operationId": "Me.GetFriends.AsManager-aa0c", "parameters": [ { "name": "UserName", @@ -6022,7 +6022,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-6e41", "parameters": [ { "name": "UserName", @@ -6064,7 +6064,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-6e41", "parameters": [ { "name": "UserName", @@ -6110,7 +6110,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-6e41", "parameters": [ { "name": "UserName", @@ -6342,7 +6342,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsManager", + "operationId": "Me.ListFriends.AsManager-f993", "parameters": [ { "name": "ConsistencyLevel", @@ -6581,7 +6581,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-6fc5", "responses": { "200": { "description": "Entity result.", @@ -6989,7 +6989,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Peers.ListAddressInfo.AsEventLocation", + "operationId": "Me.Peers.ListAddressInfo.AsEventLocation-1e59", "parameters": [ { "name": "UserName", @@ -7189,7 +7189,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Peers.GetHomeAddress.AsEventLocation", + "operationId": "Me.Peers.GetHomeAddress.AsEventLocation-dc11", "parameters": [ { "name": "UserName", @@ -7233,7 +7233,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Peers from Me", - "operationId": "Me.GetPeersPhoto", + "operationId": "Me.GetPeersPhoto-4c48", "parameters": [ { "name": "UserName", @@ -7275,7 +7275,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Peers in Me", - "operationId": "Me.UpdatePeersPhoto", + "operationId": "Me.UpdatePeersPhoto-4c48", "parameters": [ { "name": "UserName", @@ -7321,7 +7321,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Peers in Me", - "operationId": "Me.DeletePeersPhoto", + "operationId": "Me.DeletePeersPhoto-4c48", "parameters": [ { "name": "UserName", @@ -8558,7 +8558,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "Me.Person.GetPerson.AsManager", + "operationId": "Me.Person.GetPerson.AsManager-16dc", "parameters": [ { "name": "$select", @@ -8823,7 +8823,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.ListAddressInfo.AsEventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-55be", "responses": { "200": { "description": "Entity result.", @@ -9285,7 +9285,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-987a", "responses": { "200": { "description": "Entity result.", @@ -9441,7 +9441,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-15c5", "responses": { "200": { "description": "Entity result.", @@ -9473,7 +9473,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetBestFriend.AsEmployee", + "operationId": "Me.GetBestFriend.AsEmployee-7bbe", "parameters": [ { "name": "$select", @@ -9535,7 +9535,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property BestFriend from Me", - "operationId": "Me.GetBestFriendPhoto", + "operationId": "Me.GetBestFriendPhoto-bac8", "responses": { "200": { "description": "Retrieved media content", @@ -9565,7 +9565,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property BestFriend in Me", - "operationId": "Me.UpdateBestFriendPhoto", + "operationId": "Me.UpdateBestFriendPhoto-bac8", "requestBody": { "description": "New media content.", "content": { @@ -9599,7 +9599,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property BestFriend in Me", - "operationId": "Me.DeleteBestFriendPhoto", + "operationId": "Me.DeleteBestFriendPhoto-bac8", "parameters": [ { "name": "If-Match", @@ -10010,7 +10010,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.DirectReports.ListAddressInfo.AsEventLocation", + "operationId": "Me.DirectReports.ListAddressInfo.AsEventLocation-660b", "parameters": [ { "name": "UserName", @@ -10210,7 +10210,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.DirectReports.GetHomeAddress.AsEventLocation", + "operationId": "Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e", "parameters": [ { "name": "UserName", @@ -10254,7 +10254,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property DirectReports from Me", - "operationId": "Me.GetDirectReportsPhoto", + "operationId": "Me.GetDirectReportsPhoto-e60c", "parameters": [ { "name": "UserName", @@ -10296,7 +10296,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property DirectReports in Me", - "operationId": "Me.UpdateDirectReportsPhoto", + "operationId": "Me.UpdateDirectReportsPhoto-e60c", "parameters": [ { "name": "UserName", @@ -10342,7 +10342,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property DirectReports in Me", - "operationId": "Me.DeleteDirectReportsPhoto", + "operationId": "Me.DeleteDirectReportsPhoto-e60c", "parameters": [ { "name": "UserName", @@ -10940,7 +10940,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.ListAddressInfo.AsEventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-1ad9", "parameters": [ { "name": "UserName", @@ -11140,7 +11140,7 @@ "Me.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.Friends.GetHomeAddress.AsEventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-1e07", "parameters": [ { "name": "UserName", @@ -11184,7 +11184,7 @@ "Me.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "Me.GetFriends.AsEmployee", + "operationId": "Me.GetFriends.AsEmployee-5b5f", "parameters": [ { "name": "UserName", @@ -11270,7 +11270,7 @@ "Me.Person" ], "summary": "Get Photo for the navigation property Friends from Me", - "operationId": "Me.GetFriendsPhoto", + "operationId": "Me.GetFriendsPhoto-64bd", "parameters": [ { "name": "UserName", @@ -11312,7 +11312,7 @@ "Me.Person" ], "summary": "Update Photo for the navigation property Friends in Me", - "operationId": "Me.UpdateFriendsPhoto", + "operationId": "Me.UpdateFriendsPhoto-64bd", "parameters": [ { "name": "UserName", @@ -11358,7 +11358,7 @@ "Me.Person" ], "summary": "Delete Photo for the navigation property Friends in Me", - "operationId": "Me.DeleteFriendsPhoto", + "operationId": "Me.DeleteFriendsPhoto-64bd", "parameters": [ { "name": "UserName", @@ -11590,7 +11590,7 @@ "Me.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "Me.ListFriends.AsEmployee", + "operationId": "Me.ListFriends.AsEmployee-fe32", "parameters": [ { "name": "ConsistencyLevel", @@ -11829,7 +11829,7 @@ "Me.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "Me.GetHomeAddress.AsEventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-5d95", "responses": { "200": { "description": "Entity result.", @@ -12864,7 +12864,7 @@ "Me.Person" ], "summary": "Get Photo for Person from Me", - "operationId": "Me.Person.GetPhoto", + "operationId": "Me.Person.GetPhoto-ab7e", "responses": { "200": { "description": "Retrieved media content", @@ -12894,7 +12894,7 @@ "Me.Person" ], "summary": "Update Photo for Person in Me", - "operationId": "Me.Person.UpdatePhoto", + "operationId": "Me.Person.UpdatePhoto-ab7e", "requestBody": { "description": "New media content.", "content": { @@ -12928,7 +12928,7 @@ "Me.Person" ], "summary": "Delete Photo for Person in Me", - "operationId": "Me.Person.DeletePhoto", + "operationId": "Me.Person.DeletePhoto-ab7e", "parameters": [ { "name": "If-Match", @@ -14317,7 +14317,7 @@ "NewComePeople.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.ListAddressInfo.AsEventLocation-d026", "parameters": [ { "name": "UserName", @@ -14881,7 +14881,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa", "parameters": [ { "name": "UserName", @@ -15081,7 +15081,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe", "parameters": [ { "name": "UserName", @@ -15125,7 +15125,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "NewComePeople.GetBestFriend.AsEmployee", + "operationId": "NewComePeople.GetBestFriend.AsEmployee-7b75", "parameters": [ { "name": "UserName", @@ -15197,7 +15197,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "NewComePeople.GetBestFriend.AsManager", + "operationId": "NewComePeople.GetBestFriend.AsManager-61ce", "parameters": [ { "name": "UserName", @@ -15269,7 +15269,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for the navigation property BestFriend from NewComePeople", - "operationId": "NewComePeople.GetBestFriendPhoto", + "operationId": "NewComePeople.GetBestFriendPhoto-4f67", "parameters": [ { "name": "UserName", @@ -15311,7 +15311,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for the navigation property BestFriend in NewComePeople", - "operationId": "NewComePeople.UpdateBestFriendPhoto", + "operationId": "NewComePeople.UpdateBestFriendPhoto-4f67", "parameters": [ { "name": "UserName", @@ -15357,7 +15357,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for the navigation property BestFriend in NewComePeople", - "operationId": "NewComePeople.DeleteBestFriendPhoto", + "operationId": "NewComePeople.DeleteBestFriendPhoto-4f67", "parameters": [ { "name": "UserName", @@ -15811,7 +15811,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.Friends.ListAddressInfo.AsEventLocation", + "operationId": "NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4", "parameters": [ { "name": "UserName", @@ -16023,7 +16023,7 @@ "NewComePeople.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.Friends.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9", "parameters": [ { "name": "UserName", @@ -16070,7 +16070,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "NewComePeople.GetFriends.AsEmployee", + "operationId": "NewComePeople.GetFriends.AsEmployee-2969", "parameters": [ { "name": "UserName", @@ -16159,7 +16159,7 @@ "NewComePeople.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "NewComePeople.GetFriends.AsManager", + "operationId": "NewComePeople.GetFriends.AsManager-708f", "parameters": [ { "name": "UserName", @@ -16248,7 +16248,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for the navigation property Friends from NewComePeople", - "operationId": "NewComePeople.GetFriendsPhoto", + "operationId": "NewComePeople.GetFriendsPhoto-e9fc", "parameters": [ { "name": "UserName", @@ -16293,7 +16293,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for the navigation property Friends in NewComePeople", - "operationId": "NewComePeople.UpdateFriendsPhoto", + "operationId": "NewComePeople.UpdateFriendsPhoto-e9fc", "parameters": [ { "name": "UserName", @@ -16342,7 +16342,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for the navigation property Friends in NewComePeople", - "operationId": "NewComePeople.DeleteFriendsPhoto", + "operationId": "NewComePeople.DeleteFriendsPhoto-e9fc", "parameters": [ { "name": "UserName", @@ -16591,7 +16591,7 @@ "NewComePeople.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "NewComePeople.ListFriends.AsEmployee", + "operationId": "NewComePeople.ListFriends.AsEmployee-2969", "parameters": [ { "name": "UserName", @@ -16742,7 +16742,7 @@ "NewComePeople.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "NewComePeople.ListFriends.AsManager", + "operationId": "NewComePeople.ListFriends.AsManager-708f", "parameters": [ { "name": "UserName", @@ -16995,7 +16995,7 @@ "NewComePeople.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "NewComePeople.GetHomeAddress.AsEventLocation", + "operationId": "NewComePeople.GetHomeAddress.AsEventLocation-3fd9", "parameters": [ { "name": "UserName", @@ -17332,7 +17332,7 @@ "NewComePeople.Person" ], "summary": "Get Photo for Person from NewComePeople", - "operationId": "NewComePeople.Person.GetPhoto", + "operationId": "NewComePeople.Person.GetPhoto-74be", "parameters": [ { "name": "UserName", @@ -17367,7 +17367,7 @@ "NewComePeople.Person" ], "summary": "Update Photo for Person in NewComePeople", - "operationId": "NewComePeople.Person.UpdatePhoto", + "operationId": "NewComePeople.Person.UpdatePhoto-74be", "parameters": [ { "name": "UserName", @@ -17406,7 +17406,7 @@ "NewComePeople.Person" ], "summary": "Delete Photo for Person in NewComePeople", - "operationId": "NewComePeople.Person.DeletePhoto", + "operationId": "NewComePeople.Person.DeletePhoto-74be", "parameters": [ { "name": "UserName", @@ -18940,7 +18940,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-e5b8", "parameters": [ { "name": "UserName", @@ -19522,7 +19522,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-c332", "parameters": [ { "name": "UserName", @@ -19722,7 +19722,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-53c4", "parameters": [ { "name": "UserName", @@ -19766,7 +19766,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetBestFriend.AsEmployee", + "operationId": "People.GetBestFriend.AsEmployee-7188", "parameters": [ { "name": "UserName", @@ -19843,7 +19843,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0" }, - "operationId": "People.GetBestFriend.AsManager", + "operationId": "People.GetBestFriend.AsManager-5f08", "parameters": [ { "name": "UserName", @@ -19915,7 +19915,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-c3ac", "parameters": [ { "name": "UserName", @@ -19957,7 +19957,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-c3ac", "parameters": [ { "name": "UserName", @@ -20003,7 +20003,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-c3ac", "parameters": [ { "name": "UserName", @@ -20512,7 +20512,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-a5f6", "parameters": [ { "name": "UserName", @@ -20752,7 +20752,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-da5e", "parameters": [ { "name": "UserName", @@ -20806,7 +20806,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetFriends.AsEmployee", + "operationId": "People.GetFriends.AsEmployee-11bf", "parameters": [ { "name": "UserName", @@ -20902,7 +20902,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetFriends.AsManager", + "operationId": "People.GetFriends.AsManager-1cfb", "parameters": [ { "name": "UserName", @@ -20998,7 +20998,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-12fc", "parameters": [ { "name": "UserName", @@ -21050,7 +21050,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-12fc", "parameters": [ { "name": "UserName", @@ -21106,7 +21106,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-12fc", "parameters": [ { "name": "UserName", @@ -21404,7 +21404,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsEmployee", + "operationId": "People.ListFriends.AsEmployee-11bf", "parameters": [ { "name": "UserName", @@ -21569,7 +21569,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsManager", + "operationId": "People.ListFriends.AsManager-1cfb", "parameters": [ { "name": "UserName", @@ -21851,7 +21851,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-d0cf", "parameters": [ { "name": "UserName", @@ -21895,7 +21895,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.Person.GetPerson.AsEmployee", + "operationId": "People.Person.GetPerson.AsEmployee-317b", "parameters": [ { "name": "UserName", @@ -22226,7 +22226,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-1342", "parameters": [ { "name": "UserName", @@ -22808,7 +22808,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-7cd9", "parameters": [ { "name": "UserName", @@ -23008,7 +23008,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-7db9", "parameters": [ { "name": "UserName", @@ -23052,7 +23052,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetBestFriend.AsManager", + "operationId": "People.GetBestFriend.AsManager-7b70", "parameters": [ { "name": "UserName", @@ -23124,7 +23124,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-a839", "parameters": [ { "name": "UserName", @@ -23166,7 +23166,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-a839", "parameters": [ { "name": "UserName", @@ -23212,7 +23212,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-a839", "parameters": [ { "name": "UserName", @@ -23712,7 +23712,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-d49e", "parameters": [ { "name": "UserName", @@ -23952,7 +23952,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-d77d", "parameters": [ { "name": "UserName", @@ -24006,7 +24006,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.GetFriends.AsManager", + "operationId": "People.GetFriends.AsManager-3e3c", "parameters": [ { "name": "UserName", @@ -24102,7 +24102,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-1a66", "parameters": [ { "name": "UserName", @@ -24154,7 +24154,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-1a66", "parameters": [ { "name": "UserName", @@ -24210,7 +24210,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-1a66", "parameters": [ { "name": "UserName", @@ -24494,7 +24494,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsManager", + "operationId": "People.ListFriends.AsManager-3e3c", "parameters": [ { "name": "UserName", @@ -24775,7 +24775,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-90e5", "parameters": [ { "name": "UserName", @@ -25255,7 +25255,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Peers.ListAddressInfo.AsEventLocation", + "operationId": "People.Peers.ListAddressInfo.AsEventLocation-b918", "parameters": [ { "name": "UserName", @@ -25495,7 +25495,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Peers.GetHomeAddress.AsEventLocation", + "operationId": "People.Peers.GetHomeAddress.AsEventLocation-311b", "parameters": [ { "name": "UserName", @@ -25549,7 +25549,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Peers from People", - "operationId": "People.GetPeersPhoto", + "operationId": "People.GetPeersPhoto-ecda", "parameters": [ { "name": "UserName", @@ -25601,7 +25601,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Peers in People", - "operationId": "People.UpdatePeersPhoto", + "operationId": "People.UpdatePeersPhoto-ecda", "parameters": [ { "name": "UserName", @@ -25657,7 +25657,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Peers in People", - "operationId": "People.DeletePeersPhoto", + "operationId": "People.DeletePeersPhoto-ecda", "parameters": [ { "name": "UserName", @@ -27112,7 +27112,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", - "operationId": "People.Person.GetPerson.AsManager", + "operationId": "People.Person.GetPerson.AsManager-d051", "parameters": [ { "name": "UserName", @@ -27443,7 +27443,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.ListAddressInfo.AsEventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-7526", "parameters": [ { "name": "UserName", @@ -28025,7 +28025,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-897f", "parameters": [ { "name": "UserName", @@ -28225,7 +28225,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-545d", "parameters": [ { "name": "UserName", @@ -28269,7 +28269,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetBestFriend.AsEmployee", + "operationId": "People.GetBestFriend.AsEmployee-0445", "parameters": [ { "name": "UserName", @@ -28341,7 +28341,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property BestFriend from People", - "operationId": "People.GetBestFriendPhoto", + "operationId": "People.GetBestFriendPhoto-f05d", "parameters": [ { "name": "UserName", @@ -28383,7 +28383,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property BestFriend in People", - "operationId": "People.UpdateBestFriendPhoto", + "operationId": "People.UpdateBestFriendPhoto-f05d", "parameters": [ { "name": "UserName", @@ -28429,7 +28429,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property BestFriend in People", - "operationId": "People.DeleteBestFriendPhoto", + "operationId": "People.DeleteBestFriendPhoto-f05d", "parameters": [ { "name": "UserName", @@ -28910,7 +28910,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.DirectReports.ListAddressInfo.AsEventLocation", + "operationId": "People.DirectReports.ListAddressInfo.AsEventLocation-1252", "parameters": [ { "name": "UserName", @@ -29150,7 +29150,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.DirectReports.GetHomeAddress.AsEventLocation", + "operationId": "People.DirectReports.GetHomeAddress.AsEventLocation-cf8d", "parameters": [ { "name": "UserName", @@ -29204,7 +29204,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property DirectReports from People", - "operationId": "People.GetDirectReportsPhoto", + "operationId": "People.GetDirectReportsPhoto-7149", "parameters": [ { "name": "UserName", @@ -29256,7 +29256,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property DirectReports in People", - "operationId": "People.UpdateDirectReportsPhoto", + "operationId": "People.UpdateDirectReportsPhoto-7149", "parameters": [ { "name": "UserName", @@ -29312,7 +29312,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property DirectReports in People", - "operationId": "People.DeleteDirectReportsPhoto", + "operationId": "People.DeleteDirectReportsPhoto-7149", "parameters": [ { "name": "UserName", @@ -30022,7 +30022,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.ListAddressInfo.AsEventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-f8c9", "parameters": [ { "name": "UserName", @@ -30262,7 +30262,7 @@ "People.Person.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.Friends.GetHomeAddress.AsEventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-eb71", "parameters": [ { "name": "UserName", @@ -30316,7 +30316,7 @@ "People.Person" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", - "operationId": "People.GetFriends.AsEmployee", + "operationId": "People.GetFriends.AsEmployee-161e", "parameters": [ { "name": "UserName", @@ -30412,7 +30412,7 @@ "People.Person" ], "summary": "Get Photo for the navigation property Friends from People", - "operationId": "People.GetFriendsPhoto", + "operationId": "People.GetFriendsPhoto-b97d", "parameters": [ { "name": "UserName", @@ -30464,7 +30464,7 @@ "People.Person" ], "summary": "Update Photo for the navigation property Friends in People", - "operationId": "People.UpdateFriendsPhoto", + "operationId": "People.UpdateFriendsPhoto-b97d", "parameters": [ { "name": "UserName", @@ -30520,7 +30520,7 @@ "People.Person" ], "summary": "Delete Photo for the navigation property Friends in People", - "operationId": "People.DeleteFriendsPhoto", + "operationId": "People.DeleteFriendsPhoto-b97d", "parameters": [ { "name": "UserName", @@ -30804,7 +30804,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.ListFriends.AsEmployee", + "operationId": "People.ListFriends.AsEmployee-161e", "parameters": [ { "name": "UserName", @@ -31085,7 +31085,7 @@ "People.Location" ], "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", - "operationId": "People.GetHomeAddress.AsEventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-e3dc", "parameters": [ { "name": "UserName", @@ -32303,7 +32303,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.GetPhoto", + "operationId": "People.Person.GetPhoto-883f", "parameters": [ { "name": "UserName", @@ -32350,7 +32350,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.UpdatePhoto", + "operationId": "People.Person.UpdatePhoto-883f", "parameters": [ { "name": "UserName", @@ -32401,7 +32401,7 @@ "description": "Find more info here", "url": "https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0" }, - "operationId": "People.Person.DeletePhoto", + "operationId": "People.Person.DeletePhoto-883f", "parameters": [ { "name": "UserName", @@ -33510,7 +33510,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.Person.ListPerson.AsEmployee", + "operationId": "People.Person.ListPerson.AsEmployee-013a", "parameters": [ { "name": "ConsistencyLevel", @@ -33655,7 +33655,7 @@ "People.Person" ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", - "operationId": "People.Person.ListPerson.AsManager", + "operationId": "People.Person.ListPerson.AsManager-3e14", "parameters": [ { "name": "ConsistencyLevel", 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 26f209cec..0e6d6f62d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -680,7 +680,7 @@ paths: tags: - Airports.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation + operationId: Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9 parameters: - name: IcaoCode in: path @@ -792,7 +792,7 @@ paths: tags: - Airports.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation + operationId: Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9 parameters: - name: IcaoCode in: path @@ -816,7 +816,7 @@ paths: tags: - Airports.Person summary: Get Photo for the navigation property EmergencyAuthority from Airports - operationId: Airports.GetEmergencyAuthorityPhoto + operationId: Airports.GetEmergencyAuthorityPhoto-13fb parameters: - name: IcaoCode in: path @@ -839,7 +839,7 @@ paths: tags: - Airports.Person summary: Update Photo for the navigation property EmergencyAuthority in Airports - operationId: Airports.UpdateEmergencyAuthorityPhoto + operationId: Airports.UpdateEmergencyAuthorityPhoto-13fb parameters: - name: IcaoCode in: path @@ -865,7 +865,7 @@ paths: tags: - Airports.Person summary: Delete Photo for the navigation property EmergencyAuthority in Airports - operationId: Airports.DeleteEmergencyAuthorityPhoto + operationId: Airports.DeleteEmergencyAuthorityPhoto-13fb parameters: - name: IcaoCode in: path @@ -1171,7 +1171,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-b1a4 responses: '200': description: Entity result. @@ -1485,7 +1485,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-2154 responses: '200': description: Entity result. @@ -1591,7 +1591,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-a28d responses: '200': description: Entity result. @@ -1613,7 +1613,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetBestFriend.AsEmployee + operationId: Me.GetBestFriend.AsEmployee-dcf6 parameters: - name: $select in: query @@ -1656,7 +1656,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetBestFriend.AsManager + operationId: Me.GetBestFriend.AsManager-09a9 parameters: - name: $select in: query @@ -1699,7 +1699,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-8333 responses: '200': description: Retrieved media content @@ -1720,7 +1720,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-8333 requestBody: description: New media content. content: @@ -1744,7 +1744,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-8333 parameters: - name: If-Match in: header @@ -2030,7 +2030,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-f440 parameters: - name: UserName in: path @@ -2166,7 +2166,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-15cc parameters: - name: UserName in: path @@ -2196,7 +2196,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetFriends.AsEmployee + operationId: Me.GetFriends.AsEmployee-3dc7 parameters: - name: UserName in: path @@ -2255,7 +2255,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetFriends.AsManager + operationId: Me.GetFriends.AsManager-ddec parameters: - name: UserName in: path @@ -2314,7 +2314,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-287d parameters: - name: UserName in: path @@ -2343,7 +2343,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-287d parameters: - name: UserName in: path @@ -2375,7 +2375,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-287d parameters: - name: UserName in: path @@ -2529,7 +2529,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsEmployee + operationId: Me.ListFriends.AsEmployee-f4a5 parameters: - name: ConsistencyLevel in: header @@ -2622,7 +2622,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsManager + operationId: Me.ListFriends.AsManager-98ae parameters: - name: ConsistencyLevel in: header @@ -2780,7 +2780,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-ba49 responses: '200': description: Entity result. @@ -2802,7 +2802,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.Person.GetPerson.AsEmployee + operationId: Me.Person.GetPerson.AsEmployee-bd18 parameters: - name: $select in: query @@ -2978,7 +2978,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-989f responses: '200': description: Entity result. @@ -3292,7 +3292,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-1d72 responses: '200': description: Entity result. @@ -3398,7 +3398,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-19b8 responses: '200': description: Entity result. @@ -3420,7 +3420,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetBestFriend.AsManager + operationId: Me.GetBestFriend.AsManager-c104 parameters: - name: $select in: query @@ -3463,7 +3463,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-4dc7 responses: '200': description: Retrieved media content @@ -3484,7 +3484,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-4dc7 requestBody: description: New media content. content: @@ -3508,7 +3508,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-4dc7 parameters: - name: If-Match in: header @@ -3794,7 +3794,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-7b1e parameters: - name: UserName in: path @@ -3930,7 +3930,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-600f parameters: - name: UserName in: path @@ -3960,7 +3960,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.GetFriends.AsManager + operationId: Me.GetFriends.AsManager-aa0c parameters: - name: UserName in: path @@ -4019,7 +4019,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-6e41 parameters: - name: UserName in: path @@ -4048,7 +4048,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-6e41 parameters: - name: UserName in: path @@ -4080,7 +4080,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-6e41 parameters: - name: UserName in: path @@ -4234,7 +4234,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsManager + operationId: Me.ListFriends.AsManager-f993 parameters: - name: ConsistencyLevel in: header @@ -4392,7 +4392,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-6fc5 responses: '200': description: Entity result. @@ -4663,7 +4663,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Peers.ListAddressInfo.AsEventLocation + operationId: Me.Peers.ListAddressInfo.AsEventLocation-1e59 parameters: - name: UserName in: path @@ -4799,7 +4799,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Peers.GetHomeAddress.AsEventLocation + operationId: Me.Peers.GetHomeAddress.AsEventLocation-dc11 parameters: - name: UserName in: path @@ -4829,7 +4829,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Peers from Me - operationId: Me.GetPeersPhoto + operationId: Me.GetPeersPhoto-4c48 parameters: - name: UserName in: path @@ -4858,7 +4858,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Peers in Me - operationId: Me.UpdatePeersPhoto + operationId: Me.UpdatePeersPhoto-4c48 parameters: - name: UserName in: path @@ -4890,7 +4890,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Peers in Me - operationId: Me.DeletePeersPhoto + operationId: Me.DeletePeersPhoto-4c48 parameters: - name: UserName in: path @@ -5732,7 +5732,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: Me.Person.GetPerson.AsManager + operationId: Me.Person.GetPerson.AsManager-16dc parameters: - name: $select in: query @@ -5908,7 +5908,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.ListAddressInfo.AsEventLocation + operationId: Me.ListAddressInfo.AsEventLocation-55be responses: '200': description: Entity result. @@ -6222,7 +6222,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.ListAddressInfo.AsEventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-987a responses: '200': description: Entity result. @@ -6328,7 +6328,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.BestFriend.GetHomeAddress.AsEventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-15c5 responses: '200': description: Entity result. @@ -6350,7 +6350,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetBestFriend.AsEmployee + operationId: Me.GetBestFriend.AsEmployee-7bbe parameters: - name: $select in: query @@ -6393,7 +6393,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property BestFriend from Me - operationId: Me.GetBestFriendPhoto + operationId: Me.GetBestFriendPhoto-bac8 responses: '200': description: Retrieved media content @@ -6414,7 +6414,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property BestFriend in Me - operationId: Me.UpdateBestFriendPhoto + operationId: Me.UpdateBestFriendPhoto-bac8 requestBody: description: New media content. content: @@ -6438,7 +6438,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me - operationId: Me.DeleteBestFriendPhoto + operationId: Me.DeleteBestFriendPhoto-bac8 parameters: - name: If-Match in: header @@ -6711,7 +6711,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.DirectReports.ListAddressInfo.AsEventLocation + operationId: Me.DirectReports.ListAddressInfo.AsEventLocation-660b parameters: - name: UserName in: path @@ -6847,7 +6847,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.DirectReports.GetHomeAddress.AsEventLocation + operationId: Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e parameters: - name: UserName in: path @@ -6877,7 +6877,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property DirectReports from Me - operationId: Me.GetDirectReportsPhoto + operationId: Me.GetDirectReportsPhoto-e60c parameters: - name: UserName in: path @@ -6906,7 +6906,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property DirectReports in Me - operationId: Me.UpdateDirectReportsPhoto + operationId: Me.UpdateDirectReportsPhoto-e60c parameters: - name: UserName in: path @@ -6938,7 +6938,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property DirectReports in Me - operationId: Me.DeleteDirectReportsPhoto + operationId: Me.DeleteDirectReportsPhoto-e60c parameters: - name: UserName in: path @@ -7335,7 +7335,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.ListAddressInfo.AsEventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-1ad9 parameters: - name: UserName in: path @@ -7471,7 +7471,7 @@ paths: tags: - Me.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.Friends.GetHomeAddress.AsEventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-1e07 parameters: - name: UserName in: path @@ -7501,7 +7501,7 @@ paths: tags: - Me.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: Me.GetFriends.AsEmployee + operationId: Me.GetFriends.AsEmployee-5b5f parameters: - name: UserName in: path @@ -7560,7 +7560,7 @@ paths: tags: - Me.Person summary: Get Photo for the navigation property Friends from Me - operationId: Me.GetFriendsPhoto + operationId: Me.GetFriendsPhoto-64bd parameters: - name: UserName in: path @@ -7589,7 +7589,7 @@ paths: tags: - Me.Person summary: Update Photo for the navigation property Friends in Me - operationId: Me.UpdateFriendsPhoto + operationId: Me.UpdateFriendsPhoto-64bd parameters: - name: UserName in: path @@ -7621,7 +7621,7 @@ paths: tags: - Me.Person summary: Delete Photo for the navigation property Friends in Me - operationId: Me.DeleteFriendsPhoto + operationId: Me.DeleteFriendsPhoto-64bd parameters: - name: UserName in: path @@ -7775,7 +7775,7 @@ paths: tags: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: Me.ListFriends.AsEmployee + operationId: Me.ListFriends.AsEmployee-fe32 parameters: - name: ConsistencyLevel in: header @@ -7933,7 +7933,7 @@ paths: tags: - Me.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: Me.GetHomeAddress.AsEventLocation + operationId: Me.GetHomeAddress.AsEventLocation-5d95 responses: '200': description: Entity result. @@ -8642,7 +8642,7 @@ paths: tags: - Me.Person summary: Get Photo for Person from Me - operationId: Me.Person.GetPhoto + operationId: Me.Person.GetPhoto-ab7e responses: '200': description: Retrieved media content @@ -8663,7 +8663,7 @@ paths: tags: - Me.Person summary: Update Photo for Person in Me - operationId: Me.Person.UpdatePhoto + operationId: Me.Person.UpdatePhoto-ab7e requestBody: description: New media content. content: @@ -8687,7 +8687,7 @@ paths: tags: - Me.Person summary: Delete Photo for Person in Me - operationId: Me.Person.DeletePhoto + operationId: Me.Person.DeletePhoto-ab7e parameters: - name: If-Match in: header @@ -9620,7 +9620,7 @@ paths: tags: - NewComePeople.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.ListAddressInfo.AsEventLocation + operationId: NewComePeople.ListAddressInfo.AsEventLocation-d026 parameters: - name: UserName in: path @@ -10001,7 +10001,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.BestFriend.ListAddressInfo.AsEventLocation + operationId: NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa parameters: - name: UserName in: path @@ -10137,7 +10137,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.BestFriend.GetHomeAddress.AsEventLocation + operationId: NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe parameters: - name: UserName in: path @@ -10167,7 +10167,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: NewComePeople.GetBestFriend.AsEmployee + operationId: NewComePeople.GetBestFriend.AsEmployee-7b75 parameters: - name: UserName in: path @@ -10217,7 +10217,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: NewComePeople.GetBestFriend.AsManager + operationId: NewComePeople.GetBestFriend.AsManager-61ce parameters: - name: UserName in: path @@ -10267,7 +10267,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for the navigation property BestFriend from NewComePeople - operationId: NewComePeople.GetBestFriendPhoto + operationId: NewComePeople.GetBestFriendPhoto-4f67 parameters: - name: UserName in: path @@ -10296,7 +10296,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for the navigation property BestFriend in NewComePeople - operationId: NewComePeople.UpdateBestFriendPhoto + operationId: NewComePeople.UpdateBestFriendPhoto-4f67 parameters: - name: UserName in: path @@ -10328,7 +10328,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for the navigation property BestFriend in NewComePeople - operationId: NewComePeople.DeleteBestFriendPhoto + operationId: NewComePeople.DeleteBestFriendPhoto-4f67 parameters: - name: UserName in: path @@ -10624,7 +10624,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.Friends.ListAddressInfo.AsEventLocation + operationId: NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4 parameters: - name: UserName in: path @@ -10764,7 +10764,7 @@ paths: tags: - NewComePeople.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.Friends.GetHomeAddress.AsEventLocation + operationId: NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9 parameters: - name: UserName in: path @@ -10795,7 +10795,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: NewComePeople.GetFriends.AsEmployee + operationId: NewComePeople.GetFriends.AsEmployee-2969 parameters: - name: UserName in: path @@ -10855,7 +10855,7 @@ paths: tags: - NewComePeople.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: NewComePeople.GetFriends.AsManager + operationId: NewComePeople.GetFriends.AsManager-708f parameters: - name: UserName in: path @@ -10915,7 +10915,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for the navigation property Friends from NewComePeople - operationId: NewComePeople.GetFriendsPhoto + operationId: NewComePeople.GetFriendsPhoto-e9fc parameters: - name: UserName in: path @@ -10945,7 +10945,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for the navigation property Friends in NewComePeople - operationId: NewComePeople.UpdateFriendsPhoto + operationId: NewComePeople.UpdateFriendsPhoto-e9fc parameters: - name: UserName in: path @@ -10978,7 +10978,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for the navigation property Friends in NewComePeople - operationId: NewComePeople.DeleteFriendsPhoto + operationId: NewComePeople.DeleteFriendsPhoto-e9fc parameters: - name: UserName in: path @@ -11138,7 +11138,7 @@ paths: tags: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: NewComePeople.ListFriends.AsEmployee + operationId: NewComePeople.ListFriends.AsEmployee-2969 parameters: - name: UserName in: path @@ -11233,7 +11233,7 @@ paths: tags: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: NewComePeople.ListFriends.AsManager + operationId: NewComePeople.ListFriends.AsManager-708f parameters: - name: UserName in: path @@ -11396,7 +11396,7 @@ paths: tags: - NewComePeople.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: NewComePeople.GetHomeAddress.AsEventLocation + operationId: NewComePeople.GetHomeAddress.AsEventLocation-3fd9 parameters: - name: UserName in: path @@ -11618,7 +11618,7 @@ paths: tags: - NewComePeople.Person summary: Get Photo for Person from NewComePeople - operationId: NewComePeople.Person.GetPhoto + operationId: NewComePeople.Person.GetPhoto-74be parameters: - name: UserName in: path @@ -11641,7 +11641,7 @@ paths: tags: - NewComePeople.Person summary: Update Photo for Person in NewComePeople - operationId: NewComePeople.Person.UpdatePhoto + operationId: NewComePeople.Person.UpdatePhoto-74be parameters: - name: UserName in: path @@ -11667,7 +11667,7 @@ paths: tags: - NewComePeople.Person summary: Delete Photo for Person in NewComePeople - operationId: NewComePeople.Person.DeletePhoto + operationId: NewComePeople.Person.DeletePhoto-74be parameters: - name: UserName in: path @@ -12690,7 +12690,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-e5b8 parameters: - name: UserName in: path @@ -13086,7 +13086,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-c332 parameters: - name: UserName in: path @@ -13222,7 +13222,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-53c4 parameters: - name: UserName in: path @@ -13252,7 +13252,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetBestFriend.AsEmployee + operationId: People.GetBestFriend.AsEmployee-7188 parameters: - name: UserName in: path @@ -13306,7 +13306,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0 - operationId: People.GetBestFriend.AsManager + operationId: People.GetBestFriend.AsManager-5f08 parameters: - name: UserName in: path @@ -13356,7 +13356,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-c3ac parameters: - name: UserName in: path @@ -13385,7 +13385,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-c3ac parameters: - name: UserName in: path @@ -13417,7 +13417,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-c3ac parameters: - name: UserName in: path @@ -13759,7 +13759,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-a5f6 parameters: - name: UserName in: path @@ -13923,7 +13923,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-da5e parameters: - name: UserName in: path @@ -13960,7 +13960,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetFriends.AsEmployee + operationId: People.GetFriends.AsEmployee-11bf parameters: - name: UserName in: path @@ -14026,7 +14026,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetFriends.AsManager + operationId: People.GetFriends.AsManager-1cfb parameters: - name: UserName in: path @@ -14092,7 +14092,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-12fc parameters: - name: UserName in: path @@ -14128,7 +14128,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-12fc parameters: - name: UserName in: path @@ -14167,7 +14167,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-12fc parameters: - name: UserName in: path @@ -14368,7 +14368,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsEmployee + operationId: People.ListFriends.AsEmployee-11bf parameters: - name: UserName in: path @@ -14475,7 +14475,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsManager + operationId: People.ListFriends.AsManager-1cfb parameters: - name: UserName in: path @@ -14663,7 +14663,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-d0cf parameters: - name: UserName in: path @@ -14693,7 +14693,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.Person.GetPerson.AsEmployee + operationId: People.Person.GetPerson.AsEmployee-317b parameters: - name: UserName in: path @@ -14914,7 +14914,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-1342 parameters: - name: UserName in: path @@ -15310,7 +15310,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-7cd9 parameters: - name: UserName in: path @@ -15446,7 +15446,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-7db9 parameters: - name: UserName in: path @@ -15476,7 +15476,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetBestFriend.AsManager + operationId: People.GetBestFriend.AsManager-7b70 parameters: - name: UserName in: path @@ -15526,7 +15526,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-a839 parameters: - name: UserName in: path @@ -15555,7 +15555,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-a839 parameters: - name: UserName in: path @@ -15587,7 +15587,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-a839 parameters: - name: UserName in: path @@ -15922,7 +15922,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-d49e parameters: - name: UserName in: path @@ -16086,7 +16086,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-d77d parameters: - name: UserName in: path @@ -16123,7 +16123,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.GetFriends.AsManager + operationId: People.GetFriends.AsManager-3e3c parameters: - name: UserName in: path @@ -16189,7 +16189,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-1a66 parameters: - name: UserName in: path @@ -16225,7 +16225,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-1a66 parameters: - name: UserName in: path @@ -16264,7 +16264,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-1a66 parameters: - name: UserName in: path @@ -16454,7 +16454,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsManager + operationId: People.ListFriends.AsManager-3e3c parameters: - name: UserName in: path @@ -16641,7 +16641,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-90e5 parameters: - name: UserName in: path @@ -16962,7 +16962,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Peers.ListAddressInfo.AsEventLocation + operationId: People.Peers.ListAddressInfo.AsEventLocation-b918 parameters: - name: UserName in: path @@ -17126,7 +17126,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Peers.GetHomeAddress.AsEventLocation + operationId: People.Peers.GetHomeAddress.AsEventLocation-311b parameters: - name: UserName in: path @@ -17163,7 +17163,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Peers from People - operationId: People.GetPeersPhoto + operationId: People.GetPeersPhoto-ecda parameters: - name: UserName in: path @@ -17199,7 +17199,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Peers in People - operationId: People.UpdatePeersPhoto + operationId: People.UpdatePeersPhoto-ecda parameters: - name: UserName in: path @@ -17238,7 +17238,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Peers in People - operationId: People.DeletePeersPhoto + operationId: People.DeletePeersPhoto-ecda parameters: - name: UserName in: path @@ -18231,7 +18231,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager - operationId: People.Person.GetPerson.AsManager + operationId: People.Person.GetPerson.AsManager-d051 parameters: - name: UserName in: path @@ -18452,7 +18452,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.ListAddressInfo.AsEventLocation + operationId: People.ListAddressInfo.AsEventLocation-7526 parameters: - name: UserName in: path @@ -18848,7 +18848,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.ListAddressInfo.AsEventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-897f parameters: - name: UserName in: path @@ -18984,7 +18984,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.BestFriend.GetHomeAddress.AsEventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-545d parameters: - name: UserName in: path @@ -19014,7 +19014,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetBestFriend.AsEmployee + operationId: People.GetBestFriend.AsEmployee-0445 parameters: - name: UserName in: path @@ -19064,7 +19064,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property BestFriend from People - operationId: People.GetBestFriendPhoto + operationId: People.GetBestFriendPhoto-f05d parameters: - name: UserName in: path @@ -19093,7 +19093,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property BestFriend in People - operationId: People.UpdateBestFriendPhoto + operationId: People.UpdateBestFriendPhoto-f05d parameters: - name: UserName in: path @@ -19125,7 +19125,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property BestFriend in People - operationId: People.DeleteBestFriendPhoto + operationId: People.DeleteBestFriendPhoto-f05d parameters: - name: UserName in: path @@ -19447,7 +19447,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.DirectReports.ListAddressInfo.AsEventLocation + operationId: People.DirectReports.ListAddressInfo.AsEventLocation-1252 parameters: - name: UserName in: path @@ -19611,7 +19611,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.DirectReports.GetHomeAddress.AsEventLocation + operationId: People.DirectReports.GetHomeAddress.AsEventLocation-cf8d parameters: - name: UserName in: path @@ -19648,7 +19648,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property DirectReports from People - operationId: People.GetDirectReportsPhoto + operationId: People.GetDirectReportsPhoto-7149 parameters: - name: UserName in: path @@ -19684,7 +19684,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property DirectReports in People - operationId: People.UpdateDirectReportsPhoto + operationId: People.UpdateDirectReportsPhoto-7149 parameters: - name: UserName in: path @@ -19723,7 +19723,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property DirectReports in People - operationId: People.DeleteDirectReportsPhoto + operationId: People.DeleteDirectReportsPhoto-7149 parameters: - name: UserName in: path @@ -20198,7 +20198,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.ListAddressInfo.AsEventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-f8c9 parameters: - name: UserName in: path @@ -20362,7 +20362,7 @@ paths: tags: - People.Person.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.Friends.GetHomeAddress.AsEventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-eb71 parameters: - name: UserName in: path @@ -20399,7 +20399,7 @@ paths: tags: - People.Person summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee - operationId: People.GetFriends.AsEmployee + operationId: People.GetFriends.AsEmployee-161e parameters: - name: UserName in: path @@ -20465,7 +20465,7 @@ paths: tags: - People.Person summary: Get Photo for the navigation property Friends from People - operationId: People.GetFriendsPhoto + operationId: People.GetFriendsPhoto-b97d parameters: - name: UserName in: path @@ -20501,7 +20501,7 @@ paths: tags: - People.Person summary: Update Photo for the navigation property Friends in People - operationId: People.UpdateFriendsPhoto + operationId: People.UpdateFriendsPhoto-b97d parameters: - name: UserName in: path @@ -20540,7 +20540,7 @@ paths: tags: - People.Person summary: Delete Photo for the navigation property Friends in People - operationId: People.DeleteFriendsPhoto + operationId: People.DeleteFriendsPhoto-b97d parameters: - name: UserName in: path @@ -20730,7 +20730,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.ListFriends.AsEmployee + operationId: People.ListFriends.AsEmployee-161e parameters: - name: UserName in: path @@ -20917,7 +20917,7 @@ paths: tags: - People.Location summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation - operationId: People.GetHomeAddress.AsEventLocation + operationId: People.GetHomeAddress.AsEventLocation-e3dc parameters: - name: UserName in: path @@ -21753,7 +21753,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0 - operationId: People.Person.GetPhoto + operationId: People.Person.GetPhoto-883f parameters: - name: UserName in: path @@ -21786,7 +21786,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0 - operationId: People.Person.UpdatePhoto + operationId: People.Person.UpdatePhoto-883f parameters: - name: UserName in: path @@ -21822,7 +21822,7 @@ paths: externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0 - operationId: People.Person.DeletePhoto + operationId: People.Person.DeletePhoto-883f parameters: - name: UserName in: path @@ -22581,7 +22581,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.Person.ListPerson.AsEmployee + operationId: People.Person.ListPerson.AsEmployee-013a parameters: - name: ConsistencyLevel in: header @@ -22674,7 +22674,7 @@ paths: tags: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection - operationId: People.Person.ListPerson.AsManager + operationId: People.Person.ListPerson.AsManager-3e14 parameters: - name: ConsistencyLevel in: header From c39e108507174bd284efb8b4db8c63ff46e53b5e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 3 Jan 2025 14:53:11 -0500 Subject: [PATCH 072/103] chore: adds OAS 3.1 integration tests Signed-off-by: Vincent Biret --- .../EdmModelOpenApiExtensionsTest.cs | 9 + ...icrosoft.OpenAPI.OData.Reader.Tests.csproj | 20 +- .../Resources/Basic.OpenApi.V3.1.json | 1483 + .../Resources/Basic.OpenApi.V3.1.yaml | 972 + .../Resources/Empty.OpenApi.V3.1.json | 228 + .../Resources/Empty.OpenApi.V3.1.yaml | 156 + .../Multiple.Schema.OpenApi.V3.1.json | 7815 ++++ .../Multiple.Schema.OpenApi.V3.1.yaml | 5564 +++ .../Resources/TripService.OpenApi.V3.1.json | 35661 ++++++++++++++++ .../Resources/TripService.OpenApi.V3.1.yaml | 23923 +++++++++++ 10 files changed, 75827 insertions(+), 4 deletions(-) create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json create mode 100644 test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index 2cdd95950..388e5a495 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -29,8 +29,10 @@ public void ConvertToOpenApiThrowsArgumentNullModel() [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange @@ -52,8 +54,10 @@ public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange @@ -77,8 +81,10 @@ public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange @@ -104,8 +110,10 @@ public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Json)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Json)] [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange @@ -156,6 +164,7 @@ private static string GetVersion(OpenApiSpecVersion version) => version switch { OpenApiSpecVersion.OpenApi2_0 => "V2.", OpenApiSpecVersion.OpenApi3_0 => string.Empty, + OpenApiSpecVersion.OpenApi3_1 => "V3.1.", _ => throw new NotImplementedException() }; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index 29f549122..655eaea0d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -15,23 +15,31 @@ + + + + + + + + @@ -42,22 +50,30 @@ + + + + + + + + @@ -81,8 +97,4 @@ - - - - diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json new file mode 100644 index 000000000..ce14d122f --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json @@ -0,0 +1,1483 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "OData Service for namespace DefaultNs", + "description": "This OData service is located at http://localhost", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/City": { + "description": "Provides operations to manage the collection of City entities.", + "get": { + "tags": [ + "City.City" + ], + "summary": "Get entities from City", + "operationId": "City.City.ListCity", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name", + "Name desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/DefaultNs.CityCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "City.City" + ], + "summary": "Add new entity to City", + "operationId": "City.City.CreateCity", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.City" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.City" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/City({Name})": { + "description": "Provides operations to manage the collection of City entities.", + "get": { + "tags": [ + "City.City" + ], + "summary": "Get entity from City by key", + "operationId": "City.City.GetCity", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of City", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "City" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.City" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "City.City" + ], + "summary": "Update entity in City", + "operationId": "City.City.UpdateCity", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of City", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "City" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.City" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "City.City" + ], + "summary": "Delete entity from City", + "operationId": "City.City.DeleteCity", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of City", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "City" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/City/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "City.City" + ], + "summary": "Get the number of the resource", + "operationId": "City.GetCount-8728", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/CountryOrRegion": { + "description": "Provides operations to manage the collection of CountryOrRegion entities.", + "get": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Get entities from CountryOrRegion", + "operationId": "CountryOrRegion.CountryOrRegion.ListCountryOrRegion", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name", + "Name desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/DefaultNs.CountryOrRegionCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Add new entity to CountryOrRegion", + "operationId": "CountryOrRegion.CountryOrRegion.CreateCountryOrRegion", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/CountryOrRegion({Name})": { + "description": "Provides operations to manage the collection of CountryOrRegion entities.", + "get": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Get entity from CountryOrRegion by key", + "operationId": "CountryOrRegion.CountryOrRegion.GetCountryOrRegion", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of CountryOrRegion", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "CountryOrRegion" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Update entity in CountryOrRegion", + "operationId": "CountryOrRegion.CountryOrRegion.UpdateCountryOrRegion", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of CountryOrRegion", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "CountryOrRegion" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Delete entity from CountryOrRegion", + "operationId": "CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion", + "parameters": [ + { + "name": "Name", + "in": "path", + "description": "The unique identifier of CountryOrRegion", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "CountryOrRegion" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/CountryOrRegion/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "CountryOrRegion.CountryOrRegion" + ], + "summary": "Get the number of the resource", + "operationId": "CountryOrRegion.GetCount-daf5", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Me": { + "description": "Provides operations to manage the Person singleton.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Me", + "operationId": "Me.Person.GetPerson", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "UserName", + "HomeAddress", + "WorkAddress", + "Addresses" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Person" + ], + "summary": "Update Me", + "operationId": "Me.Person.UpdatePerson", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get entities from People", + "description": "People's description.", + "operationId": "People.Person.ListPerson", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "UserName", + "UserName desc", + "HomeAddress", + "HomeAddress desc", + "WorkAddress", + "WorkAddress desc", + "Addresses", + "Addresses desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "UserName", + "HomeAddress", + "WorkAddress", + "Addresses" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/DefaultNs.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Add new entity to People", + "operationId": "People.Person.CreatePerson", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People({UserName})": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get entity from People by key", + "operationId": "People.Person.GetPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "UserName", + "HomeAddress", + "WorkAddress", + "Addresses" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Person" + ], + "summary": "Update entity in People", + "operationId": "People.Person.UpdatePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete entity from People", + "operationId": "People.Person.DeletePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.GetCount-dd8d", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + } + }, + "components": { + "schemas": { + "DefaultNs.ODataErrors.ODataError": { + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/DefaultNs.ODataErrors.MainError" + } + } + }, + "DefaultNs.ODataErrors.MainError": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": [ + "null", + "string" + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/components/schemas/DefaultNs.ODataErrors.InnerError" + } + } + }, + "DefaultNs.ODataErrors.ErrorDetails": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": [ + "null", + "string" + ] + } + } + }, + "DefaultNs.ODataErrors.InnerError": { + "type": "object", + "description": "The structure of this object is service-specific" + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": [ + "null", + "string" + ] + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": [ + "null", + "string" + ] + }, + "DefaultNs.Color": { + "title": "Color", + "enum": [ + "Blue", + "White" + ], + "type": "string", + "description": "Enum type 'Color' description." + }, + "DefaultNs.Person": { + "title": "Person", + "type": "object", + "properties": { + "UserName": { + "type": "string" + }, + "HomeAddress": { + "$ref": "#/components/schemas/DefaultNs.Address" + }, + "WorkAddress": { + "$ref": "#/components/schemas/DefaultNs.Address" + }, + "Addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.Address" + } + } + }, + "example": { + "UserName": "string (identifier)", + "HomeAddress": { + "@odata.type": "DefaultNs.Address" + }, + "WorkAddress": { + "@odata.type": "DefaultNs.Address" + }, + "Addresses": [ + { + "@odata.type": "DefaultNs.Address" + } + ] + } + }, + "DefaultNs.City": { + "title": "City", + "type": "object", + "properties": { + "Name": { + "type": "string" + } + }, + "example": { + "Name": "string (identifier)" + } + }, + "DefaultNs.CountryOrRegion": { + "title": "CountryOrRegion", + "type": "object", + "properties": { + "Name": { + "type": "string" + } + }, + "example": { + "Name": "string (identifier)" + } + }, + "DefaultNs.Address": { + "title": "Address", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "City": { + "$ref": "#/components/schemas/DefaultNs.City" + } + }, + "example": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + } + } + }, + "DefaultNs.WorkAddress": { + "allOf": [ + { + "$ref": "#/components/schemas/DefaultNs.Address" + }, + { + "title": "WorkAddress", + "type": "object", + "properties": { + "CountryOrRegion": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + } + ], + "example": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + }, + "CountryOrRegion": { + "@odata.type": "DefaultNs.CountryOrRegion" + } + } + }, + "DefaultNs.PersonCollectionResponse": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.Person" + } + } + } + }, + "DefaultNs.CityCollectionResponse": { + "title": "Collection of City", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.City" + } + } + } + }, + "DefaultNs.CountryOrRegionCollectionResponse": { + "title": "Collection of CountryOrRegion", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegion" + } + } + } + }, + "DefaultNs.AddressCollectionResponse": { + "title": "Collection of DefaultNs.Address", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DefaultNs.Address" + } + } + } + } + }, + "responses": { + "error": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.ODataErrors.ODataError" + } + } + } + }, + "ODataCountResponse": { + "description": "The count of the resource", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ODataCountResponse" + } + } + } + }, + "DefaultNs.PersonCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.PersonCollectionResponse" + } + } + } + }, + "DefaultNs.CityCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CityCollectionResponse" + } + } + } + }, + "DefaultNs.CountryOrRegionCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.CountryOrRegionCollectionResponse" + } + } + } + }, + "DefaultNs.AddressCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultNs.AddressCollectionResponse" + } + } + } + } + }, + "parameters": { + "top": { + "name": "$top", + "in": "query", + "description": "Show only the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + }, + "example": 50 + }, + "skip": { + "name": "$skip", + "in": "query", + "description": "Skip the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + } + }, + "count": { + "name": "$count", + "in": "query", + "description": "Include count of items", + "style": "form", + "explode": false, + "schema": { + "type": "boolean" + } + }, + "filter": { + "name": "$filter", + "in": "query", + "description": "Filter items by property values", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + }, + "search": { + "name": "$search", + "in": "query", + "description": "Search items by search phrases", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + } + }, + "examples": { + "DefaultNs.Person": { + "value": { + "UserName": "string (identifier)", + "HomeAddress": { + "@odata.type": "DefaultNs.Address" + }, + "WorkAddress": { + "@odata.type": "DefaultNs.Address" + }, + "Addresses": [ + { + "@odata.type": "DefaultNs.Address" + } + ] + } + }, + "DefaultNs.City": { + "value": { + "Name": "string (identifier)" + } + }, + "DefaultNs.CountryOrRegion": { + "value": { + "Name": "string (identifier)" + } + }, + "DefaultNs.Address": { + "value": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + } + } + }, + "DefaultNs.WorkAddress": { + "value": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + }, + "CountryOrRegion": { + "@odata.type": "DefaultNs.CountryOrRegion" + } + } + } + }, + "requestBodies": { + "refPostBody": { + "description": "New navigation property ref value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceCreate" + } + } + }, + "required": true + }, + "refPutBody": { + "description": "New navigation property ref values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceUpdate" + } + } + }, + "required": true + } + } + }, + "tags": [ + { + "name": "City.City", + "x-ms-docs-toc-type": "page" + }, + { + "name": "CountryOrRegion.CountryOrRegion", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Me.Person", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Person", + "x-ms-docs-toc-type": "page" + } + ] +} diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml new file mode 100644 index 000000000..6cbed0ed7 --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml @@ -0,0 +1,972 @@ +openapi: '3.1.1' +info: + title: OData Service for namespace DefaultNs + description: This OData service is located at http://localhost + version: 1.0.0 +servers: + - url: http://localhost +paths: + /City: + description: Provides operations to manage the collection of City entities. + get: + tags: + - City.City + summary: Get entities from City + operationId: City.City.ListCity + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + - Name desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/DefaultNs.CityCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - City.City + summary: Add new entity to City + operationId: City.City.CreateCity + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.City' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.City' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/City({Name})': + description: Provides operations to manage the collection of City entities. + get: + tags: + - City.City + summary: Get entity from City by key + operationId: City.City.GetCity + parameters: + - name: Name + in: path + description: The unique identifier of City + required: true + schema: + type: string + x-ms-docs-key-type: City + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.City' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - City.City + summary: Update entity in City + operationId: City.City.UpdateCity + parameters: + - name: Name + in: path + description: The unique identifier of City + required: true + schema: + type: string + x-ms-docs-key-type: City + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.City' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - City.City + summary: Delete entity from City + operationId: City.City.DeleteCity + parameters: + - name: Name + in: path + description: The unique identifier of City + required: true + schema: + type: string + x-ms-docs-key-type: City + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /City/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - City.City + summary: Get the number of the resource + operationId: City.GetCount-8728 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /CountryOrRegion: + description: Provides operations to manage the collection of CountryOrRegion entities. + get: + tags: + - CountryOrRegion.CountryOrRegion + summary: Get entities from CountryOrRegion + operationId: CountryOrRegion.CountryOrRegion.ListCountryOrRegion + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + - Name desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/DefaultNs.CountryOrRegionCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - CountryOrRegion.CountryOrRegion + summary: Add new entity to CountryOrRegion + operationId: CountryOrRegion.CountryOrRegion.CreateCountryOrRegion + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/CountryOrRegion({Name})': + description: Provides operations to manage the collection of CountryOrRegion entities. + get: + tags: + - CountryOrRegion.CountryOrRegion + summary: Get entity from CountryOrRegion by key + operationId: CountryOrRegion.CountryOrRegion.GetCountryOrRegion + parameters: + - name: Name + in: path + description: The unique identifier of CountryOrRegion + required: true + schema: + type: string + x-ms-docs-key-type: CountryOrRegion + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - CountryOrRegion.CountryOrRegion + summary: Update entity in CountryOrRegion + operationId: CountryOrRegion.CountryOrRegion.UpdateCountryOrRegion + parameters: + - name: Name + in: path + description: The unique identifier of CountryOrRegion + required: true + schema: + type: string + x-ms-docs-key-type: CountryOrRegion + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - CountryOrRegion.CountryOrRegion + summary: Delete entity from CountryOrRegion + operationId: CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion + parameters: + - name: Name + in: path + description: The unique identifier of CountryOrRegion + required: true + schema: + type: string + x-ms-docs-key-type: CountryOrRegion + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /CountryOrRegion/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - CountryOrRegion.CountryOrRegion + summary: Get the number of the resource + operationId: CountryOrRegion.GetCount-daf5 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Me: + description: Provides operations to manage the Person singleton. + get: + tags: + - Me.Person + summary: Get Me + operationId: Me.Person.GetPerson + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - UserName + - HomeAddress + - WorkAddress + - Addresses + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Person + summary: Update Me + operationId: Me.Person.UpdatePerson + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /People: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get entities from People + description: People's description. + operationId: People.Person.ListPerson + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - UserName + - UserName desc + - HomeAddress + - HomeAddress desc + - WorkAddress + - WorkAddress desc + - Addresses + - Addresses desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - UserName + - HomeAddress + - WorkAddress + - Addresses + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/DefaultNs.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - People.Person + summary: Add new entity to People + operationId: People.Person.CreatePerson + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/People({UserName})': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get entity from People by key + operationId: People.Person.GetPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - UserName + - HomeAddress + - WorkAddress + - Addresses + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - People.Person + summary: Update entity in People + operationId: People.Person.UpdatePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete entity from People + operationId: People.Person.DeletePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /People/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.GetCount-dd8d + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' +components: + schemas: + DefaultNs.ODataErrors.ODataError: + required: + - error + type: object + properties: + error: + $ref: '#/components/schemas/DefaultNs.ODataErrors.MainError' + DefaultNs.ODataErrors.MainError: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: + - 'null' + - string + details: + type: array + items: + $ref: '#/components/schemas/DefaultNs.ODataErrors.ErrorDetails' + innerError: + $ref: '#/components/schemas/DefaultNs.ODataErrors.InnerError' + DefaultNs.ODataErrors.ErrorDetails: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + target: + type: + - 'null' + - string + DefaultNs.ODataErrors.InnerError: + type: object + description: The structure of this object is service-specific + ODataCountResponse: + type: number + format: int64 + ReferenceUpdate: + type: object + properties: + '@odata.id': + type: string + '@odata.type': + type: + - 'null' + - string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + enum: + - '-INF' + - INF + - NaN + type: + - 'null' + - string + DefaultNs.Color: + title: Color + enum: + - Blue + - White + type: string + description: Enum type 'Color' description. + DefaultNs.Person: + title: Person + type: object + properties: + UserName: + type: string + HomeAddress: + $ref: '#/components/schemas/DefaultNs.Address' + WorkAddress: + $ref: '#/components/schemas/DefaultNs.Address' + Addresses: + type: array + items: + $ref: '#/components/schemas/DefaultNs.Address' + example: + UserName: string (identifier) + HomeAddress: + '@odata.type': DefaultNs.Address + WorkAddress: + '@odata.type': DefaultNs.Address + Addresses: + - '@odata.type': DefaultNs.Address + DefaultNs.City: + title: City + type: object + properties: + Name: + type: string + example: + Name: string (identifier) + DefaultNs.CountryOrRegion: + title: CountryOrRegion + type: object + properties: + Name: + type: string + example: + Name: string (identifier) + DefaultNs.Address: + title: Address + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + City: + $ref: '#/components/schemas/DefaultNs.City' + example: + Id: 0 + City: + '@odata.type': DefaultNs.City + DefaultNs.WorkAddress: + allOf: + - $ref: '#/components/schemas/DefaultNs.Address' + - title: WorkAddress + type: object + properties: + CountryOrRegion: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + example: + Id: 0 + City: + '@odata.type': DefaultNs.City + CountryOrRegion: + '@odata.type': DefaultNs.CountryOrRegion + DefaultNs.PersonCollectionResponse: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/DefaultNs.Person' + DefaultNs.CityCollectionResponse: + title: Collection of City + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/DefaultNs.City' + DefaultNs.CountryOrRegionCollectionResponse: + title: Collection of CountryOrRegion + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/DefaultNs.CountryOrRegion' + DefaultNs.AddressCollectionResponse: + title: Collection of DefaultNs.Address + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/DefaultNs.Address' + responses: + error: + description: error + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.ODataErrors.ODataError' + ODataCountResponse: + description: The count of the resource + content: + text/plain: + schema: + $ref: '#/components/schemas/ODataCountResponse' + DefaultNs.PersonCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.PersonCollectionResponse' + DefaultNs.CityCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CityCollectionResponse' + DefaultNs.CountryOrRegionCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.CountryOrRegionCollectionResponse' + DefaultNs.AddressCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultNs.AddressCollectionResponse' + parameters: + top: + name: $top + in: query + description: Show only the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + example: 50 + skip: + name: $skip + in: query + description: Skip the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + count: + name: $count + in: query + description: Include count of items + style: form + explode: false + schema: + type: boolean + filter: + name: $filter + in: query + description: Filter items by property values + style: form + explode: false + schema: + type: string + search: + name: $search + in: query + description: Search items by search phrases + style: form + explode: false + schema: + type: string + examples: + DefaultNs.Person: + value: + UserName: string (identifier) + HomeAddress: + '@odata.type': DefaultNs.Address + WorkAddress: + '@odata.type': DefaultNs.Address + Addresses: + - '@odata.type': DefaultNs.Address + DefaultNs.City: + value: + Name: string (identifier) + DefaultNs.CountryOrRegion: + value: + Name: string (identifier) + DefaultNs.Address: + value: + Id: 0 + City: + '@odata.type': DefaultNs.City + DefaultNs.WorkAddress: + value: + Id: 0 + City: + '@odata.type': DefaultNs.City + CountryOrRegion: + '@odata.type': DefaultNs.CountryOrRegion + requestBodies: + refPostBody: + description: New navigation property ref value + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceCreate' + required: true + refPutBody: + description: New navigation property ref values + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceUpdate' + required: true +tags: + - name: City.City + x-ms-docs-toc-type: page + - name: CountryOrRegion.CountryOrRegion + x-ms-docs-toc-type: page + - name: Me.Person + x-ms-docs-toc-type: page + - name: People.Person + x-ms-docs-toc-type: page diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json new file mode 100644 index 000000000..15c539844 --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json @@ -0,0 +1,228 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "OData Service for namespace ", + "description": "This OData service is located at http://localhost", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { }, + "components": { + "schemas": { + "ODataErrors.ODataError": { + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ODataErrors.MainError" + } + } + }, + "ODataErrors.MainError": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": [ + "null", + "string" + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/components/schemas/ODataErrors.InnerError" + } + } + }, + "ODataErrors.ErrorDetails": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": [ + "null", + "string" + ] + } + } + }, + "ODataErrors.InnerError": { + "type": "object", + "description": "The structure of this object is service-specific" + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": [ + "null", + "string" + ] + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": [ + "null", + "string" + ] + } + }, + "responses": { + "error": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ODataErrors.ODataError" + } + } + } + }, + "ODataCountResponse": { + "description": "The count of the resource", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ODataCountResponse" + } + } + } + } + }, + "parameters": { + "top": { + "name": "$top", + "in": "query", + "description": "Show only the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + }, + "example": 50 + }, + "skip": { + "name": "$skip", + "in": "query", + "description": "Skip the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + } + }, + "count": { + "name": "$count", + "in": "query", + "description": "Include count of items", + "style": "form", + "explode": false, + "schema": { + "type": "boolean" + } + }, + "filter": { + "name": "$filter", + "in": "query", + "description": "Filter items by property values", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + }, + "search": { + "name": "$search", + "in": "query", + "description": "Search items by search phrases", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + } + }, + "requestBodies": { + "refPostBody": { + "description": "New navigation property ref value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceCreate" + } + } + }, + "required": true + }, + "refPutBody": { + "description": "New navigation property ref values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceUpdate" + } + } + }, + "required": true + } + } + } +} diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml new file mode 100644 index 000000000..97a23175d --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml @@ -0,0 +1,156 @@ +openapi: '3.1.1' +info: + title: 'OData Service for namespace ' + description: This OData service is located at http://localhost + version: 1.0.0 +servers: + - url: http://localhost +paths: { } +components: + schemas: + ODataErrors.ODataError: + required: + - error + type: object + properties: + error: + $ref: '#/components/schemas/ODataErrors.MainError' + ODataErrors.MainError: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: + - 'null' + - string + details: + type: array + items: + $ref: '#/components/schemas/ODataErrors.ErrorDetails' + innerError: + $ref: '#/components/schemas/ODataErrors.InnerError' + ODataErrors.ErrorDetails: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + target: + type: + - 'null' + - string + ODataErrors.InnerError: + type: object + description: The structure of this object is service-specific + ODataCountResponse: + type: number + format: int64 + ReferenceUpdate: + type: object + properties: + '@odata.id': + type: string + '@odata.type': + type: + - 'null' + - string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + enum: + - '-INF' + - INF + - NaN + type: + - 'null' + - string + responses: + error: + description: error + content: + application/json: + schema: + $ref: '#/components/schemas/ODataErrors.ODataError' + ODataCountResponse: + description: The count of the resource + content: + text/plain: + schema: + $ref: '#/components/schemas/ODataCountResponse' + parameters: + top: + name: $top + in: query + description: Show only the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + example: 50 + skip: + name: $skip + in: query + description: Skip the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + count: + name: $count + in: query + description: Include count of items + style: form + explode: false + schema: + type: boolean + filter: + name: $filter + in: query + description: Filter items by property values + style: form + explode: false + schema: + type: string + search: + name: $search + in: query + description: Search items by search phrases + style: form + explode: false + schema: + type: string + requestBodies: + refPostBody: + description: New navigation property ref value + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceCreate' + required: true + refPutBody: + description: New navigation property ref values + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceUpdate' + required: true diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json new file mode 100644 index 000000000..dc276bab4 --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json @@ -0,0 +1,7815 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "OData Service for namespace Default", + "description": "This OData service is located at http://localhost", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/Categories": { + "description": "Provides operations to manage the collection of CategoryDto entities.", + "get": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Get entities from Categories", + "operationId": "Categories.CategoryDto.ListCategoryDto", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Description", + "Description desc", + "CreationDate", + "CreationDate desc", + "ModificationDate", + "ModificationDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "CreationDate", + "ModificationDate", + "DomainId" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.CategoryDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Add new entity to Categories", + "operationId": "Categories.CategoryDto.CreateCategoryDto", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDto" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Categories({Id})": { + "description": "Provides operations to manage the collection of CategoryDto entities.", + "get": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Get entity from Categories by key", + "operationId": "Categories.CategoryDto.GetCategoryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of CategoryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "CategoryDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "CreationDate", + "ModificationDate", + "DomainId" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Update entity in Categories", + "operationId": "Categories.CategoryDto.UpdateCategoryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of CategoryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "CategoryDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDto" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Delete entity from Categories", + "operationId": "Categories.CategoryDto.DeleteCategoryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of CategoryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "CategoryDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Categories/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Categories.CategoryDto" + ], + "summary": "Get the number of the resource", + "operationId": "Categories.GetCount-2f72", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Documents": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Get entities from Documents", + "operationId": "Documents.DocumentDto.ListDocumentDto", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Description", + "Description desc", + "Filename", + "Filename desc", + "NumberOfRevisions", + "NumberOfRevisions desc", + "Suffix", + "Suffix desc", + "DomainId", + "DomainId desc", + "ModificationDate", + "ModificationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "Tags", + "Tags desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "Filename", + "NumberOfRevisions", + "Suffix", + "DomainId", + "ModificationDate", + "ModifiedBy", + "Tags", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Add new entity to Documents", + "operationId": "Documents.DocumentDto.CreateDocumentDto", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Documents({Id})": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Get entity from Documents by key", + "operationId": "Documents.DocumentDto.GetDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "Filename", + "NumberOfRevisions", + "Suffix", + "DomainId", + "ModificationDate", + "ModifiedBy", + "Tags", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "links": { + "Revisions": { + "operationId": "Documents.ListRevisions" + }, + "Upload": { + "operationId": "Documents.DocumentDto.Upload" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Update entity in Documents", + "operationId": "Documents.DocumentDto.UpdateDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Delete entity from Documents", + "operationId": "Documents.DocumentDto.DeleteDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Documents({Id})/Default.Upload": { + "description": "Provides operations to call the Upload method.", + "post": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Invoke action Upload", + "operationId": "Documents.DocumentDto.Upload", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/UploadResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "action" + } + }, + "/Documents({Id})/Revisions": { + "description": "Provides operations to manage the Revisions property of the Siterra.Documents.App.DTO.DocumentDto entity.", + "get": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Get Revisions from Documents", + "operationId": "Documents.ListRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Number", + "Number desc", + "DocumentId", + "DocumentId desc", + "DocumentName", + "DocumentName desc", + "DocumentDescription", + "DocumentDescription desc", + "CreationDate", + "CreationDate desc", + "CreatedBy", + "CreatedBy desc", + "IsReviewed", + "IsReviewed desc", + "ReviewedBy", + "ReviewedBy desc", + "ReviewedDate", + "ReviewedDate desc", + "IsApproved", + "IsApproved desc", + "ApprovedBy", + "ApprovedBy desc", + "ApprovedDate", + "ApprovedDate desc", + "IsRejected", + "IsRejected desc", + "RejectedBy", + "RejectedBy desc", + "RejectedDate", + "RejectedDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Number", + "DocumentId", + "DocumentName", + "DocumentDescription", + "CreationDate", + "CreatedBy", + "IsReviewed", + "ReviewedBy", + "ReviewedDate", + "IsApproved", + "ApprovedBy", + "ApprovedDate", + "IsRejected", + "RejectedBy", + "RejectedDate", + "DomainId", + "Document" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Documents({Id})/Revisions({Id1})/$ref": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "delete": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Delete ref of navigation property Revisions for Documents", + "operationId": "Documents.revisions.DeleteRefRevisionDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Documents({Id})/Revisions/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Get the number of the resource", + "operationId": "Documents.Revisions.GetCount-f834", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Documents({Id})/Revisions/$ref": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Get ref of Revisions from Documents", + "operationId": "Documents.ListRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Number", + "Number desc", + "DocumentId", + "DocumentId desc", + "DocumentName", + "DocumentName desc", + "DocumentDescription", + "DocumentDescription desc", + "CreationDate", + "CreationDate desc", + "CreatedBy", + "CreatedBy desc", + "IsReviewed", + "IsReviewed desc", + "ReviewedBy", + "ReviewedBy desc", + "ReviewedDate", + "ReviewedDate desc", + "IsApproved", + "IsApproved desc", + "ApprovedBy", + "ApprovedBy desc", + "ApprovedDate", + "ApprovedDate desc", + "IsRejected", + "IsRejected desc", + "RejectedBy", + "RejectedBy desc", + "RejectedDate", + "RejectedDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Create new navigation property ref to Revisions for Documents", + "operationId": "Documents.CreateRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Documents.RevisionDto" + ], + "summary": "Delete ref of navigation property Revisions for Documents", + "operationId": "Documents.DeleteRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Documents({Id})/Tags": { + "get": { + "tags": [ + "Documents.DocumentTagRelDto" + ], + "summary": "Get Tags property value", + "operationId": "Documents.ListTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name", + "Name desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Documents.DocumentTagRelDto" + ], + "summary": "Update property Tags value.", + "operationId": "Documents.UpdateTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Documents.DocumentTagRelDto" + ], + "summary": "Sets a new value for the collection of DocumentTagRelDto.", + "operationId": "Documents.SetTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Documents({Id})/Tags/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Documents.DocumentTagRelDto" + ], + "summary": "Get the number of the resource", + "operationId": "Documents.Tags.GetCount-ed53", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Documents/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Documents.DocumentDto" + ], + "summary": "Get the number of the resource", + "operationId": "Documents.GetCount-f555", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Libraries": { + "description": "Provides operations to manage the collection of LibraryDto entities.", + "get": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Get entities from Libraries", + "operationId": "Libraries.LibraryDto.ListLibraryDto", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Number", + "Number desc", + "Description", + "Description desc", + "LibraryTemplateId", + "LibraryTemplateId desc", + "ParentTypeId", + "ParentTypeId desc", + "ParentId", + "ParentId desc", + "AllowMultiple", + "AllowMultiple desc", + "AutoCreate", + "AutoCreate desc", + "TypeId", + "TypeId desc", + "DomainId", + "DomainId desc", + "CreatedBy", + "CreatedBy desc", + "CreationDate", + "CreationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "ModificationDate", + "ModificationDate desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Number", + "Description", + "LibraryTemplateId", + "ParentTypeId", + "ParentId", + "AllowMultiple", + "AutoCreate", + "TypeId", + "DomainId", + "CreatedBy", + "CreationDate", + "ModifiedBy", + "ModificationDate", + "Documents" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Documents" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.LibraryDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Add new entity to Libraries", + "operationId": "Libraries.LibraryDto.CreateLibraryDto", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDto" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Libraries({Id})": { + "description": "Provides operations to manage the collection of LibraryDto entities.", + "get": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Get entity from Libraries by key", + "operationId": "Libraries.LibraryDto.GetLibraryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Number", + "Description", + "LibraryTemplateId", + "ParentTypeId", + "ParentId", + "AllowMultiple", + "AutoCreate", + "TypeId", + "DomainId", + "CreatedBy", + "CreationDate", + "ModifiedBy", + "ModificationDate", + "Documents" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Documents" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDto" + } + } + }, + "links": { + "Documents": { + "operationId": "Libraries.ListDocuments" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Update entity in Libraries", + "operationId": "Libraries.LibraryDto.UpdateLibraryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDto" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Delete entity from Libraries", + "operationId": "Libraries.LibraryDto.DeleteLibraryDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Libraries({Id})/Documents": { + "description": "Provides operations to manage the Documents property of the Siterra.Documents.App.DTO.LibraryDto entity.", + "get": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Get Documents from Libraries", + "operationId": "Libraries.ListDocuments", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Description", + "Description desc", + "Filename", + "Filename desc", + "NumberOfRevisions", + "NumberOfRevisions desc", + "Suffix", + "Suffix desc", + "DomainId", + "DomainId desc", + "ModificationDate", + "ModificationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "Tags", + "Tags desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "Filename", + "NumberOfRevisions", + "Suffix", + "DomainId", + "ModificationDate", + "ModifiedBy", + "Tags", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Libraries({Id})/Documents({Id1})/$ref": { + "description": "Provides operations to manage the collection of LibraryDto entities.", + "delete": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Delete ref of navigation property Documents for Libraries", + "operationId": "Libraries.documents.DeleteRefDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Libraries({Id})/Documents({Id1})/Tags": { + "get": { + "tags": [ + "Libraries.DocumentDto.DocumentTagRelDto" + ], + "summary": "Get Tags property value", + "operationId": "Libraries.Documents.ListTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name", + "Name desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Libraries.DocumentDto.DocumentTagRelDto" + ], + "summary": "Update property Tags value.", + "operationId": "Libraries.Documents.UpdateTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Libraries.DocumentDto.DocumentTagRelDto" + ], + "summary": "Sets a new value for the collection of DocumentTagRelDto.", + "operationId": "Libraries.Documents.SetTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Libraries({Id})/Documents({Id1})/Tags/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Libraries.DocumentDto.DocumentTagRelDto" + ], + "summary": "Get the number of the resource", + "operationId": "Libraries.Documents.Tags.GetCount-2853", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Libraries({Id})/Documents/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Get the number of the resource", + "operationId": "Libraries.Documents.GetCount-34c7", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Libraries({Id})/Documents/$ref": { + "description": "Provides operations to manage the collection of LibraryDto entities.", + "get": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Get ref of Documents from Libraries", + "operationId": "Libraries.ListRefDocuments", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Description", + "Description desc", + "Filename", + "Filename desc", + "NumberOfRevisions", + "NumberOfRevisions desc", + "Suffix", + "Suffix desc", + "DomainId", + "DomainId desc", + "ModificationDate", + "ModificationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "Tags", + "Tags desc" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Create new navigation property ref to Documents for Libraries", + "operationId": "Libraries.CreateRefDocuments", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Libraries.DocumentDto" + ], + "summary": "Delete ref of navigation property Documents for Libraries", + "operationId": "Libraries.DeleteRefDocuments", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of LibraryDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "LibraryDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Libraries/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Libraries.LibraryDto" + ], + "summary": "Get the number of the resource", + "operationId": "Libraries.GetCount-e13e", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Revisions": { + "description": "Provides operations to manage the collection of RevisionDto entities.", + "get": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Get entities from Revisions", + "operationId": "Revisions.RevisionDto.ListRevisionDto", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Number", + "Number desc", + "DocumentId", + "DocumentId desc", + "DocumentName", + "DocumentName desc", + "DocumentDescription", + "DocumentDescription desc", + "CreationDate", + "CreationDate desc", + "CreatedBy", + "CreatedBy desc", + "IsReviewed", + "IsReviewed desc", + "ReviewedBy", + "ReviewedBy desc", + "ReviewedDate", + "ReviewedDate desc", + "IsApproved", + "IsApproved desc", + "ApprovedBy", + "ApprovedBy desc", + "ApprovedDate", + "ApprovedDate desc", + "IsRejected", + "IsRejected desc", + "RejectedBy", + "RejectedBy desc", + "RejectedDate", + "RejectedDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Number", + "DocumentId", + "DocumentName", + "DocumentDescription", + "CreationDate", + "CreatedBy", + "IsReviewed", + "ReviewedBy", + "ReviewedDate", + "IsApproved", + "ApprovedBy", + "ApprovedDate", + "IsRejected", + "RejectedBy", + "RejectedDate", + "DomainId", + "Document" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Add new entity to Revisions", + "operationId": "Revisions.RevisionDto.CreateRevisionDto", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Revisions({Id})": { + "description": "Provides operations to manage the collection of RevisionDto entities.", + "get": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Get entity from Revisions by key", + "operationId": "Revisions.RevisionDto.GetRevisionDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Number", + "DocumentId", + "DocumentName", + "DocumentDescription", + "CreationDate", + "CreatedBy", + "IsReviewed", + "ReviewedBy", + "ReviewedDate", + "IsApproved", + "ApprovedBy", + "ApprovedDate", + "IsRejected", + "RejectedBy", + "RejectedDate", + "DomainId", + "Document" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + } + } + }, + "links": { + "Document": { + "operationId": "Revisions.GetDocument" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Update entity in Revisions", + "operationId": "Revisions.RevisionDto.UpdateRevisionDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Delete entity from Revisions", + "operationId": "Revisions.RevisionDto.DeleteRevisionDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Revisions({Id})/Document": { + "description": "Provides operations to manage the Document property of the Siterra.Documents.App.DTO.RevisionDto entity.", + "get": { + "tags": [ + "Revisions.Document" + ], + "summary": "Get Document from Revisions", + "operationId": "Revisions.GetDocument", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "StatusId", + "TypeId", + "Keywords", + "CreationDate", + "CreatedBy", + "ModificationDate", + "ModifiedBy", + "DomainId", + "LibraryId", + "OwnerUserId", + "StatusDate", + "LastRevisionId", + "CheckoutDate", + "CheckoutPath", + "CheckoutUserId", + "Number", + "OriginalDate", + "FileSized", + "FileClientPath", + "LastRevisionFileId", + "IsDeleted", + "IsNa", + "IsRejected", + "IsReviewed", + "NaDescription", + "NaReason", + "RejectedDescription", + "RejectedReason", + "ReviewDescription", + "SourceDocumentId", + "ScraperMapId", + "LastDownloadedDate", + "SmsId", + "IsApprovedOld", + "Suffix", + "ScrapeResultId", + "IsApproved", + "CategoryId", + "SectionId", + "VersionCount", + "LastFileName", + "DocumentClasses", + "Tags", + "Library", + "LastRevisionFile", + "SourceDocument", + "SourceDocumentChildren", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Library", + "LastRevisionFile", + "SourceDocument", + "SourceDocumentChildren", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + } + }, + "links": { + "Library": { + "operationId": "Revisions.Document.GetLibrary" + }, + "LastRevisionFile": { + "operationId": "Revisions.Document.GetLastRevisionFile" + }, + "SourceDocument": { + "operationId": "Revisions.Document.GetSourceDocument" + }, + "SourceDocumentChildren": { + "operationId": "Revisions.Document.ListSourceDocumentChildren" + }, + "Revisions": { + "operationId": "Revisions.Document.ListRevisions" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Revisions({Id})/Document/$ref": { + "description": "Provides operations to manage the collection of RevisionDto entities.", + "get": { + "tags": [ + "Revisions.Document" + ], + "summary": "Get ref of Document from Revisions", + "operationId": "Revisions.GetRefDocument", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "links": { + "Library": { + "operationId": "Revisions.Document.GetLibrary" + }, + "LastRevisionFile": { + "operationId": "Revisions.Document.GetLastRevisionFile" + }, + "SourceDocument": { + "operationId": "Revisions.Document.GetSourceDocument" + }, + "SourceDocumentChildren": { + "operationId": "Revisions.Document.ListSourceDocumentChildren" + }, + "Revisions": { + "operationId": "Revisions.Document.ListRevisions" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Revisions.Document" + ], + "summary": "Update the ref of navigation property Document in Revisions", + "operationId": "Revisions.UpdateRefDocument", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Revisions.Document" + ], + "summary": "Delete ref of navigation property Document for Revisions", + "operationId": "Revisions.DeleteRefDocument", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Revisions({Id})/Document/DocumentClasses": { + "get": { + "tags": [ + "Revisions.Document.DocumentClass" + ], + "summary": "Get DocumentClasses property value", + "operationId": "Revisions.Document.ListDocumentClasses", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "ClassInstance", + "ClassInstance desc", + "ClassId", + "ClassId desc", + "DocumentId", + "DocumentId desc", + "CreatedBy", + "CreatedBy desc", + "CreationDate", + "CreationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "ModificationDate", + "ModificationDate desc", + "IsPrimary", + "IsPrimary desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "ClassInstance", + "ClassId", + "DocumentId", + "CreatedBy", + "CreationDate", + "ModifiedBy", + "ModificationDate", + "IsPrimary", + "Document" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Revisions.Document.DocumentClass" + ], + "summary": "Update property DocumentClasses value.", + "operationId": "Revisions.Document.UpdateDocumentClasses", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Revisions.Document.DocumentClass" + ], + "summary": "Sets a new value for the collection of DocumentClass.", + "operationId": "Revisions.Document.SetDocumentClasses", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Revisions({Id})/Document/DocumentClasses/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Revisions.Document.DocumentClass" + ], + "summary": "Get the number of the resource", + "operationId": "Revisions.Document.DocumentClasses.GetCount-6342", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Revisions({Id})/Document/Tags": { + "get": { + "tags": [ + "Revisions.Document.DocumentTagRel" + ], + "summary": "Get Tags property value", + "operationId": "Revisions.Document.ListTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "DocumentId", + "DocumentId desc", + "TagId", + "TagId desc", + "DomainId", + "DomainId desc", + "CreatedBy", + "CreatedBy desc", + "ModifiedBy", + "ModifiedBy desc", + "CreationDate", + "CreationDate desc", + "ModificationDate", + "ModificationDate desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "DocumentId", + "TagId", + "DomainId", + "CreatedBy", + "ModifiedBy", + "CreationDate", + "ModificationDate", + "Document", + "Tag" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document", + "Tag" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Revisions.Document.DocumentTagRel" + ], + "summary": "Update property Tags value.", + "operationId": "Revisions.Document.UpdateTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Revisions.Document.DocumentTagRel" + ], + "summary": "Sets a new value for the collection of DocumentTagRel.", + "operationId": "Revisions.Document.SetTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Revisions({Id})/Document/Tags/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Revisions.Document.DocumentTagRel" + ], + "summary": "Get the number of the resource", + "operationId": "Revisions.Document.Tags.GetCount-161f", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Revisions/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Revisions.RevisionDto" + ], + "summary": "Get the number of the resource", + "operationId": "Revisions.GetCount-c6a5", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Tasks": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Get entities from Tasks", + "operationId": "Tasks.DocumentDto.ListDocumentDto", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Name", + "Name desc", + "Description", + "Description desc", + "Filename", + "Filename desc", + "NumberOfRevisions", + "NumberOfRevisions desc", + "Suffix", + "Suffix desc", + "DomainId", + "DomainId desc", + "ModificationDate", + "ModificationDate desc", + "ModifiedBy", + "ModifiedBy desc", + "Tags", + "Tags desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "Filename", + "NumberOfRevisions", + "Suffix", + "DomainId", + "ModificationDate", + "ModifiedBy", + "Tags", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Add new entity to Tasks", + "operationId": "Tasks.DocumentDto.CreateDocumentDto", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Tasks({Id})": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Get entity from Tasks by key", + "operationId": "Tasks.DocumentDto.GetDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Name", + "Description", + "Filename", + "NumberOfRevisions", + "Suffix", + "DomainId", + "ModificationDate", + "ModifiedBy", + "Tags", + "Revisions" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Revisions" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "links": { + "Revisions": { + "operationId": "Tasks.ListRevisions" + }, + "Upload": { + "operationId": "Tasks.DocumentDto.Upload" + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Update entity in Tasks", + "operationId": "Tasks.DocumentDto.UpdateDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Delete entity from Tasks", + "operationId": "Tasks.DocumentDto.DeleteDocumentDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Tasks({Id})/Default.Upload": { + "description": "Provides operations to call the Upload method.", + "post": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Invoke action Upload", + "operationId": "Tasks.DocumentDto.Upload", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/UploadResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "action" + } + }, + "/Tasks({Id})/Revisions": { + "description": "Provides operations to manage the Revisions property of the Siterra.Documents.App.DTO.DocumentDto entity.", + "get": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Get Revisions from Tasks", + "operationId": "Tasks.ListRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Number", + "Number desc", + "DocumentId", + "DocumentId desc", + "DocumentName", + "DocumentName desc", + "DocumentDescription", + "DocumentDescription desc", + "CreationDate", + "CreationDate desc", + "CreatedBy", + "CreatedBy desc", + "IsReviewed", + "IsReviewed desc", + "ReviewedBy", + "ReviewedBy desc", + "ReviewedDate", + "ReviewedDate desc", + "IsApproved", + "IsApproved desc", + "ApprovedBy", + "ApprovedBy desc", + "ApprovedDate", + "ApprovedDate desc", + "IsRejected", + "IsRejected desc", + "RejectedBy", + "RejectedBy desc", + "RejectedDate", + "RejectedDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Number", + "DocumentId", + "DocumentName", + "DocumentDescription", + "CreationDate", + "CreatedBy", + "IsReviewed", + "ReviewedBy", + "ReviewedDate", + "IsApproved", + "ApprovedBy", + "ApprovedDate", + "IsRejected", + "RejectedBy", + "RejectedDate", + "DomainId", + "Document" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*", + "Document" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Tasks({Id})/Revisions({Id1})/$ref": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "delete": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Delete ref of navigation property Revisions for Tasks", + "operationId": "Tasks.revisions.DeleteRefRevisionDto", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "Id1", + "in": "path", + "description": "The unique identifier of RevisionDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "RevisionDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Tasks({Id})/Revisions/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Get the number of the resource", + "operationId": "Tasks.Revisions.GetCount-9297", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Tasks({Id})/Revisions/$ref": { + "description": "Provides operations to manage the collection of DocumentDto entities.", + "get": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Get ref of Revisions from Tasks", + "operationId": "Tasks.ListRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Id", + "Id desc", + "Number", + "Number desc", + "DocumentId", + "DocumentId desc", + "DocumentName", + "DocumentName desc", + "DocumentDescription", + "DocumentDescription desc", + "CreationDate", + "CreationDate desc", + "CreatedBy", + "CreatedBy desc", + "IsReviewed", + "IsReviewed desc", + "ReviewedBy", + "ReviewedBy desc", + "ReviewedDate", + "ReviewedDate desc", + "IsApproved", + "IsApproved desc", + "ApprovedBy", + "ApprovedBy desc", + "ApprovedDate", + "ApprovedDate desc", + "IsRejected", + "IsRejected desc", + "RejectedBy", + "RejectedBy desc", + "RejectedDate", + "RejectedDate desc", + "DomainId", + "DomainId desc" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Create new navigation property ref to Revisions for Tasks", + "operationId": "Tasks.CreateRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Tasks.RevisionDto" + ], + "summary": "Delete ref of navigation property Revisions for Tasks", + "operationId": "Tasks.DeleteRefRevisions", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Tasks({Id})/Tags": { + "get": { + "tags": [ + "Tasks.DocumentTagRelDto" + ], + "summary": "Get Tags property value", + "operationId": "Tasks.ListTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name", + "Name desc" + ], + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "Name" + ], + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "enum": [ + "*" + ], + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Tasks.DocumentTagRelDto" + ], + "summary": "Update property Tags value.", + "operationId": "Tasks.UpdateTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Tasks.DocumentTagRelDto" + ], + "summary": "Sets a new value for the collection of DocumentTagRelDto.", + "operationId": "Tasks.SetTags", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Tasks({Id})/Tags/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Tasks.DocumentTagRelDto" + ], + "summary": "Get the number of the resource", + "operationId": "Tasks.Tags.GetCount-3a1b", + "parameters": [ + { + "name": "Id", + "in": "path", + "description": "The unique identifier of DocumentDto", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "DocumentDto" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Tasks/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Tasks.DocumentDto" + ], + "summary": "Get the number of the resource", + "operationId": "Tasks.GetCount-2961", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + } + }, + "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": [ + "null", + "string" + ] + }, + "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": [ + "null", + "string" + ] + } + } + }, + "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": [ + "null", + "string" + ] + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": [ + "null", + "string" + ] + }, + "Siterra.Documents.App.DTO.DocumentDto": { + "title": "DocumentDto", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "Filename": { + "type": [ + "null", + "string" + ] + }, + "NumberOfRevisions": { + "type": [ + "null", + "string" + ] + }, + "Suffix": { + "type": [ + "null", + "string" + ] + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + }, + "Revisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "Id": 0, + "Name": "string", + "Description": "string", + "Filename": "string", + "NumberOfRevisions": "string", + "Suffix": "string", + "DomainId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "Tags": [ + { + "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" + } + ] + } + }, + "Siterra.Documents.App.DTO.LibraryDto": { + "title": "LibraryDto", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Number": { + "type": [ + "null", + "string" + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "LibraryTemplateId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ParentTypeId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ParentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "AllowMultiple": { + "type": "boolean" + }, + "AutoCreate": { + "type": "boolean" + }, + "TypeId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "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" + } + ] + } + }, + "Siterra.Documents.App.DTO.RevisionDto": { + "title": "RevisionDto", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Number": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DocumentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "DocumentName": { + "type": [ + "null", + "string" + ] + }, + "DocumentDescription": { + "type": [ + "null", + "string" + ] + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "IsReviewed": { + "type": "boolean" + }, + "ReviewedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "IsApproved": { + "type": "boolean" + }, + "ApprovedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "IsRejected": { + "type": "boolean" + }, + "RejectedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Document": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + } + }, + "example": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "DocumentName": "string", + "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, + "RejectedBy": 0, + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + } + }, + "Siterra.Documents.App.DTO.CategoryDto": { + "title": "CategoryDto", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "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", + "format": "date-time" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + } + }, + "example": { + "Id": 0, + "Name": "string", + "Description": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0 + } + }, + "Siterra.Documents.App.DTO.DocumentTagRelDto": { + "title": "DocumentTagRelDto", + "type": "object", + "properties": { + "Name": { + "type": [ + "null", + "string" + ] + } + }, + "example": { + "Name": "string" + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.Document": { + "title": "Document", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "StatusId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "TypeId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Keywords": { + "type": [ + "null", + "string" + ] + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "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", + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "LibraryId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "OwnerUserId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "StatusDate": { + "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", + "format": "date-time" + }, + "LastRevisionId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "CheckoutPath": { + "type": [ + "null", + "string" + ] + }, + "CheckoutUserId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Number": { + "type": [ + "null", + "string" + ] + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "FileSized": { + "type": "number", + "format": "decimal" + }, + "FileClientPath": { + "type": [ + "null", + "string" + ] + }, + "LastRevisionFileId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsDeleted": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "IsNa": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "IsRejected": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "IsReviewed": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "NaDescription": { + "type": [ + "null", + "string" + ] + }, + "NaReason": { + "type": [ + "null", + "string" + ] + }, + "RejectedDescription": { + "type": [ + "null", + "string" + ] + }, + "RejectedReason": { + "type": [ + "null", + "string" + ] + }, + "ReviewDescription": { + "type": [ + "null", + "string" + ] + }, + "SourceDocumentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ScraperMapId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "SmsId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsApprovedOld": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Suffix": { + "type": [ + "null", + "string" + ] + }, + "ScrapeResultId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsApproved": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "CategoryId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "SectionId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "VersionCount": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "LastFileName": { + "type": [ + "null", + "string" + ] + }, + "DocumentClasses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" + } + }, + "Tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + }, + "Library": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "LastRevisionFile": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "SourceDocument": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "SourceDocumentChildren": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "x-ms-navigationProperty": true + }, + "Revisions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "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, + "Number": "string", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", + "FileSized": 0, + "FileClientPath": "string", + "LastRevisionFileId": 0, + "IsDeleted": 0, + "IsNa": 0, + "IsRejected": 0, + "IsReviewed": 0, + "NaDescription": "string", + "NaReason": "string", + "RejectedDescription": "string", + "RejectedReason": "string", + "ReviewDescription": "string", + "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.Document.DocumentClass" + } + ], + "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" + }, + "SourceDocumentChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass": { + "title": "DocumentClass", + "type": "object", + "properties": { + "ClassInstance": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ClassId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DocumentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "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", + "format": "date-time" + }, + "IsPrimary": { + "type": "boolean" + }, + "Document": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + } + }, + "example": { + "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" + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel": { + "title": "DocumentTagRel", + "type": "object", + "properties": { + "DocumentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "TagId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "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", + "format": "date-time" + }, + "Document": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "Tag": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + } + }, + "example": { + "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" + }, + "Tag": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.Library": { + "title": "Library", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "ParentFolderId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Number": { + "type": [ + "null", + "string" + ] + }, + "TypeId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "OwnerUserId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "TotalSize": { + "type": "number", + "format": "decimal" + }, + "FilesCounter": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "FoldersCounter": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "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", + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ProjectId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "SearchRingId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "SiteId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "AssetId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "AllowMultiple": { + "type": "boolean" + }, + "AutoCreate": { + "type": "boolean" + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "IsTemplate": { + "type": "boolean" + }, + "ProgramId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "SourceFolderId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "TemplateClassId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "TemplateSubType": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsHidden": { + "type": "boolean" + }, + "IsDeleted": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "StatusId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "SmsId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ContractId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "VendorId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "OrganizationUnitId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IncidentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "EventId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ClassInstance": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ClassId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "LibraryParent": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "Type": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "SourceFolder": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "x-ms-navigationProperty": true + }, + "LibraryChildren": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "x-ms-navigationProperty": true + }, + "SourceLibraryChildren": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "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, + "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" + } + ], + "LibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ], + "SourceLibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType": { + "title": "LibraryType", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "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", + "format": "date-time" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "XmlName": { + "type": [ + "null", + "string" + ] + }, + "MasterId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Number": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ClassId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ParentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "HasChanged": { + "type": "boolean" + }, + "MasterLibraryType": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "ParentLibraryTypes": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "MasterLibraryTypeChildren": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "x-ms-navigationProperty": true + }, + "ChildrenLibraryTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "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", + "DomainId": 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" + } + ], + "ChildrenLibraryTypes": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile": { + "title": "DocumentFile", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Path": { + "type": [ + "null", + "string" + ] + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "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", + "format": "date-time" + }, + "Sized": { + "type": "number", + "format": "decimal" + }, + "ActualName": { + "type": [ + "null", + "string" + ] + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "SourceClassId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ContentTypeId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "ClientPath": { + "type": [ + "null", + "string" + ] + }, + "IsSelfHosted": { + "maximum": 32767, + "minimum": -32768, + "type": "number", + "format": "int16" + }, + "SmsId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "Latitude": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "Longitude": { + "type": [ + "null", + "number" + ], + "format": "decimal" + }, + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "x-ms-navigationProperty": true + } + }, + "example": { + "Id": 0, + "Name": "string", + "Path": "string", + "ModifiedBy": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Sized": 0, + "ActualName": "string", + "DomainId": 0, + "SourceClassId": 0, + "ContentTypeId": 0, + "ClientPath": "string", + "IsSelfHosted": 0, + "SmsId": 0, + "Latitude": 0, + "Longitude": 0, + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Tags.Tag": { + "title": "Tag", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "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", + "format": "date-time" + } + }, + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00" + } + }, + "Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag": { + "allOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + }, + { + "title": "UserDefinedTag", + "type": "object", + "properties": { + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + } + } + } + ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Tags.Section": { + "allOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + }, + { + "title": "Section", + "type": "object", + "properties": { + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "x-ms-navigationProperty": true + } + } + } + ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Tags.Category": { + "allOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + }, + { + "title": "Category", + "type": "object", + "properties": { + "Documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "x-ms-navigationProperty": true + } + } + } + ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Revision.Revision": { + "title": "Revision", + "type": "object", + "properties": { + "Id": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Number": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DocumentId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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", + "format": "date-time" + }, + "CreationDate": { + "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", + "format": "date-time" + }, + "ModifiedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "CreatedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "Remarks": { + "type": [ + "null", + "string" + ] + }, + "FileId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DocumentOwnerContact": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "DocumentDescription": { + "type": [ + "null", + "string" + ] + }, + "DocumentStatusDate": { + "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", + "format": "date-time" + }, + "DocumentFolder": { + "type": [ + "null", + "string" + ] + }, + "DocumentKeywords": { + "type": [ + "null", + "string" + ] + }, + "DocumentStatus": { + "type": [ + "null", + "string" + ] + }, + "DocumentType": { + "type": [ + "null", + "string" + ] + }, + "DocumentName": { + "type": [ + "null", + "string" + ] + }, + "DocumentNumber": { + "type": [ + "null", + "string" + ] + }, + "DomainId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "IsDeleted": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "IsReviewed": { + "type": "boolean" + }, + "ReviewDescription": { + "type": [ + "null", + "string" + ] + }, + "ReviewedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsRejected": { + "type": "boolean" + }, + "RejectedReason": { + "type": [ + "null", + "string" + ] + }, + "RejectedDescription": { + "type": [ + "null", + "string" + ] + }, + "RejectedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "IsApproved": { + "type": "boolean" + }, + "ApprovedBy": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": [ + "null", + "number" + ], + "format": "int32" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "Document": { + "anyOf": [ + { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + } + }, + "example": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, + "Remarks": "string", + "FileId": 0, + "DocumentOwnerContact": 0, + "DocumentDescription": "string", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", + "DocumentFolder": "string", + "DocumentKeywords": "string", + "DocumentStatus": "string", + "DocumentType": "string", + "DocumentName": "string", + "DocumentNumber": "string", + "DomainId": 0, + "IsDeleted": 0, + "IsReviewed": true, + "ReviewDescription": "string", + "ReviewedBy": 0, + "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" + } + } + }, + "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { + "title": "Collection of DocumentDto", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + } + }, + "Siterra.Documents.App.DTO.LibraryDtoCollectionResponse": { + "title": "Collection of LibraryDto", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDto" + } + } + } + }, + "Siterra.Documents.App.DTO.RevisionDtoCollectionResponse": { + "title": "Collection of RevisionDto", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDto" + } + } + } + }, + "Siterra.Documents.App.DTO.CategoryDtoCollectionResponse": { + "title": "Collection of CategoryDto", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDto" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse": { + "title": "Collection of Document", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse": { + "title": "Collection of Revision", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse": { + "title": "Collection of Library", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse": { + "title": "Collection of LibraryType", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + } + } + }, + "Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse": { + "title": "Collection of Siterra.Documents.App.DTO.DocumentTagRelDto", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse": { + "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse": { + "title": "Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + } + } + } + }, + "responses": { + "error": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Default.ODataErrors.ODataError" + } + } + } + }, + "ODataCountResponse": { + "description": "The count of the resource", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ODataCountResponse" + } + } + } + }, + "Siterra.Documents.App.DTO.DocumentDtoCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse" + } + } + } + }, + "Siterra.Documents.App.DTO.LibraryDtoCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.LibraryDtoCollectionResponse" + } + } + } + }, + "Siterra.Documents.App.DTO.RevisionDtoCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse" + } + } + } + }, + "Siterra.Documents.App.DTO.CategoryDtoCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.CategoryDtoCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse" + } + } + } + }, + "Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse" + } + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse" + } + } + } + }, + "StringCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StringCollectionResponse" + } + } + } + }, + "UploadResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Siterra.Documents.App.DTO.DocumentDto" + } + } + } + } + }, + "parameters": { + "top": { + "name": "$top", + "in": "query", + "description": "Show only the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + }, + "example": 50 + }, + "skip": { + "name": "$skip", + "in": "query", + "description": "Skip the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + } + }, + "count": { + "name": "$count", + "in": "query", + "description": "Include count of items", + "style": "form", + "explode": false, + "schema": { + "type": "boolean" + } + }, + "filter": { + "name": "$filter", + "in": "query", + "description": "Filter items by property values", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + }, + "search": { + "name": "$search", + "in": "query", + "description": "Search items by search phrases", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + } + }, + "examples": { + "Siterra.Documents.App.DTO.DocumentDto": { + "value": { + "Id": 0, + "Name": "string", + "Description": "string", + "Filename": "string", + "NumberOfRevisions": "string", + "Suffix": "string", + "DomainId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "Tags": [ + { + "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" + } + ] + } + }, + "Siterra.Documents.App.DTO.LibraryDto": { + "value": { + "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" + } + ] + } + }, + "Siterra.Documents.App.DTO.RevisionDto": { + "value": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "DocumentName": "string", + "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, + "RejectedBy": 0, + "RejectedDate": "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": { + "Id": 0, + "Name": "string", + "Description": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0 + } + }, + "Siterra.Documents.App.DTO.DocumentTagRelDto": { + "value": { + "Name": "string" + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.Document": { + "value": { + "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, + "Number": "string", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", + "FileSized": 0, + "FileClientPath": "string", + "LastRevisionFileId": 0, + "IsDeleted": 0, + "IsNa": 0, + "IsRejected": 0, + "IsReviewed": 0, + "NaDescription": "string", + "NaReason": "string", + "RejectedDescription": "string", + "RejectedReason": "string", + "ReviewDescription": "string", + "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.Document.DocumentClass" + } + ], + "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" + }, + "SourceDocumentChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass": { + "value": { + "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" + } + } + }, + "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" + }, + "Tag": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + } + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.Library": { + "value": { + "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, + "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" + } + ], + "LibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ], + "SourceLibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType": { + "value": { + "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", + "DomainId": 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" + } + ], + "ChildrenLibraryTypes": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile": { + "value": { + "Id": 0, + "Name": "string", + "Path": "string", + "ModifiedBy": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Sized": 0, + "ActualName": "string", + "DomainId": 0, + "SourceClassId": 0, + "ContentTypeId": 0, + "ClientPath": "string", + "IsSelfHosted": 0, + "SmsId": 0, + "Latitude": 0, + "Longitude": 0, + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Tags.Tag": { + "value": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "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", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + ] + } + }, + "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", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "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", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + } + }, + "Siterra.Documents.BusinessLogic.Entities.Revision.Revision": { + "value": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, + "Remarks": "string", + "FileId": 0, + "DocumentOwnerContact": 0, + "DocumentDescription": "string", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", + "DocumentFolder": "string", + "DocumentKeywords": "string", + "DocumentStatus": "string", + "DocumentType": "string", + "DocumentName": "string", + "DocumentNumber": "string", + "DomainId": 0, + "IsDeleted": 0, + "IsReviewed": true, + "ReviewDescription": "string", + "ReviewedBy": 0, + "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" + } + } + } + }, + "requestBodies": { + "refPostBody": { + "description": "New navigation property ref value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceCreate" + } + } + }, + "required": true + }, + "refPutBody": { + "description": "New navigation property ref values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceUpdate" + } + } + }, + "required": true + } + } + }, + "tags": [ + { + "name": "Categories.CategoryDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Documents.DocumentDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Documents.RevisionDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Documents.DocumentTagRelDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Libraries.LibraryDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Libraries.DocumentDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Libraries.DocumentDto.DocumentTagRelDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Revisions.RevisionDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Revisions.Document", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Revisions.Document.DocumentClass", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Revisions.Document.DocumentTagRel", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Tasks.DocumentDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Tasks.RevisionDto", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Tasks.DocumentTagRelDto", + "x-ms-docs-toc-type": "page" + } + ] +} diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml new file mode 100644 index 000000000..b3d276f4e --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml @@ -0,0 +1,5564 @@ +openapi: '3.1.1' +info: + title: OData Service for namespace Default + description: This OData service is located at http://localhost + version: 1.0.0 +servers: + - url: http://localhost +paths: + /Categories: + description: Provides operations to manage the collection of CategoryDto entities. + get: + tags: + - Categories.CategoryDto + summary: Get entities from Categories + operationId: Categories.CategoryDto.ListCategoryDto + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Description + - Description desc + - CreationDate + - CreationDate desc + - ModificationDate + - ModificationDate desc + - DomainId + - DomainId desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - CreationDate + - ModificationDate + - DomainId + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.CategoryDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Categories.CategoryDto + summary: Add new entity to Categories + operationId: Categories.CategoryDto.CreateCategoryDto + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDto' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Categories({Id})': + description: Provides operations to manage the collection of CategoryDto entities. + get: + tags: + - Categories.CategoryDto + summary: Get entity from Categories by key + operationId: Categories.CategoryDto.GetCategoryDto + parameters: + - name: Id + in: path + description: The unique identifier of CategoryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: CategoryDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - CreationDate + - ModificationDate + - DomainId + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Categories.CategoryDto + summary: Update entity in Categories + operationId: Categories.CategoryDto.UpdateCategoryDto + parameters: + - name: Id + in: path + description: The unique identifier of CategoryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: CategoryDto + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Categories.CategoryDto + summary: Delete entity from Categories + operationId: Categories.CategoryDto.DeleteCategoryDto + parameters: + - name: Id + in: path + description: The unique identifier of CategoryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: CategoryDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /Categories/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Categories.CategoryDto + summary: Get the number of the resource + operationId: Categories.GetCount-2f72 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Documents: + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Documents.DocumentDto + summary: Get entities from Documents + operationId: Documents.DocumentDto.ListDocumentDto + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Description + - Description desc + - Filename + - Filename desc + - NumberOfRevisions + - NumberOfRevisions desc + - Suffix + - Suffix desc + - DomainId + - DomainId desc + - ModificationDate + - ModificationDate desc + - ModifiedBy + - ModifiedBy desc + - Tags + - Tags desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - Filename + - NumberOfRevisions + - Suffix + - DomainId + - ModificationDate + - ModifiedBy + - Tags + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Revisions + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Documents.DocumentDto + summary: Add new entity to Documents + operationId: Documents.DocumentDto.CreateDocumentDto + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Documents({Id})': + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Documents.DocumentDto + summary: Get entity from Documents by key + operationId: Documents.DocumentDto.GetDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - Filename + - NumberOfRevisions + - Suffix + - DomainId + - ModificationDate + - ModifiedBy + - Tags + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Revisions + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + links: + Revisions: + operationId: Documents.ListRevisions + Upload: + operationId: Documents.DocumentDto.Upload + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Documents.DocumentDto + summary: Update entity in Documents + operationId: Documents.DocumentDto.UpdateDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Documents.DocumentDto + summary: Delete entity from Documents + operationId: Documents.DocumentDto.DeleteDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Documents({Id})/Default.Upload': + description: Provides operations to call the Upload method. + post: + tags: + - Documents.DocumentDto + summary: Invoke action Upload + operationId: Documents.DocumentDto.Upload + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + responses: + '200': + $ref: '#/components/responses/UploadResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: action + '/Documents({Id})/Revisions': + description: Provides operations to manage the Revisions property of the Siterra.Documents.App.DTO.DocumentDto entity. + get: + tags: + - Documents.RevisionDto + summary: Get Revisions from Documents + operationId: Documents.ListRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Number + - Number desc + - DocumentId + - DocumentId desc + - DocumentName + - DocumentName desc + - DocumentDescription + - DocumentDescription desc + - CreationDate + - CreationDate desc + - CreatedBy + - CreatedBy desc + - IsReviewed + - IsReviewed desc + - ReviewedBy + - ReviewedBy desc + - ReviewedDate + - ReviewedDate desc + - IsApproved + - IsApproved desc + - ApprovedBy + - ApprovedBy desc + - ApprovedDate + - ApprovedDate desc + - IsRejected + - IsRejected desc + - RejectedBy + - RejectedBy desc + - RejectedDate + - RejectedDate desc + - DomainId + - DomainId desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Number + - DocumentId + - DocumentName + - DocumentDescription + - CreationDate + - CreatedBy + - IsReviewed + - ReviewedBy + - ReviewedDate + - IsApproved + - ApprovedBy + - ApprovedDate + - IsRejected + - RejectedBy + - RejectedDate + - DomainId + - Document + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Documents({Id})/Revisions({Id1})/$ref': + description: Provides operations to manage the collection of DocumentDto entities. + delete: + tags: + - Documents.RevisionDto + summary: Delete ref of navigation property Revisions for Documents + operationId: Documents.revisions.DeleteRefRevisionDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: Id1 + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Documents({Id})/Revisions/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Documents.RevisionDto + summary: Get the number of the resource + operationId: Documents.Revisions.GetCount-f834 + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Documents({Id})/Revisions/$ref': + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Documents.RevisionDto + summary: Get ref of Revisions from Documents + operationId: Documents.ListRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Number + - Number desc + - DocumentId + - DocumentId desc + - DocumentName + - DocumentName desc + - DocumentDescription + - DocumentDescription desc + - CreationDate + - CreationDate desc + - CreatedBy + - CreatedBy desc + - IsReviewed + - IsReviewed desc + - ReviewedBy + - ReviewedBy desc + - ReviewedDate + - ReviewedDate desc + - IsApproved + - IsApproved desc + - ApprovedBy + - ApprovedBy desc + - ApprovedDate + - ApprovedDate desc + - IsRejected + - IsRejected desc + - RejectedBy + - RejectedBy desc + - RejectedDate + - RejectedDate desc + - DomainId + - DomainId desc + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - Documents.RevisionDto + summary: Create new navigation property ref to Revisions for Documents + operationId: Documents.CreateRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Documents.RevisionDto + summary: Delete ref of navigation property Revisions for Documents + operationId: Documents.DeleteRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Documents({Id})/Tags': + get: + tags: + - Documents.DocumentTagRelDto + summary: Get Tags property value + operationId: Documents.ListTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + - Name desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Documents.DocumentTagRelDto + summary: Update property Tags value. + operationId: Documents.UpdateTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Documents.DocumentTagRelDto + summary: Sets a new value for the collection of DocumentTagRelDto. + operationId: Documents.SetTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Documents({Id})/Tags/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Documents.DocumentTagRelDto + summary: Get the number of the resource + operationId: Documents.Tags.GetCount-ed53 + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Documents/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Documents.DocumentDto + summary: Get the number of the resource + operationId: Documents.GetCount-f555 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Libraries: + description: Provides operations to manage the collection of LibraryDto entities. + get: + tags: + - Libraries.LibraryDto + summary: Get entities from Libraries + operationId: Libraries.LibraryDto.ListLibraryDto + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Number + - Number desc + - Description + - Description desc + - LibraryTemplateId + - LibraryTemplateId desc + - ParentTypeId + - ParentTypeId desc + - ParentId + - ParentId desc + - AllowMultiple + - AllowMultiple desc + - AutoCreate + - AutoCreate desc + - TypeId + - TypeId desc + - DomainId + - DomainId desc + - CreatedBy + - CreatedBy desc + - CreationDate + - CreationDate desc + - ModifiedBy + - ModifiedBy desc + - ModificationDate + - ModificationDate desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Number + - Description + - LibraryTemplateId + - ParentTypeId + - ParentId + - AllowMultiple + - AutoCreate + - TypeId + - DomainId + - CreatedBy + - CreationDate + - ModifiedBy + - ModificationDate + - Documents + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Documents + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.LibraryDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Libraries.LibraryDto + summary: Add new entity to Libraries + operationId: Libraries.LibraryDto.CreateLibraryDto + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDto' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Libraries({Id})': + description: Provides operations to manage the collection of LibraryDto entities. + get: + tags: + - Libraries.LibraryDto + summary: Get entity from Libraries by key + operationId: Libraries.LibraryDto.GetLibraryDto + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Number + - Description + - LibraryTemplateId + - ParentTypeId + - ParentId + - AllowMultiple + - AutoCreate + - TypeId + - DomainId + - CreatedBy + - CreationDate + - ModifiedBy + - ModificationDate + - Documents + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Documents + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDto' + links: + Documents: + operationId: Libraries.ListDocuments + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Libraries.LibraryDto + summary: Update entity in Libraries + operationId: Libraries.LibraryDto.UpdateLibraryDto + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Libraries.LibraryDto + summary: Delete entity from Libraries + operationId: Libraries.LibraryDto.DeleteLibraryDto + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Libraries({Id})/Documents': + description: Provides operations to manage the Documents property of the Siterra.Documents.App.DTO.LibraryDto entity. + get: + tags: + - Libraries.DocumentDto + summary: Get Documents from Libraries + operationId: Libraries.ListDocuments + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Description + - Description desc + - Filename + - Filename desc + - NumberOfRevisions + - NumberOfRevisions desc + - Suffix + - Suffix desc + - DomainId + - DomainId desc + - ModificationDate + - ModificationDate desc + - ModifiedBy + - ModifiedBy desc + - Tags + - Tags desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - Filename + - NumberOfRevisions + - Suffix + - DomainId + - ModificationDate + - ModifiedBy + - Tags + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Revisions + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Libraries({Id})/Documents({Id1})/$ref': + description: Provides operations to manage the collection of LibraryDto entities. + delete: + tags: + - Libraries.DocumentDto + summary: Delete ref of navigation property Documents for Libraries + operationId: Libraries.documents.DeleteRefDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: Id1 + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Libraries({Id})/Documents({Id1})/Tags': + get: + tags: + - Libraries.DocumentDto.DocumentTagRelDto + summary: Get Tags property value + operationId: Libraries.Documents.ListTags + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: Id1 + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + - Name desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Libraries.DocumentDto.DocumentTagRelDto + summary: Update property Tags value. + operationId: Libraries.Documents.UpdateTags + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: Id1 + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Libraries.DocumentDto.DocumentTagRelDto + summary: Sets a new value for the collection of DocumentTagRelDto. + operationId: Libraries.Documents.SetTags + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: Id1 + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Libraries({Id})/Documents({Id1})/Tags/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Libraries.DocumentDto.DocumentTagRelDto + summary: Get the number of the resource + operationId: Libraries.Documents.Tags.GetCount-2853 + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: Id1 + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Libraries({Id})/Documents/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Libraries.DocumentDto + summary: Get the number of the resource + operationId: Libraries.Documents.GetCount-34c7 + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Libraries({Id})/Documents/$ref': + description: Provides operations to manage the collection of LibraryDto entities. + get: + tags: + - Libraries.DocumentDto + summary: Get ref of Documents from Libraries + operationId: Libraries.ListRefDocuments + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Description + - Description desc + - Filename + - Filename desc + - NumberOfRevisions + - NumberOfRevisions desc + - Suffix + - Suffix desc + - DomainId + - DomainId desc + - ModificationDate + - ModificationDate desc + - ModifiedBy + - ModifiedBy desc + - Tags + - Tags desc + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - Libraries.DocumentDto + summary: Create new navigation property ref to Documents for Libraries + operationId: Libraries.CreateRefDocuments + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Libraries.DocumentDto + summary: Delete ref of navigation property Documents for Libraries + operationId: Libraries.DeleteRefDocuments + parameters: + - name: Id + in: path + description: The unique identifier of LibraryDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: LibraryDto + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /Libraries/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Libraries.LibraryDto + summary: Get the number of the resource + operationId: Libraries.GetCount-e13e + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Revisions: + description: Provides operations to manage the collection of RevisionDto entities. + get: + tags: + - Revisions.RevisionDto + summary: Get entities from Revisions + operationId: Revisions.RevisionDto.ListRevisionDto + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Number + - Number desc + - DocumentId + - DocumentId desc + - DocumentName + - DocumentName desc + - DocumentDescription + - DocumentDescription desc + - CreationDate + - CreationDate desc + - CreatedBy + - CreatedBy desc + - IsReviewed + - IsReviewed desc + - ReviewedBy + - ReviewedBy desc + - ReviewedDate + - ReviewedDate desc + - IsApproved + - IsApproved desc + - ApprovedBy + - ApprovedBy desc + - ApprovedDate + - ApprovedDate desc + - IsRejected + - IsRejected desc + - RejectedBy + - RejectedBy desc + - RejectedDate + - RejectedDate desc + - DomainId + - DomainId desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Number + - DocumentId + - DocumentName + - DocumentDescription + - CreationDate + - CreatedBy + - IsReviewed + - ReviewedBy + - ReviewedDate + - IsApproved + - ApprovedBy + - ApprovedDate + - IsRejected + - RejectedBy + - RejectedDate + - DomainId + - Document + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Revisions.RevisionDto + summary: Add new entity to Revisions + operationId: Revisions.RevisionDto.CreateRevisionDto + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Revisions({Id})': + description: Provides operations to manage the collection of RevisionDto entities. + get: + tags: + - Revisions.RevisionDto + summary: Get entity from Revisions by key + operationId: Revisions.RevisionDto.GetRevisionDto + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Number + - DocumentId + - DocumentName + - DocumentDescription + - CreationDate + - CreatedBy + - IsReviewed + - ReviewedBy + - ReviewedDate + - IsApproved + - ApprovedBy + - ApprovedDate + - IsRejected + - RejectedBy + - RejectedDate + - DomainId + - Document + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + links: + Document: + operationId: Revisions.GetDocument + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Revisions.RevisionDto + summary: Update entity in Revisions + operationId: Revisions.RevisionDto.UpdateRevisionDto + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Revisions.RevisionDto + summary: Delete entity from Revisions + operationId: Revisions.RevisionDto.DeleteRevisionDto + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Revisions({Id})/Document': + description: Provides operations to manage the Document property of the Siterra.Documents.App.DTO.RevisionDto entity. + get: + tags: + - Revisions.Document + summary: Get Document from Revisions + operationId: Revisions.GetDocument + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - StatusId + - TypeId + - Keywords + - CreationDate + - CreatedBy + - ModificationDate + - ModifiedBy + - DomainId + - LibraryId + - OwnerUserId + - StatusDate + - LastRevisionId + - CheckoutDate + - CheckoutPath + - CheckoutUserId + - Number + - OriginalDate + - FileSized + - FileClientPath + - LastRevisionFileId + - IsDeleted + - IsNa + - IsRejected + - IsReviewed + - NaDescription + - NaReason + - RejectedDescription + - RejectedReason + - ReviewDescription + - SourceDocumentId + - ScraperMapId + - LastDownloadedDate + - SmsId + - IsApprovedOld + - Suffix + - ScrapeResultId + - IsApproved + - CategoryId + - SectionId + - VersionCount + - LastFileName + - DocumentClasses + - Tags + - Library + - LastRevisionFile + - SourceDocument + - SourceDocumentChildren + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Library + - LastRevisionFile + - SourceDocument + - SourceDocumentChildren + - Revisions + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + links: + Library: + operationId: Revisions.Document.GetLibrary + LastRevisionFile: + operationId: Revisions.Document.GetLastRevisionFile + SourceDocument: + operationId: Revisions.Document.GetSourceDocument + SourceDocumentChildren: + operationId: Revisions.Document.ListSourceDocumentChildren + Revisions: + operationId: Revisions.Document.ListRevisions + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Revisions({Id})/Document/$ref': + description: Provides operations to manage the collection of RevisionDto entities. + get: + tags: + - Revisions.Document + summary: Get ref of Document from Revisions + operationId: Revisions.GetRefDocument + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + links: + Library: + operationId: Revisions.Document.GetLibrary + LastRevisionFile: + operationId: Revisions.Document.GetLastRevisionFile + SourceDocument: + operationId: Revisions.Document.GetSourceDocument + SourceDocumentChildren: + operationId: Revisions.Document.ListSourceDocumentChildren + Revisions: + operationId: Revisions.Document.ListRevisions + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + put: + tags: + - Revisions.Document + summary: Update the ref of navigation property Document in Revisions + operationId: Revisions.UpdateRefDocument + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Revisions.Document + summary: Delete ref of navigation property Document for Revisions + operationId: Revisions.DeleteRefDocument + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Revisions({Id})/Document/DocumentClasses': + get: + tags: + - Revisions.Document.DocumentClass + summary: Get DocumentClasses property value + operationId: Revisions.Document.ListDocumentClasses + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - ClassInstance + - ClassInstance desc + - ClassId + - ClassId desc + - DocumentId + - DocumentId desc + - CreatedBy + - CreatedBy desc + - CreationDate + - CreationDate desc + - ModifiedBy + - ModifiedBy desc + - ModificationDate + - ModificationDate desc + - IsPrimary + - IsPrimary desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - ClassInstance + - ClassId + - DocumentId + - CreatedBy + - CreationDate + - ModifiedBy + - ModificationDate + - IsPrimary + - Document + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Revisions.Document.DocumentClass + summary: Update property DocumentClasses value. + operationId: Revisions.Document.UpdateDocumentClasses + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Revisions.Document.DocumentClass + summary: Sets a new value for the collection of DocumentClass. + operationId: Revisions.Document.SetDocumentClasses + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Revisions({Id})/Document/DocumentClasses/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Revisions.Document.DocumentClass + summary: Get the number of the resource + operationId: Revisions.Document.DocumentClasses.GetCount-6342 + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Revisions({Id})/Document/Tags': + get: + tags: + - Revisions.Document.DocumentTagRel + summary: Get Tags property value + operationId: Revisions.Document.ListTags + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - DocumentId + - DocumentId desc + - TagId + - TagId desc + - DomainId + - DomainId desc + - CreatedBy + - CreatedBy desc + - ModifiedBy + - ModifiedBy desc + - CreationDate + - CreationDate desc + - ModificationDate + - ModificationDate desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - DocumentId + - TagId + - DomainId + - CreatedBy + - ModifiedBy + - CreationDate + - ModificationDate + - Document + - Tag + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + - Tag + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Revisions.Document.DocumentTagRel + summary: Update property Tags value. + operationId: Revisions.Document.UpdateTags + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Revisions.Document.DocumentTagRel + summary: Sets a new value for the collection of DocumentTagRel. + operationId: Revisions.Document.SetTags + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Revisions({Id})/Document/Tags/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Revisions.Document.DocumentTagRel + summary: Get the number of the resource + operationId: Revisions.Document.Tags.GetCount-161f + parameters: + - name: Id + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Revisions/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Revisions.RevisionDto + summary: Get the number of the resource + operationId: Revisions.GetCount-c6a5 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Tasks: + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Tasks.DocumentDto + summary: Get entities from Tasks + operationId: Tasks.DocumentDto.ListDocumentDto + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Name + - Name desc + - Description + - Description desc + - Filename + - Filename desc + - NumberOfRevisions + - NumberOfRevisions desc + - Suffix + - Suffix desc + - DomainId + - DomainId desc + - ModificationDate + - ModificationDate desc + - ModifiedBy + - ModifiedBy desc + - Tags + - Tags desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - Filename + - NumberOfRevisions + - Suffix + - DomainId + - ModificationDate + - ModifiedBy + - Tags + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Revisions + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Tasks.DocumentDto + summary: Add new entity to Tasks + operationId: Tasks.DocumentDto.CreateDocumentDto + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Tasks({Id})': + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Tasks.DocumentDto + summary: Get entity from Tasks by key + operationId: Tasks.DocumentDto.GetDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Name + - Description + - Filename + - NumberOfRevisions + - Suffix + - DomainId + - ModificationDate + - ModifiedBy + - Tags + - Revisions + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Revisions + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + links: + Revisions: + operationId: Tasks.ListRevisions + Upload: + operationId: Tasks.DocumentDto.Upload + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Tasks.DocumentDto + summary: Update entity in Tasks + operationId: Tasks.DocumentDto.UpdateDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Tasks.DocumentDto + summary: Delete entity from Tasks + operationId: Tasks.DocumentDto.DeleteDocumentDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Tasks({Id})/Default.Upload': + description: Provides operations to call the Upload method. + post: + tags: + - Tasks.DocumentDto + summary: Invoke action Upload + operationId: Tasks.DocumentDto.Upload + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + responses: + '200': + $ref: '#/components/responses/UploadResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: action + '/Tasks({Id})/Revisions': + description: Provides operations to manage the Revisions property of the Siterra.Documents.App.DTO.DocumentDto entity. + get: + tags: + - Tasks.RevisionDto + summary: Get Revisions from Tasks + operationId: Tasks.ListRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Number + - Number desc + - DocumentId + - DocumentId desc + - DocumentName + - DocumentName desc + - DocumentDescription + - DocumentDescription desc + - CreationDate + - CreationDate desc + - CreatedBy + - CreatedBy desc + - IsReviewed + - IsReviewed desc + - ReviewedBy + - ReviewedBy desc + - ReviewedDate + - ReviewedDate desc + - IsApproved + - IsApproved desc + - ApprovedBy + - ApprovedBy desc + - ApprovedDate + - ApprovedDate desc + - IsRejected + - IsRejected desc + - RejectedBy + - RejectedBy desc + - RejectedDate + - RejectedDate desc + - DomainId + - DomainId desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Number + - DocumentId + - DocumentName + - DocumentDescription + - CreationDate + - CreatedBy + - IsReviewed + - ReviewedBy + - ReviewedDate + - IsApproved + - ApprovedBy + - ApprovedDate + - IsRejected + - RejectedBy + - RejectedDate + - DomainId + - Document + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + - Document + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Tasks({Id})/Revisions({Id1})/$ref': + description: Provides operations to manage the collection of DocumentDto entities. + delete: + tags: + - Tasks.RevisionDto + summary: Delete ref of navigation property Revisions for Tasks + operationId: Tasks.revisions.DeleteRefRevisionDto + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: Id1 + in: path + description: The unique identifier of RevisionDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: RevisionDto + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Tasks({Id})/Revisions/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Tasks.RevisionDto + summary: Get the number of the resource + operationId: Tasks.Revisions.GetCount-9297 + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Tasks({Id})/Revisions/$ref': + description: Provides operations to manage the collection of DocumentDto entities. + get: + tags: + - Tasks.RevisionDto + summary: Get ref of Revisions from Tasks + operationId: Tasks.ListRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Id + - Id desc + - Number + - Number desc + - DocumentId + - DocumentId desc + - DocumentName + - DocumentName desc + - DocumentDescription + - DocumentDescription desc + - CreationDate + - CreationDate desc + - CreatedBy + - CreatedBy desc + - IsReviewed + - IsReviewed desc + - ReviewedBy + - ReviewedBy desc + - ReviewedDate + - ReviewedDate desc + - IsApproved + - IsApproved desc + - ApprovedBy + - ApprovedBy desc + - ApprovedDate + - ApprovedDate desc + - IsRejected + - IsRejected desc + - RejectedBy + - RejectedBy desc + - RejectedDate + - RejectedDate desc + - DomainId + - DomainId desc + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - Tasks.RevisionDto + summary: Create new navigation property ref to Revisions for Tasks + operationId: Tasks.CreateRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Tasks.RevisionDto + summary: Delete ref of navigation property Revisions for Tasks + operationId: Tasks.DeleteRefRevisions + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Tasks({Id})/Tags': + get: + tags: + - Tasks.DocumentTagRelDto + summary: Get Tags property value + operationId: Tasks.ListTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + - Name desc + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - Name + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - '*' + type: string + responses: + '200': + $ref: '#/components/responses/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Tasks.DocumentTagRelDto + summary: Update property Tags value. + operationId: Tasks.UpdateTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Tasks.DocumentTagRelDto + summary: Sets a new value for the collection of DocumentTagRelDto. + operationId: Tasks.SetTags + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Tasks({Id})/Tags/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Tasks.DocumentTagRelDto + summary: Get the number of the resource + operationId: Tasks.Tags.GetCount-3a1b + parameters: + - name: Id + in: path + description: The unique identifier of DocumentDto + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: DocumentDto + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Tasks/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Tasks.DocumentDto + summary: Get the number of the resource + operationId: Tasks.GetCount-2961 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' +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: + - 'null' + - string + 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: + - 'null' + - string + 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: + - 'null' + - string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + enum: + - '-INF' + - INF + - NaN + type: + - 'null' + - string + Siterra.Documents.App.DTO.DocumentDto: + title: DocumentDto + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Description: + type: + - 'null' + - string + Filename: + type: + - 'null' + - string + NumberOfRevisions: + type: + - 'null' + - string + Suffix: + type: + - 'null' + - string + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + 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: + - 'null' + - string + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Tags: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + Revisions: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + x-ms-navigationProperty: true + example: + Id: 0 + Name: string + Description: string + Filename: string + NumberOfRevisions: string + Suffix: string + DomainId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + Tags: + - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto + Revisions: + - '@odata.type': Siterra.Documents.App.DTO.RevisionDto + Siterra.Documents.App.DTO.LibraryDto: + title: LibraryDto + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Number: + type: + - 'null' + - string + Description: + type: + - 'null' + - string + LibraryTemplateId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ParentTypeId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ParentId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + AllowMultiple: + type: boolean + AutoCreate: + type: boolean + TypeId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + x-ms-navigationProperty: true + example: + 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 + Siterra.Documents.App.DTO.RevisionDto: + title: RevisionDto + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Number: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DocumentId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + DocumentName: + type: + - 'null' + - string + DocumentDescription: + type: + - 'null' + - string + CreationDate: + 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 + format: date-time + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + IsReviewed: + type: boolean + ReviewedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + IsApproved: + type: boolean + ApprovedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + IsRejected: + type: boolean + RejectedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Document: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + - type: + - 'null' + - object + x-ms-navigationProperty: true + example: + Id: 0 + Number: 0 + DocumentId: 0 + DocumentName: string + 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 + RejectedBy: 0 + RejectedDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 + Document: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.App.DTO.CategoryDto: + title: CategoryDto + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Description: + type: + - 'null' + - string + CreationDate: + 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 + format: date-time + 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 + format: date-time + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + example: + Id: 0 + Name: string + Description: string + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 + Siterra.Documents.App.DTO.DocumentTagRelDto: + title: DocumentTagRelDto + type: object + properties: + Name: + type: + - 'null' + - string + example: + Name: string + Siterra.Documents.BusinessLogic.Entities.Document.Document: + title: Document + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Description: + type: + - 'null' + - string + StatusId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + TypeId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Keywords: + type: + - 'null' + - string + CreationDate: + 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 + format: date-time + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + 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 + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + LibraryId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + OwnerUserId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + StatusDate: + 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 + format: date-time + LastRevisionId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + CheckoutPath: + type: + - 'null' + - string + CheckoutUserId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Number: + type: + - 'null' + - string + 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: + - 'null' + - string + format: date-time + FileSized: + type: number + format: decimal + FileClientPath: + type: + - 'null' + - string + LastRevisionFileId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsDeleted: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + IsNa: + type: + - 'null' + - number + format: decimal + IsRejected: + type: + - 'null' + - number + format: decimal + IsReviewed: + type: + - 'null' + - number + format: decimal + NaDescription: + type: + - 'null' + - string + NaReason: + type: + - 'null' + - string + RejectedDescription: + type: + - 'null' + - string + RejectedReason: + type: + - 'null' + - string + ReviewDescription: + type: + - 'null' + - string + SourceDocumentId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ScraperMapId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + SmsId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsApprovedOld: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Suffix: + type: + - 'null' + - string + ScrapeResultId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsApproved: + type: + - 'null' + - number + format: decimal + CategoryId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + SectionId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + VersionCount: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + LastFileName: + type: + - 'null' + - string + DocumentClasses: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass' + Tags: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' + Library: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + - type: + - 'null' + - object + x-ms-navigationProperty: true + LastRevisionFile: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' + - type: + - 'null' + - object + x-ms-navigationProperty: true + SourceDocument: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + - type: + - 'null' + - object + x-ms-navigationProperty: true + SourceDocumentChildren: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + x-ms-navigationProperty: true + Revisions: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision' + x-ms-navigationProperty: true + example: + 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 + Number: string + OriginalDate: '0001-01-01T00:00:00.0000000+00:00' + FileSized: 0 + FileClientPath: string + LastRevisionFileId: 0 + IsDeleted: 0 + IsNa: 0 + IsRejected: 0 + IsReviewed: 0 + NaDescription: string + NaReason: string + RejectedDescription: string + RejectedReason: string + ReviewDescription: string + 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.Document.DocumentClass + 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 + SourceDocumentChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Revisions: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision + Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass: + title: DocumentClass + type: object + properties: + ClassInstance: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ClassId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DocumentId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + 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 + format: date-time + IsPrimary: + type: boolean + Document: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + - type: + - 'null' + - object + x-ms-navigationProperty: true + example: + 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 + Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel: + title: DocumentTagRel + type: object + properties: + DocumentId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + TagId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + 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 + format: date-time + Document: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + - type: + - 'null' + - object + x-ms-navigationProperty: true + Tag: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' + - type: + - 'null' + - object + x-ms-navigationProperty: true + example: + 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 + Tag: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Tags.Tag + Siterra.Documents.BusinessLogic.Entities.Library.Library: + title: Library + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + ParentFolderId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Number: + type: + - 'null' + - string + TypeId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + OwnerUserId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + TotalSize: + type: number + format: decimal + FilesCounter: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + FoldersCounter: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + 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 + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ProjectId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + SearchRingId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + SiteId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + AssetId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + AllowMultiple: + type: boolean + AutoCreate: + type: boolean + Description: + type: + - 'null' + - string + IsTemplate: + type: boolean + ProgramId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + SourceFolderId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + TemplateClassId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + TemplateSubType: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsHidden: + type: boolean + IsDeleted: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + StatusId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + SmsId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ContractId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + VendorId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + OrganizationUnitId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IncidentId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + EventId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ClassInstance: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ClassId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + LibraryParent: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + - type: + - 'null' + - object + x-ms-navigationProperty: true + Type: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + - type: + - 'null' + - object + x-ms-navigationProperty: true + SourceFolder: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + - type: + - 'null' + - object + x-ms-navigationProperty: true + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + x-ms-navigationProperty: true + LibraryChildren: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + x-ms-navigationProperty: true + SourceLibraryChildren: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + x-ms-navigationProperty: true + example: + 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 + 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 + LibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + SourceLibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + Siterra.Documents.BusinessLogic.Entities.Library.LibraryType: + title: LibraryType + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + 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 + format: date-time + CreationDate: + 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 + format: date-time + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Description: + type: + - 'null' + - string + XmlName: + type: + - 'null' + - string + MasterId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Number: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ClassId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ParentId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + HasChanged: + type: boolean + MasterLibraryType: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + - type: + - 'null' + - object + x-ms-navigationProperty: true + ParentLibraryTypes: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + - type: + - 'null' + - object + x-ms-navigationProperty: true + MasterLibraryTypeChildren: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + x-ms-navigationProperty: true + ChildrenLibraryTypes: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + x-ms-navigationProperty: true + example: + 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' + DomainId: 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 + ChildrenLibraryTypes: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile: + title: DocumentFile + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Path: + type: + - 'null' + - string + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + 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 + format: date-time + Sized: + type: number + format: decimal + ActualName: + type: + - 'null' + - string + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + SourceClassId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ContentTypeId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + ClientPath: + type: + - 'null' + - string + IsSelfHosted: + maximum: 32767 + minimum: -32768 + type: number + format: int16 + SmsId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + Latitude: + type: + - 'null' + - number + format: decimal + Longitude: + type: + - 'null' + - number + format: decimal + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + x-ms-navigationProperty: true + example: + Id: 0 + Name: string + Path: string + ModifiedBy: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Sized: 0 + ActualName: string + DomainId: 0 + SourceClassId: 0 + ContentTypeId: 0 + ClientPath: string + IsSelfHosted: 0 + SmsId: 0 + Latitude: 0 + Longitude: 0 + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.BusinessLogic.Entities.Tags.Tag: + title: Tag + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Name: + type: + - 'null' + - string + Description: + type: + - 'null' + - string + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreationDate: + 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 + format: date-time + 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 + format: date-time + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag: + allOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' + - title: UserDefinedTag + type: object + properties: + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel + Siterra.Documents.BusinessLogic.Entities.Tags.Section: + allOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' + - title: Section + type: object + properties: + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + x-ms-navigationProperty: true + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.BusinessLogic.Entities.Tags.Category: + allOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' + - title: Category + type: object + properties: + Documents: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + x-ms-navigationProperty: true + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.BusinessLogic.Entities.Revision.Revision: + title: Revision + type: object + properties: + Id: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Number: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DocumentId: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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 + format: date-time + CreationDate: + 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 + format: date-time + ModifiedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + CreatedBy: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + Remarks: + type: + - 'null' + - string + FileId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DocumentOwnerContact: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + DocumentDescription: + type: + - 'null' + - string + DocumentStatusDate: + 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 + format: date-time + DocumentFolder: + type: + - 'null' + - string + DocumentKeywords: + type: + - 'null' + - string + DocumentStatus: + type: + - 'null' + - string + DocumentType: + type: + - 'null' + - string + DocumentName: + type: + - 'null' + - string + DocumentNumber: + type: + - 'null' + - string + DomainId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + IsDeleted: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + IsReviewed: + type: boolean + ReviewDescription: + type: + - 'null' + - string + ReviewedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsRejected: + type: boolean + RejectedReason: + type: + - 'null' + - string + RejectedDescription: + type: + - 'null' + - string + RejectedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + IsApproved: + type: boolean + ApprovedBy: + maximum: 2147483647 + minimum: -2147483648 + type: + - 'null' + - number + format: int32 + 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: + - 'null' + - string + format: date-time + 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: + - 'null' + - string + format: date-time + 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: + - 'null' + - string + format: date-time + Document: + anyOf: + - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + - type: + - 'null' + - object + x-ms-navigationProperty: true + example: + Id: 0 + Number: 0 + DocumentId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 + Remarks: string + FileId: 0 + DocumentOwnerContact: 0 + DocumentDescription: string + DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' + DocumentFolder: string + DocumentKeywords: string + DocumentStatus: string + DocumentType: string + DocumentName: string + DocumentNumber: string + DomainId: 0 + IsDeleted: 0 + IsReviewed: true + ReviewDescription: string + ReviewedBy: 0 + 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 + Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: + title: Collection of DocumentDto + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + Siterra.Documents.App.DTO.LibraryDtoCollectionResponse: + title: Collection of LibraryDto + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDto' + Siterra.Documents.App.DTO.RevisionDtoCollectionResponse: + title: Collection of RevisionDto + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDto' + Siterra.Documents.App.DTO.CategoryDtoCollectionResponse: + title: Collection of CategoryDto + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDto' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse: + title: Collection of Document + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' + Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse: + title: Collection of Revision + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.Revision' + Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse: + title: Collection of Library + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' + Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse: + title: Collection of LibraryType + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' + Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse: + title: Collection of Siterra.Documents.App.DTO.DocumentTagRelDto + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDto' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse: + title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse: + title: Collection of Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel' + responses: + error: + description: error + content: + application/json: + schema: + $ref: '#/components/schemas/Default.ODataErrors.ODataError' + ODataCountResponse: + description: The count of the resource + content: + text/plain: + schema: + $ref: '#/components/schemas/ODataCountResponse' + Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDtoCollectionResponse' + Siterra.Documents.App.DTO.LibraryDtoCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.LibraryDtoCollectionResponse' + Siterra.Documents.App.DTO.RevisionDtoCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.RevisionDtoCollectionResponse' + Siterra.Documents.App.DTO.CategoryDtoCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.CategoryDtoCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Revision.RevisionCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryTypeCollectionResponse' + Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentTagRelDtoCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentClassCollectionResponse' + Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRelCollectionResponse' + StringCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/StringCollectionResponse' + UploadResponse: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Siterra.Documents.App.DTO.DocumentDto' + parameters: + top: + name: $top + in: query + description: Show only the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + example: 50 + skip: + name: $skip + in: query + description: Skip the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + count: + name: $count + in: query + description: Include count of items + style: form + explode: false + schema: + type: boolean + filter: + name: $filter + in: query + description: Filter items by property values + style: form + explode: false + schema: + type: string + search: + name: $search + in: query + description: Search items by search phrases + style: form + explode: false + schema: + type: string + examples: + Siterra.Documents.App.DTO.DocumentDto: + value: + Id: 0 + Name: string + Description: string + Filename: string + NumberOfRevisions: string + Suffix: string + DomainId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + Tags: + - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto + Revisions: + - '@odata.type': Siterra.Documents.App.DTO.RevisionDto + Siterra.Documents.App.DTO.LibraryDto: + value: + 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 + Siterra.Documents.App.DTO.RevisionDto: + value: + Id: 0 + Number: 0 + DocumentId: 0 + DocumentName: string + 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 + RejectedBy: 0 + RejectedDate: '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: + Id: 0 + Name: string + Description: string + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 + Siterra.Documents.App.DTO.DocumentTagRelDto: + value: + Name: string + Siterra.Documents.BusinessLogic.Entities.Document.Document: + value: + 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 + Number: string + OriginalDate: '0001-01-01T00:00:00.0000000+00:00' + FileSized: 0 + FileClientPath: string + LastRevisionFileId: 0 + IsDeleted: 0 + IsNa: 0 + IsRejected: 0 + IsReviewed: 0 + NaDescription: string + NaReason: string + RejectedDescription: string + RejectedReason: string + ReviewDescription: string + 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.Document.DocumentClass + 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 + SourceDocumentChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Revisions: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision + Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass: + value: + 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 + 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 + Tag: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Tags.Tag + Siterra.Documents.BusinessLogic.Entities.Library.Library: + value: + 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 + 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 + LibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + SourceLibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + Siterra.Documents.BusinessLogic.Entities.Library.LibraryType: + value: + 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' + DomainId: 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 + ChildrenLibraryTypes: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile: + value: + Id: 0 + Name: string + Path: string + ModifiedBy: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Sized: 0 + ActualName: string + DomainId: 0 + SourceClassId: 0 + ContentTypeId: 0 + ClientPath: string + IsSelfHosted: 0 + SmsId: 0 + Latitude: 0 + Longitude: 0 + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.BusinessLogic.Entities.Tags.Tag: + value: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel + 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + 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' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Siterra.Documents.BusinessLogic.Entities.Revision.Revision: + value: + Id: 0 + Number: 0 + DocumentId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 + Remarks: string + FileId: 0 + DocumentOwnerContact: 0 + DocumentDescription: string + DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' + DocumentFolder: string + DocumentKeywords: string + DocumentStatus: string + DocumentType: string + DocumentName: string + DocumentNumber: string + DomainId: 0 + IsDeleted: 0 + IsReviewed: true + ReviewDescription: string + ReviewedBy: 0 + 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 + requestBodies: + refPostBody: + description: New navigation property ref value + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceCreate' + required: true + refPutBody: + description: New navigation property ref values + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceUpdate' + required: true +tags: + - name: Categories.CategoryDto + x-ms-docs-toc-type: page + - name: Documents.DocumentDto + x-ms-docs-toc-type: page + - name: Documents.RevisionDto + x-ms-docs-toc-type: page + - name: Documents.DocumentTagRelDto + x-ms-docs-toc-type: page + - name: Libraries.LibraryDto + x-ms-docs-toc-type: page + - name: Libraries.DocumentDto + x-ms-docs-toc-type: page + - name: Libraries.DocumentDto.DocumentTagRelDto + x-ms-docs-toc-type: page + - name: Revisions.RevisionDto + x-ms-docs-toc-type: page + - name: Revisions.Document + x-ms-docs-toc-type: page + - name: Revisions.Document.DocumentClass + x-ms-docs-toc-type: page + - name: Revisions.Document.DocumentTagRel + x-ms-docs-toc-type: page + - name: Tasks.DocumentDto + x-ms-docs-toc-type: page + - name: Tasks.RevisionDto + x-ms-docs-toc-type: page + - name: Tasks.DocumentTagRelDto + x-ms-docs-toc-type: page diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json new file mode 100644 index 000000000..1adf625b1 --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json @@ -0,0 +1,35661 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models", + "description": "This OData service is located at http://services.odata.org/TrippinRESTierService", + "version": "1.0.1" + }, + "servers": [ + { + "url": "http://services.odata.org/TrippinRESTierService" + } + ], + "paths": { + "/Airlines": { + "description": "Provides operations to manage the collection of Airline entities.", + "get": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Get entities from Airlines", + "operationId": "Airlines.Airline.ListAirline", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Add new entity to Airlines", + "operationId": "Airlines.Airline.CreateAirline", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airlines/{AirlineCode}": { + "description": "Provides operations to manage the collection of Airline entities.", + "get": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Get entity from Airlines by key", + "operationId": "Airlines.Airline.GetAirline", + "parameters": [ + { + "name": "AirlineCode", + "in": "path", + "description": "The unique identifier of Airline", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airline" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Update entity in Airlines", + "operationId": "Airlines.Airline.SetAirline", + "parameters": [ + { + "name": "AirlineCode", + "in": "path", + "description": "The unique identifier of Airline", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airline" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Delete entity from Airlines", + "operationId": "Airlines.Airline.DeleteAirline", + "parameters": [ + { + "name": "AirlineCode", + "in": "path", + "description": "The unique identifier of Airline", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airline" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airlines/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Airlines.Airline" + ], + "summary": "Get the number of the resource", + "operationId": "Airlines.GetCount-27a7", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports": { + "description": "Provides operations to manage the collection of Airport entities.", + "get": { + "tags": [ + "Airports.Airport" + ], + "summary": "Get entities from Airports", + "operationId": "Airports.Airport.ListAirport", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Airports.Airport" + ], + "summary": "Add new entity to Airports", + "operationId": "Airports.Airport.CreateAirport", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airports/{IcaoCode}": { + "description": "Provides operations to manage the collection of Airport entities.", + "get": { + "tags": [ + "Airports.Airport" + ], + "summary": "Get entity from Airports by key", + "operationId": "Airports.Airport.GetAirport", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Airports.Airport" + ], + "summary": "Update entity in Airports", + "operationId": "Airports.Airport.UpdateAirport", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Airports.Airport" + ], + "summary": "Delete entity from Airports", + "operationId": "Airports.Airport.DeleteAirport", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airports/{IcaoCode}/Location": { + "get": { + "tags": [ + "Airports.AirportLocation" + ], + "summary": "Get Location property value", + "operationId": "Airports.GetLocation", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "put": { + "tags": [ + "Airports.AirportLocation" + ], + "summary": "Update property Location value.", + "operationId": "Airports.SetLocation", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority": { + "description": "Provides operations to manage the EmergencyAuthority property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation entity.", + "get": { + "tags": [ + "Airports.Person" + ], + "summary": "Get EmergencyAuthority from Airports", + "description": "The person to contact in case of a crisis at this location.", + "operationId": "Airports.GetEmergencyAuthority", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/$ref": { + "description": "Provides operations to manage the collection of Airport entities.", + "get": { + "tags": [ + "Airports.Person" + ], + "summary": "Get ref of EmergencyAuthority from Airports", + "description": "The person to contact in case of a crisis at this location.", + "operationId": "Airports.GetRefEmergencyAuthority", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Airports.Person" + ], + "summary": "Update the ref of navigation property EmergencyAuthority in Airports", + "operationId": "Airports.UpdateRefEmergencyAuthority", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Airports.Person" + ], + "summary": "Delete ref of navigation property EmergencyAuthority for Airports", + "operationId": "Airports.DeleteRefEmergencyAuthority", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo": { + "get": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Airports.EmergencyAuthority.ListAddressInfo", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Airports.EmergencyAuthority.UpdateAddressInfo", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Airports.EmergencyAuthority.SetAddressInfo", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Airports.EmergencyAuthority.AddressInfo.GetCount-2ffe", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Airports.EmergencyAuthority.AddressInfo.GetCount.AsEventLocation-e708", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/HomeAddress": { + "get": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Airports.EmergencyAuthority.GetHomeAddress", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Airports.EmergencyAuthority.UpdateHomeAddress", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Airports.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/{IcaoCode}/Location/EmergencyAuthority/Photo": { + "description": "Provides operations to manage the media for the Airport entity.", + "get": { + "tags": [ + "Airports.Person" + ], + "summary": "Get Photo for the navigation property EmergencyAuthority from Airports", + "operationId": "Airports.GetEmergencyAuthorityPhoto-13fb", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "put": { + "tags": [ + "Airports.Person" + ], + "summary": "Update Photo for the navigation property EmergencyAuthority in Airports", + "operationId": "Airports.UpdateEmergencyAuthorityPhoto-13fb", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "delete": { + "tags": [ + "Airports.Person" + ], + "summary": "Delete Photo for the navigation property EmergencyAuthority in Airports", + "operationId": "Airports.DeleteEmergencyAuthorityPhoto-13fb", + "parameters": [ + { + "name": "IcaoCode", + "in": "path", + "description": "The unique identifier of Airport", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Airport" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/Airports/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Airports.Airport" + ], + "summary": "Get the number of the resource", + "operationId": "Airports.GetCount-60cc", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/GetNearestAirport(lat={lat},lon={lon})": { + "description": "Provides operations to call the GetNearestAirport method.", + "get": { + "tags": [ + "Airports" + ], + "summary": "Invoke functionImport GetNearestAirport", + "operationId": "FunctionImport.GetNearestAirport", + "parameters": [ + { + "name": "lat", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "double" + }, + { + "type": [ + "null", + "string" + ] + }, + { + "$ref": "#/components/schemas/ReferenceNumeric" + } + ] + } + }, + { + "name": "lon", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "double" + }, + { + "type": [ + "null", + "string" + ] + }, + { + "$ref": "#/components/schemas/ReferenceNumeric" + } + ] + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "functionImport" + } + }, + "/GetPersonWithMostFriends()": { + "description": "Provides operations to call the GetPersonWithMostFriends method.", + "get": { + "tags": [ + "People" + ], + "summary": "Invoke functionImport GetPersonWithMostFriends", + "description": "The person with most friends.", + "operationId": "FunctionImport.GetPersonWithMostFriends", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "functionImport" + } + }, + "/Me": { + "description": "Provides operations to manage the Person singleton.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get signed in person", + "description": "Retrieve the properties and relationships of Person object.", + "operationId": "Me.Person.GetPerson", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Person" + ], + "summary": "Update Me", + "operationId": "Me.Person.UpdatePerson", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/AddressInfo": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AddressInfo.GetCount-38f2", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-b1a4", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.AddressInfo.GetCount.AsEventLocation-5575", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.GetBestFriend", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.UpdateBestFriend", + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend" + ] + }, + "/Me/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.GetRefBestFriend", + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.UpdateRefBestFriend", + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property BestFriend for Me", + "operationId": "Me.DeleteRefBestFriend", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/BestFriend/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.BestFriend.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.BestFriend.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.BestFriend.AddressInfo.GetCount-b695", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-2154", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-0105", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.BestFriend.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-a28d", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "Me.GetBestFriend.AsEmployee-dcf6", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "Me.GetBestFriend.AsManager-09a9", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from Me", + "operationId": "Me.GetBestFriendPhoto-8333", + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in Me", + "operationId": "Me.UpdateBestFriendPhoto-8333", + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in Me", + "operationId": "Me.DeleteBestFriendPhoto-8333", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Friends from Me", + "description": "Friends of person", + "operationId": "Me.ListFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends" + ] + }, + "/Me/Friends/{UserName}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Friends/{UserName}/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.AddressInfo.GetCount-246e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-f440", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-42c7", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-15cc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "Me.GetFriends.AsEmployee-3dc7", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "Me.GetFriends.AsManager-ddec", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property Friends from Me", + "operationId": "Me.GetFriendsPhoto-287d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property Friends in Me", + "operationId": "Me.UpdateFriendsPhoto-287d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property Friends in Me", + "operationId": "Me.DeleteFriendsPhoto-287d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.GetCount-182b", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of Friends from Me", + "description": "Friends of person", + "operationId": "Me.ListRefFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Create new navigation property ref to Friends for Me", + "operationId": "Me.CreateRefFriends", + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.DeleteRefFriends", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "Me.ListFriends.AsEmployee-f4a5", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.GetCount.AsEmployee-884b", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "Me.ListFriends.AsManager-98ae", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.GetCount.AsManager-9376", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/HomeAddress": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-ba49", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "Me.Person.GetPerson.AsEmployee-bd18", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsEmployee.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsEmployee.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsEmployee.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.AddressInfo.GetCount-8488", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-989f", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.AddressInfo.GetCount.AsEventLocation-9375", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.AsEmployee.GetBestFriend", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.AsEmployee.UpdateBestFriend", + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/BestFriend", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.AsEmployee.GetRefBestFriend", + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.AsEmployee.UpdateRefBestFriend", + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property BestFriend for Me", + "operationId": "Me.AsEmployee.DeleteRefBestFriend", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsEmployee.BestFriend.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsEmployee.BestFriend.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsEmployee.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-1d72", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsEmployee.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsEmployee.BestFriend.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-19b8", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "Me.GetBestFriend.AsManager-c104", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from Me", + "operationId": "Me.GetBestFriendPhoto-4dc7", + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in Me", + "operationId": "Me.UpdateBestFriendPhoto-4dc7", + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in Me", + "operationId": "Me.DeleteBestFriendPhoto-4dc7", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Friends from Me", + "description": "Friends of person", + "operationId": "Me.AsEmployee.ListFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Friends", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.AsEmployee.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsEmployee.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsEmployee.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsEmployee.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Friends.AddressInfo.GetCount-660e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-7b1e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-feb8", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsEmployee.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsEmployee.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-600f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "Me.GetFriends.AsManager-aa0c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property Friends from Me", + "operationId": "Me.GetFriendsPhoto-6e41", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property Friends in Me", + "operationId": "Me.UpdateFriendsPhoto-6e41", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property Friends in Me", + "operationId": "Me.DeleteFriendsPhoto-6e41", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Friends.GetCount-0cb7", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of Friends from Me", + "description": "Friends of person", + "operationId": "Me.AsEmployee.ListRefFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Create new navigation property ref to Friends for Me", + "operationId": "Me.AsEmployee.CreateRefFriends", + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.AsEmployee.DeleteRefFriends", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "Me.ListFriends.AsManager-f993", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.GetCount.AsManager-85ff", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsEmployee.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsEmployee.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-6fc5", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers": { + "description": "Provides operations to manage the Peers property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Peers from Me", + "operationId": "Me.AsEmployee.ListPeers", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Peers for Me", + "operationId": "Me.AsEmployee.peers.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsEmployee.Peers.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsEmployee.Peers.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsEmployee.Peers.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Peers.AddressInfo.GetCount-3e91", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Peers.ListAddressInfo.AsEventLocation-1e59", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.Peers.AddressInfo.GetCount.AsEventLocation-be1d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsEmployee.Peers.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsEmployee.Peers.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Peers.GetHomeAddress.AsEventLocation-dc11", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property Peers from Me", + "operationId": "Me.GetPeersPhoto-4c48", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property Peers in Me", + "operationId": "Me.UpdatePeersPhoto-4c48", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property Peers in Me", + "operationId": "Me.DeletePeersPhoto-4c48", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Peers.GetCount-9fc2", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of Peers from Me", + "operationId": "Me.AsEmployee.ListRefPeers", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Create new navigation property ref to Peers for Me", + "operationId": "Me.AsEmployee.CreateRefPeers", + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Peers for Me", + "operationId": "Me.AsEmployee.DeleteRefPeers", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsEmployee.ListTrips", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsEmployee.CreateTrips", + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips", + "/Me/Trips" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsEmployee.GetTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsEmployee.UpdateTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsEmployee.DeleteTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}", + "/Me/Trips/{TripId}" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get PlanItems from Me", + "operationId": "Me.AsEmployee.Trips.ListPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems", + "/Me/Trips/{TripId}/PlanItems" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.AsEmployee.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Trips.PlanItems.GetCount-a822", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from Me", + "operationId": "Me.AsEmployee.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for Me", + "operationId": "Me.AsEmployee.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.AsEmployee.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsEmployee.Trips.GetCount-5aa2", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { + "description": "Provides operations to call the GetFavoriteAirline method.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke function GetFavoriteAirline", + "operationId": "Me.GetFavoriteAirline", + "responses": { + "200": { + "$ref": "#/components/responses/GetFavoriteAirlineResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { + "description": "Provides operations to call the GetFriendsTrips method.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke function GetFriendsTrips", + "operationId": "Me.GetFriendsTrips", + "parameters": [ + { + "name": "userName", + "in": "path", + "description": "Usage: userName='{userName}'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetFriendsTripsResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { + "description": "Provides operations to call the GetPeersForTrip method.", + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke action GetPeersForTrip", + "operationId": "Me.GetPeersForTrip", + "requestBody": { + "$ref": "#/components/requestBodies/GetPeersForTripRequestBody" + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetPeersForTripResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "Me.Person.GetPerson.AsManager-16dc", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsManager.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsManager.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsManager.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.AddressInfo.GetCount-75da", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.ListAddressInfo.AsEventLocation-55be", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.AddressInfo.GetCount.AsEventLocation-f67e", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.AsManager.GetBestFriend", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.AsManager.UpdateBestFriend", + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/BestFriend", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of BestFriend from Me", + "description": "The best friend.", + "operationId": "Me.AsManager.GetRefBestFriend", + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "Me.AsManager.UpdateRefBestFriend", + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property BestFriend for Me", + "operationId": "Me.AsManager.DeleteRefBestFriend", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsManager.BestFriend.ListAddressInfo", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsManager.BestFriend.UpdateAddressInfo", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsManager.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.ListAddressInfo.AsEventLocation-987a", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsManager.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsManager.BestFriend.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.BestFriend.GetHomeAddress.AsEventLocation-15c5", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "Me.GetBestFriend.AsEmployee-7bbe", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from Me", + "operationId": "Me.GetBestFriendPhoto-bac8", + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in Me", + "operationId": "Me.UpdateBestFriendPhoto-bac8", + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in Me", + "operationId": "Me.DeleteBestFriendPhoto-bac8", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports": { + "description": "Provides operations to manage the DirectReports property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get DirectReports from Me", + "operationId": "Me.AsManager.ListDirectReports", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property DirectReports for Me", + "operationId": "Me.AsManager.directReports.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsManager.DirectReports.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsManager.DirectReports.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsManager.DirectReports.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.DirectReports.AddressInfo.GetCount-f650", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.DirectReports.ListAddressInfo.AsEventLocation-660b", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.DirectReports.AddressInfo.GetCount.AsEventLocation-a070", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsManager.DirectReports.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsManager.DirectReports.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property DirectReports from Me", + "operationId": "Me.GetDirectReportsPhoto-e60c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property DirectReports in Me", + "operationId": "Me.UpdateDirectReportsPhoto-e60c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property DirectReports in Me", + "operationId": "Me.DeleteDirectReportsPhoto-e60c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.DirectReports.GetCount-8b92", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of DirectReports from Me", + "operationId": "Me.AsManager.ListRefDirectReports", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Create new navigation property ref to DirectReports for Me", + "operationId": "Me.AsManager.CreateRefDirectReports", + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property DirectReports for Me", + "operationId": "Me.AsManager.DeleteRefDirectReports", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Friends from Me", + "description": "Friends of person", + "operationId": "Me.AsManager.ListFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Friends", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.AsManager.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "Me.AsManager.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "Me.AsManager.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "post": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "Me.AsManager.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.Friends.AddressInfo.GetCount-b7db", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.ListAddressInfo.AsEventLocation-1ad9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-4d69", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/HomeAddress": { + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsManager.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsManager.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.Friends.GetHomeAddress.AsEventLocation-1e07", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "Me.GetFriends.AsEmployee-5b5f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for the navigation property Friends from Me", + "operationId": "Me.GetFriendsPhoto-64bd", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for the navigation property Friends in Me", + "operationId": "Me.UpdateFriendsPhoto-64bd", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for the navigation property Friends in Me", + "operationId": "Me.DeleteFriendsPhoto-64bd", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.Friends.GetCount-60a7", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get ref of Friends from Me", + "description": "Friends of person", + "operationId": "Me.AsManager.ListRefFriends", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Create new navigation property ref to Friends for Me", + "operationId": "Me.AsManager.CreateRefFriends", + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete ref of navigation property Friends for Me", + "operationId": "Me.AsManager.DeleteRefFriends", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "Me.ListFriends.AsEmployee-fe32", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Friends.GetCount.AsEmployee-6a35", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress": { + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "Me.AsManager.GetHomeAddress", + "parameters": [ + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "patch": { + "tags": [ + "Me.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "Me.AsManager.UpdateHomeAddress", + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "Me.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "Me.GetHomeAddress.AsEventLocation-5d95", + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { + "description": "Provides operations to call the Hire method.", + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke action Hire", + "description": "Hires someone for the company.", + "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire", + "requestBody": { + "description": "Action parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hire": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsManager.ListTrips", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsManager.CreateTrips", + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips", + "/Me/Trips" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsManager.GetTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsManager.UpdateTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "Me.AsManager.DeleteTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}", + "/Me/Trips/{TripId}" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get PlanItems from Me", + "operationId": "Me.AsManager.Trips.ListPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems", + "/Me/Trips/{TripId}/PlanItems" + ] + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.AsManager.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.Trips.PlanItems.GetCount-5ad2", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from Me", + "operationId": "Me.AsManager.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for Me", + "operationId": "Me.AsManager.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.AsManager.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "Me.AsManager.Trips.GetCount-f3f4", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { + "description": "Provides operations to call the ShareTrip method.", + "post": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke action ShareTrip", + "description": "Details of the shared trip.", + "operationId": "Me.ShareTrip", + "requestBody": { + "$ref": "#/components/requestBodies/ShareTripRequestBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { + "description": "Provides operations to call the UpdatePersonLastName method.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Invoke function UpdatePersonLastName", + "operationId": "Me.UpdatePersonLastName", + "parameters": [ + { + "name": "lastName", + "in": "path", + "description": "Usage: lastName='{lastName}'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/UpdatePersonLastNameResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/Me/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "Me.Person" + ], + "summary": "Get Photo for Person from Me", + "operationId": "Me.Person.GetPhoto-ab7e", + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "put": { + "tags": [ + "Me.Person" + ], + "summary": "Update Photo for Person in Me", + "operationId": "Me.Person.UpdatePhoto-ab7e", + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + }, + "delete": { + "tags": [ + "Me.Person" + ], + "summary": "Delete Photo for Person in Me", + "operationId": "Me.Person.DeletePhoto-ab7e", + "parameters": [ + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "Me.ListTrips", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "Me.CreateTrips", + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips" + ] + }, + "/Me/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "Me.GetTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "Me.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "Me.UpdateTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "Me.DeleteTrips", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}" + ] + }, + "/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "Me.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/Me/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get PlanItems from Me", + "operationId": "Me.Trips.ListPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems", + "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems" + ] + }, + "/Me/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Trips.PlanItems.GetCount-c250", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/Me/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from Me", + "operationId": "Me.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for Me", + "operationId": "Me.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "Me.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for Me", + "operationId": "Me.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/Me/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "Me.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "Me.Trips.GetCount-7b69", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/me", + "description": "The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API." + } + } + }, + "/NewComePeople": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get entities from NewComePeople", + "operationId": "NewComePeople.Person.ListPerson", + "parameters": [ + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Add new entity to NewComePeople", + "operationId": "NewComePeople.Person.CreatePerson", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get entity from NewComePeople by key", + "operationId": "NewComePeople.Person.GetPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update entity in NewComePeople", + "operationId": "NewComePeople.Person.UpdatePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete entity from NewComePeople", + "operationId": "NewComePeople.Person.DeletePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/AddressInfo": { + "get": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "NewComePeople.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "NewComePeople.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "NewComePeople.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.AddressInfo.GetCount-29d6", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.ListAddressInfo.AsEventLocation-d026", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "NewComePeople.AddressInfo.GetCount.AsEventLocation-29d3", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get BestFriend from NewComePeople", + "description": "The best friend.", + "operationId": "NewComePeople.GetBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "NewComePeople.UpdateBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get ref of BestFriend from NewComePeople", + "description": "The best friend.", + "operationId": "NewComePeople.GetRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "NewComePeople.UpdateRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete ref of navigation property BestFriend for NewComePeople", + "operationId": "NewComePeople.DeleteRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/BestFriend/AddressInfo": { + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "NewComePeople.BestFriend.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + }, + "patch": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "NewComePeople.BestFriend.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + }, + "post": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "NewComePeople.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.BestFriend.AddressInfo.GetCount-513c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "NewComePeople.BestFriend.AddressInfo.GetCount.AsEventLocation-ba36", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/HomeAddress": { + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "NewComePeople.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + }, + "patch": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "NewComePeople.BestFriend.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "NewComePeople.GetBestFriend.AsEmployee-7b75", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "NewComePeople.GetBestFriend.AsManager-61ce", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from NewComePeople", + "operationId": "NewComePeople.GetBestFriendPhoto-4f67", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + }, + "put": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in NewComePeople", + "operationId": "NewComePeople.UpdateBestFriendPhoto-4f67", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in NewComePeople", + "operationId": "NewComePeople.DeleteBestFriendPhoto-4f67", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/bestfriend", + "description": "The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API." + } + } + }, + "/NewComePeople/{UserName}/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get Friends from NewComePeople", + "description": "Friends of person", + "operationId": "NewComePeople.ListFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete ref of navigation property Friends for NewComePeople", + "operationId": "NewComePeople.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "NewComePeople.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "NewComePeople.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "post": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "NewComePeople.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Friends.AddressInfo.GetCount-9334", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Friends.AddressInfo.GetCount.AsEventLocation-be92", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "NewComePeople.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "NewComePeople.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "NewComePeople.GetFriends.AsEmployee-2969", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "NewComePeople.GetFriends.AsManager-708f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get Photo for the navigation property Friends from NewComePeople", + "operationId": "NewComePeople.GetFriendsPhoto-e9fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "put": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update Photo for the navigation property Friends in NewComePeople", + "operationId": "NewComePeople.UpdateFriendsPhoto-e9fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete Photo for the navigation property Friends in NewComePeople", + "operationId": "NewComePeople.DeleteFriendsPhoto-e9fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Friends.GetCount-2ec1", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get ref of Friends from NewComePeople", + "description": "Friends of person", + "operationId": "NewComePeople.ListRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Create new navigation property ref to Friends for NewComePeople", + "operationId": "NewComePeople.CreateRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete ref of navigation property Friends for NewComePeople", + "operationId": "NewComePeople.DeleteRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "NewComePeople.ListFriends.AsEmployee-2969", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Friends.GetCount.AsEmployee-4069", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "NewComePeople.ListFriends.AsManager-708f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Friends.GetCount.AsManager-d1d3", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/HomeAddress": { + "get": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "NewComePeople.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "patch": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "NewComePeople.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "NewComePeople.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "NewComePeople.GetHomeAddress.AsEventLocation-3fd9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { + "description": "Provides operations to call the GetFavoriteAirline method.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke function GetFavoriteAirline", + "operationId": "NewComePeople.Person.GetFavoriteAirline", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetFavoriteAirlineResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "function" + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { + "description": "Provides operations to call the GetFriendsTrips method.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke function GetFriendsTrips", + "operationId": "NewComePeople.Person.GetFriendsTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "userName", + "in": "path", + "description": "Usage: userName='{userName}'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetFriendsTripsResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/trips", + "description": "The GetFriendsTrips API is deprecated and will stop returning data on March 2023. Please use the new trips API on friends." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { + "description": "Provides operations to call the GetPeersForTrip method.", + "post": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke action GetPeersForTrip", + "operationId": "NewComePeople.Person.GetPeersForTrip", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/GetPeersForTripRequestBody" + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetPeersForTripResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "action" + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { + "description": "Provides operations to call the Hire method.", + "post": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke action Hire", + "description": "Hires someone for the company.", + "operationId": "NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "Action parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hire": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "action" + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { + "description": "Provides operations to call the ShareTrip method.", + "post": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke action ShareTrip", + "description": "Details of the shared trip.", + "operationId": "NewComePeople.Person.ShareTrip", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/ShareTripRequestBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "action" + } + }, + "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { + "description": "Provides operations to call the UpdatePersonLastName method.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Invoke function UpdatePersonLastName", + "operationId": "NewComePeople.Person.UpdatePersonLastName", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "lastName", + "in": "path", + "description": "Usage: lastName='{lastName}'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/UpdatePersonLastNameResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "function" + } + }, + "/NewComePeople/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get Photo for Person from NewComePeople", + "operationId": "NewComePeople.Person.GetPhoto-74be", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "put": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Update Photo for Person in NewComePeople", + "operationId": "NewComePeople.Person.UpdatePhoto-74be", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + }, + "delete": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Delete Photo for Person in NewComePeople", + "operationId": "NewComePeople.Person.DeletePhoto-74be", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "NewComePeople.ListTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "NewComePeople.CreateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "NewComePeople.GetTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "NewComePeople.UpdateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "NewComePeople.DeleteTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "NewComePeople.Person.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "function" + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Get PlanItems from NewComePeople", + "operationId": "NewComePeople.Trips.ListPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for NewComePeople", + "operationId": "NewComePeople.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Trips.PlanItems.GetCount-841f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from NewComePeople", + "operationId": "NewComePeople.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for NewComePeople", + "operationId": "NewComePeople.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "NewComePeople.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for NewComePeople", + "operationId": "NewComePeople.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/NewComePeople/{UserName}/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.Trips.GetCount-d155", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/NewComePeople/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "NewComePeople.Person" + ], + "summary": "Get the number of the resource", + "operationId": "NewComePeople.GetCount-55d5", + "parameters": [ + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/People": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get entities from People", + "operationId": "People.Person.ListPerson", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Add new entity to People", + "operationId": "People.Person.CreatePerson", + "requestBody": { + "description": "New entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get entity from People by key", + "operationId": "People.Person.GetPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Person" + ], + "summary": "Update entity in People", + "operationId": "People.Person.UpdatePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete entity from People", + "operationId": "People.Person.DeletePerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/AddressInfo": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AddressInfo.GetCount-ed5a", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-e5b8", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.AddressInfo.GetCount.AsEventLocation-4abd", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get BestFriend from People", + "description": "The best friend.", + "operationId": "People.GetBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.UpdateBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend" + ] + }, + "/People/{UserName}/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of BestFriend from People", + "description": "The best friend.", + "operationId": "People.GetRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.UpdateRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property BestFriend for People", + "operationId": "People.DeleteRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/BestFriend/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.BestFriend.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.BestFriend.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.BestFriend.AddressInfo.GetCount-16df", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-c332", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-fe88", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.BestFriend.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-53c4", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "People.GetBestFriend.AsEmployee-7188", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get best friend", + "description": "Get the item of type Person cast as Manager", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0" + }, + "operationId": "People.GetBestFriend.AsManager-5f08", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from People", + "operationId": "People.GetBestFriendPhoto-c3ac", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in People", + "operationId": "People.UpdateBestFriendPhoto-c3ac", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in People", + "operationId": "People.DeleteBestFriendPhoto-c3ac", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "List friends", + "description": "List the friends of a specific person", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0" + }, + "operationId": "People.ListFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends" + ] + }, + "/People/{UserName}/Friends/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete a friend.", + "description": "Delete an instance of a friend relationship.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0" + }, + "operationId": "People.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Friends/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.AddressInfo.GetCount-bdaf", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-a5f6", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-2795", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-da5e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "People.GetFriends.AsEmployee-11bf", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "People.GetFriends.AsManager-1cfb", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property Friends from People", + "operationId": "People.GetFriendsPhoto-12fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property Friends in People", + "operationId": "People.UpdateFriendsPhoto-12fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property Friends in People", + "operationId": "People.DeleteFriendsPhoto-12fc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.GetCount-92b9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "List friends", + "description": "List the friends of a specific person", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0" + }, + "operationId": "People.ListRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Create a friend.", + "description": "Create a new friend.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-post-friend?view=graph-rest-1.0" + }, + "operationId": "People.CreateRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete a friend.", + "description": "Delete an instance of a friend relationship.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0" + }, + "operationId": "People.DeleteRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.ListFriends.AsEmployee-11bf", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.GetCount.AsEmployee-a96c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.ListFriends.AsManager-1cfb", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.GetCount.AsManager-26b3", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/HomeAddress": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get home address", + "description": "Get the home address of a specific person", + "operationId": "People.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-d0cf", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "People.Person.GetPerson.AsEmployee-317b", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsEmployee.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsEmployee.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsEmployee.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.AddressInfo.GetCount-3d43", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-1342", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.AddressInfo.GetCount.AsEventLocation-ac7d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get BestFriend from People", + "description": "The best friend.", + "operationId": "People.AsEmployee.GetBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.AsEmployee.UpdateBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/BestFriend", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of BestFriend from People", + "description": "The best friend.", + "operationId": "People.AsEmployee.GetRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.AsEmployee.UpdateRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property BestFriend for People", + "operationId": "People.AsEmployee.DeleteRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsEmployee.BestFriend.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsEmployee.BestFriend.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsEmployee.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.BestFriend.AddressInfo.GetCount-cb8a", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-7cd9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-0343", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsEmployee.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsEmployee.BestFriend.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-7db9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "People.GetBestFriend.AsManager-7b70", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from People", + "operationId": "People.GetBestFriendPhoto-a839", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in People", + "operationId": "People.UpdateBestFriendPhoto-a839", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in People", + "operationId": "People.DeleteBestFriendPhoto-a839", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Friends from People", + "description": "Friends of person", + "operationId": "People.AsEmployee.ListFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Friends", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Friends for People", + "operationId": "People.AsEmployee.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsEmployee.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsEmployee.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsEmployee.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Friends.AddressInfo.GetCount-1e8b", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-d49e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-1f2b", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsEmployee.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsEmployee.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-d77d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "People.GetFriends.AsManager-3e3c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property Friends from People", + "operationId": "People.GetFriendsPhoto-1a66", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property Friends in People", + "operationId": "People.UpdateFriendsPhoto-1a66", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property Friends in People", + "operationId": "People.DeleteFriendsPhoto-1a66", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Friends.GetCount-4db4", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of Friends from People", + "description": "Friends of person", + "operationId": "People.AsEmployee.ListRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Create new navigation property ref to Friends for People", + "operationId": "People.AsEmployee.CreateRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Friends for People", + "operationId": "People.AsEmployee.DeleteRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.ListFriends.AsManager-3e3c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.GetCount.AsManager-b145", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsEmployee.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsEmployee.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-90e5", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers": { + "description": "Provides operations to manage the Peers property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Peers from People", + "operationId": "People.AsEmployee.ListPeers", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Peers for People", + "operationId": "People.AsEmployee.peers.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsEmployee.Peers.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsEmployee.Peers.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsEmployee.Peers.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Peers.AddressInfo.GetCount-755d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Peers.ListAddressInfo.AsEventLocation-b918", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.Peers.AddressInfo.GetCount.AsEventLocation-ef5e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsEmployee.Peers.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsEmployee.Peers.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Peers.GetHomeAddress.AsEventLocation-311b", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property Peers from People", + "operationId": "People.GetPeersPhoto-ecda", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property Peers in People", + "operationId": "People.UpdatePeersPhoto-ecda", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property Peers in People", + "operationId": "People.DeletePeersPhoto-ecda", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Peers.GetCount-44d2", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of Peers from People", + "operationId": "People.AsEmployee.ListRefPeers", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Create new navigation property ref to Peers for People", + "operationId": "People.AsEmployee.CreateRefPeers", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Peers for People", + "operationId": "People.AsEmployee.DeleteRefPeers", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsEmployee.ListTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsEmployee.CreateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips", + "/People/{UserName}/Trips" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsEmployee.GetTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsEmployee.UpdateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsEmployee.DeleteTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}", + "/People/{UserName}/Trips/{TripId}" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get PlanItems from People", + "operationId": "People.AsEmployee.Trips.ListPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems", + "/People/{UserName}/Trips/{TripId}/PlanItems" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.AsEmployee.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Trips.PlanItems.GetCount-7df9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from People", + "operationId": "People.AsEmployee.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for People", + "operationId": "People.AsEmployee.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.AsEmployee.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsEmployee.Trips.GetCount-c760", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { + "description": "Provides operations to call the GetFavoriteAirline method.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Invoke function GetFavoriteAirline", + "operationId": "People.Person.GetFavoriteAirline", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetFavoriteAirlineResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { + "description": "Provides operations to call the GetFriendsTrips method.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Invoke function GetFriendsTrips", + "operationId": "People.Person.GetFriendsTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "userName", + "in": "path", + "description": "Usage: userName='{userName}'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetFriendsTripsResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { + "description": "Provides operations to call the GetPeersForTrip method.", + "post": { + "tags": [ + "People.Person" + ], + "summary": "Invoke action GetPeersForTrip", + "operationId": "People.Person.GetPeersForTrip", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/GetPeersForTripRequestBody" + }, + "responses": { + "200": { + "$ref": "#/components/responses/GetPeersForTripResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager", + "operationId": "People.Person.GetPerson.AsManager-d051", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsManager.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsManager.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsManager.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.AddressInfo.GetCount-f84e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.ListAddressInfo.AsEventLocation-7526", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.AddressInfo.GetCount.AsEventLocation-3722", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend": { + "description": "Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get BestFriend from People", + "description": "The best friend.", + "operationId": "People.AsManager.GetBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.AsManager.UpdateBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/BestFriend", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of BestFriend from People", + "description": "The best friend.", + "operationId": "People.AsManager.GetRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property link", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update the best friend.", + "description": "Update an instance of a best friend.", + "operationId": "People.AsManager.UpdateRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPutBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property BestFriend for People", + "operationId": "People.AsManager.DeleteRefBestFriend", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsManager.BestFriend.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsManager.BestFriend.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsManager.BestFriend.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.BestFriend.AddressInfo.GetCount-5a39", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.ListAddressInfo.AsEventLocation-897f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-5af3", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsManager.BestFriend.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsManager.BestFriend.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.BestFriend.GetHomeAddress.AsEventLocation-545d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "People.GetBestFriend.AsEmployee-0445", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property BestFriend from People", + "operationId": "People.GetBestFriendPhoto-f05d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property BestFriend in People", + "operationId": "People.UpdateBestFriendPhoto-f05d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property BestFriend in People", + "operationId": "People.DeleteBestFriendPhoto-f05d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports": { + "description": "Provides operations to manage the DirectReports property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get DirectReports from People", + "operationId": "People.AsManager.ListDirectReports", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property DirectReports for People", + "operationId": "People.AsManager.directReports.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsManager.DirectReports.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsManager.DirectReports.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsManager.DirectReports.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.DirectReports.AddressInfo.GetCount-f46e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.DirectReports.ListAddressInfo.AsEventLocation-1252", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.DirectReports.AddressInfo.GetCount.AsEventLocation-5d49", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsManager.DirectReports.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsManager.DirectReports.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.DirectReports.GetHomeAddress.AsEventLocation-cf8d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property DirectReports from People", + "operationId": "People.GetDirectReportsPhoto-7149", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property DirectReports in People", + "operationId": "People.UpdateDirectReportsPhoto-7149", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property DirectReports in People", + "operationId": "People.DeleteDirectReportsPhoto-7149", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.DirectReports.GetCount-0ec4", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of DirectReports from People", + "operationId": "People.AsManager.ListRefDirectReports", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Create new navigation property ref to DirectReports for People", + "operationId": "People.AsManager.CreateRefDirectReports", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property DirectReports for People", + "operationId": "People.AsManager.DeleteRefDirectReports", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends": { + "description": "Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Friends from People", + "description": "Friends of person", + "operationId": "People.AsManager.ListFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Friends", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Friends for People", + "operationId": "People.AsManager.friends.DeleteRefPerson", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get AddressInfo property value", + "operationId": "People.AsManager.Friends.ListAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property AddressInfo value.", + "operationId": "People.AsManager.Friends.UpdateAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "post": { + "tags": [ + "People.Person.Location" + ], + "summary": "Sets a new value for the collection of Location.", + "operationId": "People.AsManager.Friends.SetAddressInfo", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.Friends.AddressInfo.GetCount-f486", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.ListAddressInfo.AsEventLocation-f8c9", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "summary": "Get the number of the resource", + "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-4480", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/HomeAddress": { + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsManager.Friends.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Person.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsManager.Friends.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Person.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.Friends.GetHomeAddress.AsEventLocation-eb71", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee", + "operationId": "People.GetFriends.AsEmployee-161e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get Photo for the navigation property Friends from People", + "operationId": "People.GetFriendsPhoto-b97d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update Photo for the navigation property Friends in People", + "operationId": "People.UpdateFriendsPhoto-b97d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete Photo for the navigation property Friends in People", + "operationId": "People.DeleteFriendsPhoto-b97d", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "UserName1", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.Friends.GetCount-1c0c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get ref of Friends from People", + "description": "Friends of person", + "operationId": "People.AsManager.ListRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Person" + ], + "summary": "Create new navigation property ref to Friends for People", + "operationId": "People.AsManager.CreateRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete ref of navigation property Friends for People", + "operationId": "People.AsManager.DeleteRefFriends", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.ListFriends.AsEmployee-161e", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Friends.GetCount.AsEmployee-f325", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress": { + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get HomeAddress property value", + "operationId": "People.AsManager.GetHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "patch": { + "tags": [ + "People.Location" + ], + "summary": "Update property HomeAddress value.", + "operationId": "People.AsManager.UpdateHomeAddress", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "description": "Casts the previous resource to EventLocation.", + "get": { + "tags": [ + "People.Location" + ], + "summary": "Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation", + "operationId": "People.GetHomeAddress.AsEventLocation-e3dc", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Entity result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { + "description": "Provides operations to call the Hire method.", + "post": { + "tags": [ + "People.Person" + ], + "summary": "Invoke action Hire", + "description": "Hires someone for the company.", + "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "Action parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hire": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsManager.ListTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsManager.CreateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips", + "/People/{UserName}/Trips" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsManager.GetTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsManager.UpdateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "People.AsManager.DeleteTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}", + "/People/{UserName}/Trips/{TripId}" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get PlanItems from People", + "operationId": "People.AsManager.Trips.ListPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems", + "/People/{UserName}/Trips/{TripId}/PlanItems" + ] + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.AsManager.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.Trips.PlanItems.GetCount-fa08", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from People", + "operationId": "People.AsManager.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for People", + "operationId": "People.AsManager.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.AsManager.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "People.AsManager.Trips.GetCount-1f8c", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { + "description": "Provides operations to call the ShareTrip method.", + "post": { + "tags": [ + "People.Person" + ], + "summary": "Invoke action ShareTrip", + "description": "Details of the shared trip.", + "operationId": "People.Person.ShareTrip", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/ShareTripRequestBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "action" + } + }, + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { + "description": "Provides operations to call the UpdatePersonLastName method.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Invoke function UpdatePersonLastName", + "operationId": "People.Person.UpdatePersonLastName", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "lastName", + "in": "path", + "description": "Usage: lastName='{lastName}'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/UpdatePersonLastNameResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + } + }, + "/People/{UserName}/Photo": { + "description": "Provides operations to manage the media for the Person entity.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get photo", + "description": "Get photo of a specific user", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0" + }, + "operationId": "People.Person.GetPhoto-883f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "responses": { + "200": { + "description": "Retrieved media content", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "put": { + "tags": [ + "People.Person" + ], + "summary": "Update photo", + "description": "Update photo of a specific user", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0" + }, + "operationId": "People.Person.UpdatePhoto-883f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New media content.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + }, + "delete": { + "tags": [ + "People.Person" + ], + "summary": "Delete photo", + "description": "Delete photo of a specific user", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0" + }, + "operationId": "People.Person.DeletePhoto-883f", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Trips": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "List trips.", + "description": "Retrieve a list of trips.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" + }, + "operationId": "People.ListTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trip" + ], + "summary": "Create a trip.", + "description": "Create a new trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0" + }, + "operationId": "People.CreateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + } + ], + "requestBody": { + "description": "New navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created navigation property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips" + ] + }, + "/People/{UserName}/Trips/{TripId}": { + "description": "Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get a trip.", + "description": "Retrieve the properties of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0" + }, + "operationId": "People.GetTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Retrieved navigation property", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "patch": { + "tags": [ + "People.Trip" + ], + "summary": "Update a trip.", + "description": "Update an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0" + }, + "operationId": "People.UpdateTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "description": "New navigation property values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trip" + ], + "summary": "Delete a trip.", + "description": "Delete an instance of a trip.", + "externalDocs": { + "description": "Find more info here", + "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" + }, + "operationId": "People.DeleteTrips", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}" + ] + }, + "/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { + "description": "Provides operations to call the GetInvolvedPeople method.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Invoke function GetInvolvedPeople", + "operationId": "People.Person.Trips.Trip.GetInvolvedPeople", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "function" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()" + ] + }, + "/People/{UserName}/Trips/{TripId}/PlanItems": { + "description": "Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get PlanItems from People", + "operationId": "People.Trips.ListPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "x-ms-docs-grouped-path": [ + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems", + "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems" + ] + }, + "/People/{UserName}/Trips/{TripId}/PlanItems/{PlanItemId}/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.Trips.planItems.DeleteRefPlanItem", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "PlanItemId", + "in": "path", + "description": "The unique identifier of PlanItem", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "PlanItem" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Trips/{TripId}/PlanItems/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get the number of the resource", + "operationId": "People.Trips.PlanItems.GetCount-9a27", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/{UserName}/Trips/{TripId}/PlanItems/$ref": { + "description": "Provides operations to manage the collection of Person entities.", + "get": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Get ref of PlanItems from People", + "operationId": "People.Trips.ListRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/StringCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "post": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Create new navigation property ref to PlanItems for People", + "operationId": "People.Trips.CreateRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/refPostBody" + }, + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + }, + "delete": { + "tags": [ + "People.Trips.PlanItem" + ], + "summary": "Delete ref of navigation property PlanItems for People", + "operationId": "People.Trips.DeleteRefPlanItems", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "TripId", + "in": "path", + "description": "The unique identifier of Trip", + "required": true, + "schema": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "x-ms-docs-key-type": "Trip" + }, + { + "name": "If-Match", + "in": "header", + "description": "ETag", + "schema": { + "type": "string" + } + }, + { + "name": "@id", + "in": "query", + "description": "The delete Uri", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + }, + "x-ms-docs-operation-type": "operation" + } + }, + "/People/{UserName}/Trips/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Trip" + ], + "summary": "Get the number of the resource", + "operationId": "People.Trips.GetCount-e877", + "parameters": [ + { + "name": "UserName", + "in": "path", + "description": "The unique identifier of Person", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-docs-key-type": "Person" + }, + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.GetCount-dd8d", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "description": "Casts the previous resource to Employee.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.Person.ListPerson.AsEmployee-013a", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Person.Person.GetCount.AsEmployee-ef29", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "description": "Casts the previous resource to Manager.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", + "operationId": "People.Person.ListPerson.AsManager-3e14", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/top" + }, + { + "$ref": "#/components/parameters/skip" + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/count" + }, + { + "name": "$orderby", + "in": "query", + "description": "Order items by property values", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$select", + "in": "query", + "description": "Select properties to be returned", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "$expand", + "in": "query", + "description": "Expand related entities", + "style": "form", + "explode": false, + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count": { + "description": "Provides operations to count the resources in the collection.", + "get": { + "tags": [ + "People.Person" + ], + "summary": "Get the number of the resource", + "operationId": "People.Person.Person.GetCount.AsManager-2d48", + "parameters": [ + { + "name": "ConsistencyLevel", + "in": "header", + "description": "Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries", + "schema": { + "type": "string" + }, + "examples": { + "example-1": { + "description": "$search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'.", + "value": "eventual" + } + } + }, + { + "$ref": "#/components/parameters/search" + }, + { + "$ref": "#/components/parameters/filter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ODataCountResponse" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "deprecated": true, + "x-ms-deprecation": { + "removalDate": "2023-03-15T00:00:00.0000000+00:00", + "date": "2021-08-24T00:00:00.0000000+00:00", + "version": "2021-05/people", + "description": "The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API." + } + } + }, + "/ResetDataSource": { + "description": "Provides operations to call the ResetDataSource method.", + "post": { + "tags": [ + "ResetDataSource" + ], + "summary": "Invoke actionImport ResetDataSource", + "description": "Resets the data source to default values.", + "operationId": "ActionImport.ResetDataSource", + "responses": { + "204": { + "description": "Success" + }, + "default": { + "$ref": "#/components/responses/error" + } + }, + "x-ms-docs-operation-type": "actionImport" + } + } + }, + "components": { + "schemas": { + "Edm.Geography": { + "$ref": "#/components/schemas/Edm.Geometry" + }, + "Edm.GeographyPoint": { + "$ref": "#/components/schemas/Edm.GeometryPoint" + }, + "Edm.GeographyLineString": { + "$ref": "#/components/schemas/Edm.GeometryLineString" + }, + "Edm.GeographyPolygon": { + "$ref": "#/components/schemas/Edm.GeometryPolygon" + }, + "Edm.GeographyMultiPoint": { + "$ref": "#/components/schemas/Edm.GeometryMultiPoint" + }, + "Edm.GeographyMultiLineString": { + "$ref": "#/components/schemas/Edm.GeometryMultiLineString" + }, + "Edm.GeographyMultiPolygon": { + "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" + }, + "Edm.GeographyCollection": { + "$ref": "#/components/schemas/Edm.GeometryCollection" + }, + "Edm.Geometry": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/Edm.GeometryPoint" + }, + { + "$ref": "#/components/schemas/Edm.GeometryLineString" + }, + { + "$ref": "#/components/schemas/Edm.GeometryPolygon" + }, + { + "$ref": "#/components/schemas/Edm.GeometryMultiPoint" + }, + { + "$ref": "#/components/schemas/Edm.GeometryMultiLineString" + }, + { + "$ref": "#/components/schemas/Edm.GeometryMultiPolygon" + }, + { + "$ref": "#/components/schemas/Edm.GeometryCollection" + } + ] + }, + "Edm.GeometryPoint": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "Point" + ], + "type": "string", + "default": "Point" + }, + "coordinates": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + }, + "Edm.GeometryLineString": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "LineString" + ] + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + } + }, + "Edm.GeometryPolygon": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "Polygon" + ] + }, + "coordinates": { + "minItems": 4, + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + } + } + }, + "Edm.GeometryMultiPoint": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "MultiPoint" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + } + }, + "Edm.GeometryMultiLineString": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "MultiLineString" + ] + }, + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + } + } + }, + "Edm.GeometryMultiPolygon": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "MultiPolygon" + ] + }, + "coordinates": { + "minItems": 4, + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoJSON.position" + } + } + } + } + } + }, + "Edm.GeometryCollection": { + "required": [ + "type", + "coordinates" + ], + "type": "object", + "properties": { + "type": { + "enum": [ + "GeometryCollection" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edm.Geometry" + } + } + } + }, + "GeoJSON.position": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError": { + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": [ + "null", + "string" + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": [ + "null", + "string" + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError": { + "title": "InnerError", + "type": "object", + "properties": { + "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": [ + "null", + "string" + ], + "format": "date-time" + }, + "RequestId": { + "type": [ + "null", + "string" + ] + } + } + }, + "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": [ + "null", + "string" + ] + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "enum": [ + "-INF", + "INF", + "NaN" + ], + "type": [ + "null", + "string" + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { + "title": "Person", + "type": "object", + "properties": { + "UserName": { + "type": "string" + }, + "FirstName": { + "type": "string" + }, + "LastName": { + "type": [ + "null", + "string" + ] + }, + "MiddleName": { + "type": [ + "null", + "string" + ] + }, + "Gender": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "int64" + }, + { + "type": [ + "null", + "string" + ] + } + ] + }, + "Emails": { + "type": "array", + "items": { + "type": [ + "null", + "string" + ] + } + }, + "AddressInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + }, + "HomeAddress": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "type": [ + "null", + "object" + ] + } + ] + }, + "FavoriteFeature": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + }, + "Photo": { + "type": [ + "null", + "string" + ], + "format": "base64url" + }, + "Friends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "description": "Friends of person", + "x-ms-navigationProperty": true + }, + "BestFriend": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "description": "The best friend.", + "x-ms-navigationProperty": true + }, + "Trips": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + }, + "description": "Collection of trips.", + "x-ms-navigationProperty": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { + "title": "Airline", + "type": "object", + "properties": { + "AirlineCode": { + "type": "string" + }, + "Name": { + "type": [ + "null", + "string" + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { + "title": "Airport", + "type": "object", + "properties": { + "Name": { + "type": [ + "null", + "string" + ] + }, + "IcaoCode": { + "type": "string" + }, + "IataCode": { + "type": [ + "null", + "string" + ] + }, + "Location": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { + "title": "Location", + "type": "object", + "properties": { + "Address": { + "type": [ + "null", + "string" + ] + }, + "City": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { + "title": "City", + "type": "object", + "properties": { + "Name": { + "type": [ + "null", + "string" + ] + }, + "CountryRegion": { + "type": [ + "null", + "string" + ] + }, + "Region": { + "type": [ + "null", + "string" + ] + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "title": "AirportLocation", + "type": "object", + "properties": { + "Loc": { + "$ref": "#/components/schemas/Edm.GeographyPoint" + }, + "EmergencyAuthority": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "type": [ + "null", + "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": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "title": "EventLocation", + "type": "object", + "properties": { + "BuildingInfo": { + "type": [ + "null", + "string" + ] + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { + "title": "Trip", + "type": "object", + "properties": { + "TripId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ShareId": { + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "type": "string", + "format": "uuid" + }, + "Name": { + "type": [ + "null", + "string" + ] + }, + "Budget": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "float" + }, + { + "type": [ + "null", + "string" + ] + }, + { + "$ref": "#/components/schemas/ReferenceNumeric" + } + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + }, + "Tags": { + "type": "array", + "items": { + "type": [ + "null", + "string" + ] + } + }, + "TripData": { }, + "DestinationInfo": { + "type": "array", + "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])$", + "type": "string", + "format": "date-time" + }, + "EndsAt": { + "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", + "format": "date-time" + }, + "PlanItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + }, + "x-ms-navigationProperty": true + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { + "title": "PlanItem", + "type": "object", + "properties": { + "PlanItemId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + }, + "ConfirmationCode": { + "type": [ + "null", + "string" + ] + }, + "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])$", + "type": "string", + "format": "date-time" + }, + "EndsAt": { + "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", + "format": "date-time" + }, + "Duration": { + "pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$", + "type": "string", + "format": "duration" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + }, + { + "title": "Event", + "type": "object", + "properties": { + "OccursAt": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + }, + { + "type": [ + "null", + "object" + ] + } + ] + }, + "Description": { + "type": [ + "null", + "string" + ] + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + }, + { + "title": "PublicTransportation", + "type": "object", + "properties": { + "SeatNumber": { + "type": [ + "null", + "string" + ] + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation" + }, + { + "title": "Flight", + "type": "object", + "properties": { + "FlightNumber": { + "type": [ + "null", + "string" + ] + }, + "Airline": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "From": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + }, + "To": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + }, + { + "type": [ + "null", + "object" + ] + } + ], + "x-ms-navigationProperty": true + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "title": "Employee", + "type": "object", + "properties": { + "Cost": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "int64" + }, + { + "type": [ + "null", + "string" + ] + } + ] + }, + "Peers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "allOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + { + "title": "Manager", + "type": "object", + "properties": { + "Budget": { + "oneOf": [ + { + "type": [ + "null", + "number" + ], + "format": "int64" + }, + { + "type": [ + "null", + "string" + ] + } + ] + }, + "BossOffice": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + { + "type": [ + "null", + "object" + ] + } + ] + }, + "DirectReports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "x-ms-navigationProperty": true + } + } + } + ] + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { + "title": "PersonGender", + "enum": [ + "Male", + "Female", + "Unknow" + ], + "type": "string", + "description": "Gender of the person.", + "x-ms-enum": { + "name": "PersonGender", + "modelAsString": false, + "values": [ + { + "value": "Male", + "description": "The Male gender.", + "name": "Male" + }, + { + "value": "Female", + "description": "The Female gender.", + "name": "Female" + }, + { + "value": "Unknow", + "description": "Unknown gender or prefers not to say.", + "name": "Unknow" + } + ] + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature": { + "title": "Feature", + "enum": [ + "Feature1", + "Feature2", + "Feature3", + "Feature4" + ], + "type": "string", + "x-ms-enum-flags": { + "isFlags": true + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse": { + "title": "Collection of Airline", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse": { + "title": "Collection of Airport", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse": { + "title": "Collection of Trip", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse": { + "title": "Collection of PlanItem", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse": { + "title": "Collection of Employee", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse": { + "title": "Collection of Manager", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse": { + "title": "Collection of Event", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse": { + "title": "Collection of PublicTransportation", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse": { + "title": "Collection of Flight", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse": { + "title": "Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + } + } + } + }, + "responses": { + "error": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError" + } + } + } + }, + "ODataCountResponse": { + "description": "The count of the resource", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ODataCountResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse" + } + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse" + } + } + } + }, + "StringCollectionResponse": { + "description": "Retrieved collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StringCollectionResponse" + } + } + } + }, + "GetFavoriteAirlineResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + }, + { + "type": [ + "null", + "object" + ] + } + ] + } + } + } + }, + "GetFriendsTripsResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Trip", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + } + } + } + } + } + }, + "UpdatePersonLastNameResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "boolean", + "default": false + } + } + } + } + } + }, + "GetPeersForTripResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Collection of Person", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + } + } + } + } + } + }, + "parameters": { + "top": { + "name": "$top", + "in": "query", + "description": "Show only the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + }, + "example": 50 + }, + "skip": { + "name": "$skip", + "in": "query", + "description": "Skip the first n items", + "style": "form", + "explode": false, + "schema": { + "minimum": 0, + "type": "number", + "format": "int64" + } + }, + "count": { + "name": "$count", + "in": "query", + "description": "Include count of items", + "style": "form", + "explode": false, + "schema": { + "type": "boolean" + } + }, + "filter": { + "name": "$filter", + "in": "query", + "description": "Filter items by property values", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + }, + "search": { + "name": "$search", + "in": "query", + "description": "Search items by search phrases", + "style": "form", + "explode": false, + "schema": { + "type": "string" + } + } + }, + "examples": { + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.InnerError": { + "value": { + "Date": "0001-01-01T00:00:00.0000000+00:00", + "RequestId": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person": { + "value": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], + "AddressInfo": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + ], + "HomeAddress": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "FavoriteFeature": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + ], + "Photo": "string", + "Friends": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ], + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + ] + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { + "value": { + "AirlineCode": "string (identifier)", + "Name": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { + "value": { + "Name": "string", + "IcaoCode": "string (identifier)", + "IataCode": "string", + "Location": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { + "value": { + "Address": "string", + "City": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { + "value": { + "Name": "string", + "CountryRegion": "string", + "Region": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { + "value": { + "Address": "string", + "City": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + "Loc": "Edm.GeographyPoint", + "EmergencyAuthority": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { + "value": { + "Address": "string", + "City": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" + }, + "BuildingInfo": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { + "value": { + "TripId": 0, + "ShareId": "00000000-0000-0000-0000-000000000000", + "Name": "string", + "Budget": 0, + "Description": "string", + "Tags": [ + "string" + ], + "TripData": { }, + "DestinationInfo": [ + { } + ], + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "PlanItems": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" + } + ] + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { + "value": { + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": { + "value": { + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", + "OccursAt": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" + }, + "Description": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": { + "value": { + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", + "SeatNumber": "string" + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": { + "value": { + "PlanItemId": 0, + "ConfirmationCode": "string", + "StartsAt": "0001-01-01T00:00:00.0000000+00:00", + "EndsAt": "0001-01-01T00:00:00.0000000+00:00", + "Duration": "string", + "SeatNumber": "string", + "FlightNumber": "string", + "Airline": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" + }, + "From": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + }, + "To": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" + } + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { + "value": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], + "AddressInfo": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + ], + "HomeAddress": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "FavoriteFeature": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + ], + "Photo": "string", + "Friends": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ], + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + ], + "Cost": 0, + "Peers": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ] + } + }, + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { + "value": { + "UserName": "string (identifier)", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Gender": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" + }, + "Age": 0, + "Emails": [ + "string" + ], + "AddressInfo": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + } + ], + "HomeAddress": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "FavoriteFeature": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + }, + "Features": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature" + } + ], + "Photo": "string", + "Friends": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ], + "BestFriend": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + }, + "Trips": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" + } + ], + "Budget": 0, + "BossOffice": { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" + }, + "DirectReports": [ + { + "@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" + } + ] + } + } + }, + "requestBodies": { + "refPostBody": { + "description": "New navigation property ref value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceCreate" + } + } + }, + "required": true + }, + "refPutBody": { + "description": "New navigation property ref values", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceUpdate" + } + } + }, + "required": true + }, + "ShareTripRequestBody": { + "description": "Action parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string" + }, + "tripId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + } + } + } + } + }, + "required": true + }, + "GetPeersForTripRequestBody": { + "description": "Action parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string" + }, + "tripId": { + "maximum": 2147483647, + "minimum": -2147483648, + "type": "number", + "format": "int32" + } + } + } + } + }, + "required": true + } + } + }, + "tags": [ + { + "name": "Airlines.Airline", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Airports.Airport", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Airports.AirportLocation", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Airports.Person", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Airports.Person.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Airports", + "x-ms-docs-toc-type": "container" + }, + { + "name": "People", + "x-ms-docs-toc-type": "container" + }, + { + "name": "Me.Person", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Me.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Me.Person.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Me.Trip", + "x-ms-docs-toc-type": "page" + }, + { + "name": "Me.Trips.PlanItem", + "x-ms-docs-toc-type": "page" + }, + { + "name": "NewComePeople.Person", + "x-ms-docs-toc-type": "page" + }, + { + "name": "NewComePeople.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "NewComePeople.Person.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "NewComePeople.Trip", + "x-ms-docs-toc-type": "page" + }, + { + "name": "NewComePeople.Trips.PlanItem", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Person", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Person.Location", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Trip", + "x-ms-docs-toc-type": "page" + }, + { + "name": "People.Trips.PlanItem", + "x-ms-docs-toc-type": "page" + }, + { + "name": "ResetDataSource", + "x-ms-docs-toc-type": "container" + } + ] +} \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml new file mode 100644 index 000000000..84bf69eba --- /dev/null +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml @@ -0,0 +1,23923 @@ +openapi: '3.1.1' +info: + title: OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models + description: This OData service is located at http://services.odata.org/TrippinRESTierService + version: 1.0.1 +servers: + - url: http://services.odata.org/TrippinRESTierService +paths: + /Airlines: + description: Provides operations to manage the collection of Airline entities. + get: + tags: + - Airlines.Airline + summary: Get entities from Airlines + operationId: Airlines.Airline.ListAirline + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Airlines.Airline + summary: Add new entity to Airlines + operationId: Airlines.Airline.CreateAirline + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Airlines/{AirlineCode}': + description: Provides operations to manage the collection of Airline entities. + get: + tags: + - Airlines.Airline + summary: Get entity from Airlines by key + operationId: Airlines.Airline.GetAirline + parameters: + - name: AirlineCode + in: path + description: The unique identifier of Airline + required: true + schema: + type: string + x-ms-docs-key-type: Airline + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + put: + tags: + - Airlines.Airline + summary: Update entity in Airlines + operationId: Airlines.Airline.SetAirline + parameters: + - name: AirlineCode + in: path + description: The unique identifier of Airline + required: true + schema: + type: string + x-ms-docs-key-type: Airline + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Airlines.Airline + summary: Delete entity from Airlines + operationId: Airlines.Airline.DeleteAirline + parameters: + - name: AirlineCode + in: path + description: The unique identifier of Airline + required: true + schema: + type: string + x-ms-docs-key-type: Airline + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + /Airlines/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Airlines.Airline + summary: Get the number of the resource + operationId: Airlines.GetCount-27a7 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /Airports: + description: Provides operations to manage the collection of Airport entities. + get: + tags: + - Airports.Airport + summary: Get entities from Airports + operationId: Airports.Airport.ListAirport + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - Airports.Airport + summary: Add new entity to Airports + operationId: Airports.Airport.CreateAirport + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Airports/{IcaoCode}': + description: Provides operations to manage the collection of Airport entities. + get: + tags: + - Airports.Airport + summary: Get entity from Airports by key + operationId: Airports.Airport.GetAirport + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - Airports.Airport + summary: Update entity in Airports + operationId: Airports.Airport.UpdateAirport + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Airports.Airport + summary: Delete entity from Airports + operationId: Airports.Airport.DeleteAirport + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Airports/{IcaoCode}/Location': + get: + tags: + - Airports.AirportLocation + summary: Get Location property value + operationId: Airports.GetLocation + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' + default: + $ref: '#/components/responses/error' + put: + tags: + - Airports.AirportLocation + summary: Update property Location value. + operationId: Airports.SetLocation + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority': + description: Provides operations to manage the EmergencyAuthority property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation entity. + get: + tags: + - Airports.Person + summary: Get EmergencyAuthority from Airports + description: The person to contact in case of a crisis at this location. + operationId: Airports.GetEmergencyAuthority + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Airports/{IcaoCode}/Location/EmergencyAuthority/$ref': + description: Provides operations to manage the collection of Airport entities. + get: + tags: + - Airports.Person + summary: Get ref of EmergencyAuthority from Airports + description: The person to contact in case of a crisis at this location. + operationId: Airports.GetRefEmergencyAuthority + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + put: + tags: + - Airports.Person + summary: Update the ref of navigation property EmergencyAuthority in Airports + operationId: Airports.UpdateRefEmergencyAuthority + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - Airports.Person + summary: Delete ref of navigation property EmergencyAuthority for Airports + operationId: Airports.DeleteRefEmergencyAuthority + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo': + get: + tags: + - Airports.Person.Location + summary: Get AddressInfo property value + operationId: Airports.EmergencyAuthority.ListAddressInfo + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Airports.Person.Location + summary: Update property AddressInfo value. + operationId: Airports.EmergencyAuthority.UpdateAddressInfo + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - Airports.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Airports.EmergencyAuthority.SetAddressInfo + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Airports.Person.Location + summary: Get the number of the resource + operationId: Airports.EmergencyAuthority.AddressInfo.GetCount-2ffe + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Airports.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Airports.EmergencyAuthority.ListAddressInfo.AsEventLocation-fbf9 + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Airports.EmergencyAuthority.AddressInfo.GetCount.AsEventLocation-e708 + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/HomeAddress': + get: + tags: + - Airports.Person.Location + summary: Get HomeAddress property value + operationId: Airports.EmergencyAuthority.GetHomeAddress + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + patch: + tags: + - Airports.Person.Location + summary: Update property HomeAddress value. + operationId: Airports.EmergencyAuthority.UpdateHomeAddress + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Airports.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Airports.EmergencyAuthority.GetHomeAddress.AsEventLocation-0bb9 + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/Airports/{IcaoCode}/Location/EmergencyAuthority/Photo': + description: Provides operations to manage the media for the Airport entity. + get: + tags: + - Airports.Person + summary: Get Photo for the navigation property EmergencyAuthority from Airports + operationId: Airports.GetEmergencyAuthorityPhoto-13fb + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + put: + tags: + - Airports.Person + summary: Update Photo for the navigation property EmergencyAuthority in Airports + operationId: Airports.UpdateEmergencyAuthorityPhoto-13fb + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + delete: + tags: + - Airports.Person + summary: Delete Photo for the navigation property EmergencyAuthority in Airports + operationId: Airports.DeleteEmergencyAuthorityPhoto-13fb + parameters: + - name: IcaoCode + in: path + description: The unique identifier of Airport + required: true + schema: + type: string + x-ms-docs-key-type: Airport + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + /Airports/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Airports.Airport + summary: Get the number of the resource + operationId: Airports.GetCount-60cc + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/GetNearestAirport(lat={lat},lon={lon})': + description: Provides operations to call the GetNearestAirport method. + get: + tags: + - Airports + summary: Invoke functionImport GetNearestAirport + operationId: FunctionImport.GetNearestAirport + parameters: + - name: lat + in: path + required: true + schema: + oneOf: + - type: + - 'null' + - number + format: double + - type: + - 'null' + - string + - $ref: '#/components/schemas/ReferenceNumeric' + - name: lon + in: path + required: true + schema: + oneOf: + - type: + - 'null' + - number + format: double + - type: + - 'null' + - string + - $ref: '#/components/schemas/ReferenceNumeric' + responses: + '200': + description: Success + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + - type: + - 'null' + - object + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: functionImport + /GetPersonWithMostFriends(): + description: Provides operations to call the GetPersonWithMostFriends method. + get: + tags: + - People + summary: Invoke functionImport GetPersonWithMostFriends + description: The person with most friends. + operationId: FunctionImport.GetPersonWithMostFriends + responses: + '200': + description: Success + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - object + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: functionImport + /Me: + description: Provides operations to manage the Person singleton. + get: + tags: + - Me.Person + summary: Get signed in person + description: Retrieve the properties and relationships of Person object. + operationId: Me.Person.GetPerson + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Person + summary: Update Me + operationId: Me.Person.UpdatePerson + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/AddressInfo: + get: + tags: + - Me.Location + summary: Get AddressInfo property value + operationId: Me.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property AddressInfo value. + operationId: Me.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Location + summary: Sets a new value for the collection of Location. + operationId: Me.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Location + summary: Get the number of the resource + operationId: Me.AddressInfo.GetCount-38f2 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.ListAddressInfo.AsEventLocation-b1a4 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.AddressInfo.GetCount.AsEventLocation-5575 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend: + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get BestFriend from Me + description: The best friend. + operationId: Me.GetBestFriend + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.UpdateBestFriend + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend + /Me/BestFriend/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of BestFriend from Me + description: The best friend. + operationId: Me.GetRefBestFriend + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + put: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.UpdateRefBestFriend + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property BestFriend for Me + operationId: Me.DeleteRefBestFriend + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/BestFriend/AddressInfo: + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.BestFriend.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.BestFriend.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.BestFriend.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.BestFriend.AddressInfo.GetCount-b695 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-2154 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-0105 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/HomeAddress: + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.BestFriend.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.BestFriend.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-a28d + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: Me.GetBestFriend.AsEmployee-dcf6 + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: Me.GetBestFriend.AsManager-09a9 + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/BestFriend/Photo: + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property BestFriend from Me + operationId: Me.GetBestFriendPhoto-8333 + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property BestFriend in Me + operationId: Me.UpdateBestFriendPhoto-8333 + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property BestFriend in Me + operationId: Me.DeleteBestFriendPhoto-8333 + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends: + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get Friends from Me + description: Friends of person + operationId: Me.ListFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends + '/Me/Friends/{UserName}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Friends/{UserName}/AddressInfo': + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.Friends.AddressInfo.GetCount-246e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-f440 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-42c7 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/HomeAddress': + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-15cc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: Me.GetFriends.AsEmployee-3dc7 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: Me.GetFriends.AsManager-ddec + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Friends/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property Friends from Me + operationId: Me.GetFriendsPhoto-287d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property Friends in Me + operationId: Me.UpdateFriendsPhoto-287d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property Friends in Me + operationId: Me.DeleteFriendsPhoto-287d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.Friends.GetCount-182b + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of Friends from Me + description: Friends of person + operationId: Me.ListRefFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Person + summary: Create new navigation property ref to Friends for Me + operationId: Me.CreateRefFriends + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.DeleteRefFriends + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: Me.ListFriends.AsEmployee-f4a5 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.Friends.GetCount.AsEmployee-884b + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: Me.ListFriends.AsManager-98ae + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.Friends.GetCount.AsManager-9376 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/HomeAddress: + get: + tags: + - Me.Location + summary: Get HomeAddress property value + operationId: Me.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property HomeAddress value. + operationId: Me.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.GetHomeAddress.AsEventLocation-ba49 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: Me.Person.GetPerson.AsEmployee-bd18 + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo: + get: + tags: + - Me.Location + summary: Get AddressInfo property value + operationId: Me.AsEmployee.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property AddressInfo value. + operationId: Me.AsEmployee.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsEmployee.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Location + summary: Get the number of the resource + operationId: Me.AsEmployee.AddressInfo.GetCount-8488 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.ListAddressInfo.AsEventLocation-989f + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.AddressInfo.GetCount.AsEventLocation-9375 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend: + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get BestFriend from Me + description: The best friend. + operationId: Me.AsEmployee.GetBestFriend + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.AsEmployee.UpdateBestFriend + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/BestFriend + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of BestFriend from Me + description: The best friend. + operationId: Me.AsEmployee.GetRefBestFriend + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + put: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.AsEmployee.UpdateRefBestFriend + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property BestFriend for Me + operationId: Me.AsEmployee.DeleteRefBestFriend + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo: + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsEmployee.BestFriend.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsEmployee.BestFriend.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsEmployee.BestFriend.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-1d72 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress: + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsEmployee.BestFriend.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsEmployee.BestFriend.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-19b8 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: Me.GetBestFriend.AsManager-c104 + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Photo: + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property BestFriend from Me + operationId: Me.GetBestFriendPhoto-4dc7 + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property BestFriend in Me + operationId: Me.UpdateBestFriendPhoto-4dc7 + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property BestFriend in Me + operationId: Me.DeleteBestFriendPhoto-4dc7 + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends: + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get Friends from Me + description: Friends of person + operationId: Me.AsEmployee.ListFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Friends + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.AsEmployee.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo': + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsEmployee.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsEmployee.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsEmployee.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsEmployee.Friends.AddressInfo.GetCount-660e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-7b1e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-feb8 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/HomeAddress': + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsEmployee.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsEmployee.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-600f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: Me.GetFriends.AsManager-aa0c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property Friends from Me + operationId: Me.GetFriendsPhoto-6e41 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property Friends in Me + operationId: Me.UpdateFriendsPhoto-6e41 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property Friends in Me + operationId: Me.DeleteFriendsPhoto-6e41 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.AsEmployee.Friends.GetCount-0cb7 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of Friends from Me + description: Friends of person + operationId: Me.AsEmployee.ListRefFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Person + summary: Create new navigation property ref to Friends for Me + operationId: Me.AsEmployee.CreateRefFriends + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.AsEmployee.DeleteRefFriends + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: Me.ListFriends.AsManager-f993 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.Friends.GetCount.AsManager-85ff + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress: + get: + tags: + - Me.Location + summary: Get HomeAddress property value + operationId: Me.AsEmployee.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property HomeAddress value. + operationId: Me.AsEmployee.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.GetHomeAddress.AsEventLocation-6fc5 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers: + description: Provides operations to manage the Peers property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee entity. + get: + tags: + - Me.Person + summary: Get Peers from Me + operationId: Me.AsEmployee.ListPeers + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Peers for Me + operationId: Me.AsEmployee.peers.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo': + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsEmployee.Peers.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsEmployee.Peers.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsEmployee.Peers.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsEmployee.Peers.AddressInfo.GetCount-3e91 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Peers.ListAddressInfo.AsEventLocation-1e59 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.Peers.AddressInfo.GetCount.AsEventLocation-be1d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/HomeAddress': + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsEmployee.Peers.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsEmployee.Peers.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Peers.GetHomeAddress.AsEventLocation-dc11 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property Peers from Me + operationId: Me.GetPeersPhoto-4c48 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property Peers in Me + operationId: Me.UpdatePeersPhoto-4c48 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property Peers in Me + operationId: Me.DeletePeersPhoto-4c48 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.AsEmployee.Peers.GetCount-9fc2 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of Peers from Me + operationId: Me.AsEmployee.ListRefPeers + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Person + summary: Create new navigation property ref to Peers for Me + operationId: Me.AsEmployee.CreateRefPeers + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Peers for Me + operationId: Me.AsEmployee.DeleteRefPeers + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips: + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: Me.AsEmployee.ListTrips + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: Me.AsEmployee.CreateTrips + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips + - /Me/Trips + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: Me.AsEmployee.GetTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: Me.AsEmployee.UpdateTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: Me.AsEmployee.DeleteTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}' + - '/Me/Trips/{TripId}' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - Me.Trip + summary: Invoke function GetInvolvedPeople + operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - Me.Trips.PlanItem + summary: Get PlanItems from Me + operationId: Me.AsEmployee.Trips.ListPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems' + - '/Me/Trips/{TripId}/PlanItems' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.AsEmployee.Trips.planItems.DeleteRefPlanItem + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trips.PlanItem + summary: Get the number of the resource + operationId: Me.AsEmployee.Trips.PlanItems.GetCount-a822 + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Trips.PlanItem + summary: Get ref of PlanItems from Me + operationId: Me.AsEmployee.Trips.ListRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for Me + operationId: Me.AsEmployee.Trips.CreateRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.AsEmployee.Trips.DeleteRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trip + summary: Get the number of the resource + operationId: Me.AsEmployee.Trips.GetCount-5aa2 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline(): + description: Provides operations to call the GetFavoriteAirline method. + get: + tags: + - Me.Person + summary: Invoke function GetFavoriteAirline + operationId: Me.GetFavoriteAirline + responses: + '200': + $ref: '#/components/responses/GetFavoriteAirlineResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': + description: Provides operations to call the GetFriendsTrips method. + get: + tags: + - Me.Person + summary: Invoke function GetFriendsTrips + operationId: Me.GetFriendsTrips + parameters: + - name: userName + in: path + description: 'Usage: userName=''{userName}''' + required: true + schema: + type: string + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/GetFriendsTripsResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip: + description: Provides operations to call the GetPeersForTrip method. + post: + tags: + - Me.Person + summary: Invoke action GetPeersForTrip + operationId: Me.GetPeersForTrip + requestBody: + $ref: '#/components/requestBodies/GetPeersForTripRequestBody' + responses: + '200': + $ref: '#/components/responses/GetPeersForTripResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: action + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: Me.Person.GetPerson.AsManager-16dc + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo: + get: + tags: + - Me.Location + summary: Get AddressInfo property value + operationId: Me.AsManager.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property AddressInfo value. + operationId: Me.AsManager.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsManager.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Location + summary: Get the number of the resource + operationId: Me.AsManager.AddressInfo.GetCount-75da + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.ListAddressInfo.AsEventLocation-55be + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.AddressInfo.GetCount.AsEventLocation-f67e + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend: + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get BestFriend from Me + description: The best friend. + operationId: Me.AsManager.GetBestFriend + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.AsManager.UpdateBestFriend + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/BestFriend + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of BestFriend from Me + description: The best friend. + operationId: Me.AsManager.GetRefBestFriend + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + put: + tags: + - Me.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: Me.AsManager.UpdateRefBestFriend + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property BestFriend for Me + operationId: Me.AsManager.DeleteRefBestFriend + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo: + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsManager.BestFriend.ListAddressInfo + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsManager.BestFriend.UpdateAddressInfo + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsManager.BestFriend.SetAddressInfo + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.ListAddressInfo.AsEventLocation-987a + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count: + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress: + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsManager.BestFriend.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsManager.BestFriend.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.BestFriend.GetHomeAddress.AsEventLocation-15c5 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: Me.GetBestFriend.AsEmployee-7bbe + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Photo: + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property BestFriend from Me + operationId: Me.GetBestFriendPhoto-bac8 + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property BestFriend in Me + operationId: Me.UpdateBestFriendPhoto-bac8 + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property BestFriend in Me + operationId: Me.DeleteBestFriendPhoto-bac8 + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports: + description: Provides operations to manage the DirectReports property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager entity. + get: + tags: + - Me.Person + summary: Get DirectReports from Me + operationId: Me.AsManager.ListDirectReports + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Person + summary: Delete ref of navigation property DirectReports for Me + operationId: Me.AsManager.directReports.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo': + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsManager.DirectReports.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsManager.DirectReports.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsManager.DirectReports.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsManager.DirectReports.AddressInfo.GetCount-f650 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.DirectReports.ListAddressInfo.AsEventLocation-660b + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.DirectReports.AddressInfo.GetCount.AsEventLocation-a070 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/HomeAddress': + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsManager.DirectReports.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsManager.DirectReports.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.DirectReports.GetHomeAddress.AsEventLocation-5e6e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property DirectReports from Me + operationId: Me.GetDirectReportsPhoto-e60c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property DirectReports in Me + operationId: Me.UpdateDirectReportsPhoto-e60c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property DirectReports in Me + operationId: Me.DeleteDirectReportsPhoto-e60c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.AsManager.DirectReports.GetCount-8b92 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of DirectReports from Me + operationId: Me.AsManager.ListRefDirectReports + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Person + summary: Create new navigation property ref to DirectReports for Me + operationId: Me.AsManager.CreateRefDirectReports + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property DirectReports for Me + operationId: Me.AsManager.DeleteRefDirectReports + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends: + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Person + summary: Get Friends from Me + description: Friends of person + operationId: Me.AsManager.ListFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Friends + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.AsManager.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo': + get: + tags: + - Me.Person.Location + summary: Get AddressInfo property value + operationId: Me.AsManager.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property AddressInfo value. + operationId: Me.AsManager.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + post: + tags: + - Me.Person.Location + summary: Sets a new value for the collection of Location. + operationId: Me.AsManager.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person.Location + summary: Get the number of the resource + operationId: Me.AsManager.Friends.AddressInfo.GetCount-b7db + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.ListAddressInfo.AsEventLocation-1ad9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-4d69 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/HomeAddress': + get: + tags: + - Me.Person.Location + summary: Get HomeAddress property value + operationId: Me.AsManager.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Person.Location + summary: Update property HomeAddress value. + operationId: Me.AsManager.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.Friends.GetHomeAddress.AsEventLocation-1e07 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: Me.GetFriends.AsEmployee-5b5f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for the navigation property Friends from Me + operationId: Me.GetFriendsPhoto-64bd + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for the navigation property Friends in Me + operationId: Me.UpdateFriendsPhoto-64bd + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for the navigation property Friends in Me + operationId: Me.DeleteFriendsPhoto-64bd + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.AsManager.Friends.GetCount-60a7 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$ref: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Person + summary: Get ref of Friends from Me + description: Friends of person + operationId: Me.AsManager.ListRefFriends + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Person + summary: Create new navigation property ref to Friends for Me + operationId: Me.AsManager.CreateRefFriends + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Person + summary: Delete ref of navigation property Friends for Me + operationId: Me.AsManager.DeleteRefFriends + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - Me.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: Me.ListFriends.AsEmployee-fe32 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Person + summary: Get the number of the resource + operationId: Me.Friends.GetCount.AsEmployee-6a35 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress: + get: + tags: + - Me.Location + summary: Get HomeAddress property value + operationId: Me.AsManager.GetHomeAddress + parameters: + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + patch: + tags: + - Me.Location + summary: Update property HomeAddress value. + operationId: Me.AsManager.UpdateHomeAddress + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + description: Casts the previous resource to EventLocation. + get: + tags: + - Me.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: Me.GetHomeAddress.AsEventLocation-5d95 + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire: + description: Provides operations to call the Hire method. + post: + tags: + - Me.Person + summary: Invoke action Hire + description: Hires someone for the company. + operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire + requestBody: + description: Action parameters + content: + application/json: + schema: + type: object + properties: + hire: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - object + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: action + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips: + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: Me.AsManager.ListTrips + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: Me.AsManager.CreateTrips + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips + - /Me/Trips + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: Me.AsManager.GetTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: Me.AsManager.UpdateTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: Me.AsManager.DeleteTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}' + - '/Me/Trips/{TripId}' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - Me.Trip + summary: Invoke function GetInvolvedPeople + operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - Me.Trips.PlanItem + summary: Get PlanItems from Me + operationId: Me.AsManager.Trips.ListPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems' + - '/Me/Trips/{TripId}/PlanItems' + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.AsManager.Trips.planItems.DeleteRefPlanItem + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trips.PlanItem + summary: Get the number of the resource + operationId: Me.AsManager.Trips.PlanItems.GetCount-5ad2 + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Trips.PlanItem + summary: Get ref of PlanItems from Me + operationId: Me.AsManager.Trips.ListRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for Me + operationId: Me.AsManager.Trips.CreateRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.AsManager.Trips.DeleteRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trip + summary: Get the number of the resource + operationId: Me.AsManager.Trips.GetCount-f3f4 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip: + description: Provides operations to call the ShareTrip method. + post: + tags: + - Me.Person + summary: Invoke action ShareTrip + description: Details of the shared trip. + operationId: Me.ShareTrip + requestBody: + $ref: '#/components/requestBodies/ShareTripRequestBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: action + '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': + description: Provides operations to call the UpdatePersonLastName method. + get: + tags: + - Me.Person + summary: Invoke function UpdatePersonLastName + operationId: Me.UpdatePersonLastName + parameters: + - name: lastName + in: path + description: 'Usage: lastName=''{lastName}''' + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/UpdatePersonLastNameResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + /Me/Photo: + description: Provides operations to manage the media for the Person entity. + get: + tags: + - Me.Person + summary: Get Photo for Person from Me + operationId: Me.Person.GetPhoto-ab7e + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + put: + tags: + - Me.Person + summary: Update Photo for Person in Me + operationId: Me.Person.UpdatePhoto-ab7e + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + delete: + tags: + - Me.Person + summary: Delete Photo for Person in Me + operationId: Me.Person.DeletePhoto-ab7e + parameters: + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /Me/Trips: + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: Me.ListTrips + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: Me.CreateTrips + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips + - /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips + '/Me/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - Me.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: Me.GetTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + patch: + tags: + - Me.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: Me.UpdateTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: Me.DeleteTrips + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}' + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}' + '/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - Me.Trip + summary: Invoke function GetInvolvedPeople + operationId: Me.Trips.Trip.GetInvolvedPeople + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/Me/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - Me.Trips.PlanItem + summary: Get PlanItems from Me + operationId: Me.Trips.ListPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems' + - '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems' + '/Me/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.Trips.planItems.DeleteRefPlanItem + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + '/Me/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trips.PlanItem + summary: Get the number of the resource + operationId: Me.Trips.PlanItems.GetCount-c250 + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + '/Me/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - Me.Trips.PlanItem + summary: Get ref of PlanItems from Me + operationId: Me.Trips.ListRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + post: + tags: + - Me.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for Me + operationId: Me.Trips.CreateRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + delete: + tags: + - Me.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for Me + operationId: Me.Trips.DeleteRefPlanItems + parameters: + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + x-ms-docs-operation-type: operation + /Me/Trips/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - Me.Trip + summary: Get the number of the resource + operationId: Me.Trips.GetCount-7b69 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/me + description: The Me API is deprecated and will stop returning data on March 2023. Please use the new me2 API. + /NewComePeople: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - NewComePeople.Person + summary: Get entities from NewComePeople + operationId: NewComePeople.Person.ListPerson + parameters: + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + post: + tags: + - NewComePeople.Person + summary: Add new entity to NewComePeople + operationId: NewComePeople.Person.CreatePerson + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - NewComePeople.Person + summary: Get entity from NewComePeople by key + operationId: NewComePeople.Person.GetPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - NewComePeople.Person + summary: Update entity in NewComePeople + operationId: NewComePeople.Person.UpdatePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - NewComePeople.Person + summary: Delete entity from NewComePeople + operationId: NewComePeople.Person.DeletePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/AddressInfo': + get: + tags: + - NewComePeople.Location + summary: Get AddressInfo property value + operationId: NewComePeople.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - NewComePeople.Location + summary: Update property AddressInfo value. + operationId: NewComePeople.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - NewComePeople.Location + summary: Sets a new value for the collection of Location. + operationId: NewComePeople.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Location + summary: Get the number of the resource + operationId: NewComePeople.AddressInfo.GetCount-29d6 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.ListAddressInfo.AsEventLocation-d026 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: NewComePeople.AddressInfo.GetCount.AsEventLocation-29d3 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/BestFriend': + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - NewComePeople.Person + summary: Get BestFriend from NewComePeople + description: The best friend. + operationId: NewComePeople.GetBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + x-ms-docs-operation-type: operation + patch: + tags: + - NewComePeople.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: NewComePeople.UpdateBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/BestFriend/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - NewComePeople.Person + summary: Get ref of BestFriend from NewComePeople + description: The best friend. + operationId: NewComePeople.GetRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + x-ms-docs-operation-type: operation + put: + tags: + - NewComePeople.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: NewComePeople.UpdateRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + x-ms-docs-operation-type: operation + delete: + tags: + - NewComePeople.Person + summary: Delete ref of navigation property BestFriend for NewComePeople + operationId: NewComePeople.DeleteRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/BestFriend/AddressInfo': + get: + tags: + - NewComePeople.Person.Location + summary: Get AddressInfo property value + operationId: NewComePeople.BestFriend.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + patch: + tags: + - NewComePeople.Person.Location + summary: Update property AddressInfo value. + operationId: NewComePeople.BestFriend.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + post: + tags: + - NewComePeople.Person.Location + summary: Sets a new value for the collection of Location. + operationId: NewComePeople.BestFriend.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person.Location + summary: Get the number of the resource + operationId: NewComePeople.BestFriend.AddressInfo.GetCount-513c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.BestFriend.ListAddressInfo.AsEventLocation-73fa + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: NewComePeople.BestFriend.AddressInfo.GetCount.AsEventLocation-ba36 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/HomeAddress': + get: + tags: + - NewComePeople.Person.Location + summary: Get HomeAddress property value + operationId: NewComePeople.BestFriend.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + patch: + tags: + - NewComePeople.Person.Location + summary: Update property HomeAddress value. + operationId: NewComePeople.BestFriend.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.BestFriend.GetHomeAddress.AsEventLocation-8ebe + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - NewComePeople.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: NewComePeople.GetBestFriend.AsEmployee-7b75 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - NewComePeople.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: NewComePeople.GetBestFriend.AsManager-61ce + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/BestFriend/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - NewComePeople.Person + summary: Get Photo for the navigation property BestFriend from NewComePeople + operationId: NewComePeople.GetBestFriendPhoto-4f67 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + put: + tags: + - NewComePeople.Person + summary: Update Photo for the navigation property BestFriend in NewComePeople + operationId: NewComePeople.UpdateBestFriendPhoto-4f67 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + delete: + tags: + - NewComePeople.Person + summary: Delete Photo for the navigation property BestFriend in NewComePeople + operationId: NewComePeople.DeleteBestFriendPhoto-4f67 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/bestfriend + description: The bestfriend API is deprecated and will stop returning data on March 2023. Please use the new friends API. + '/NewComePeople/{UserName}/Friends': + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - NewComePeople.Person + summary: Get Friends from NewComePeople + description: Friends of person + operationId: NewComePeople.ListFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Friends/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - NewComePeople.Person + summary: Delete ref of navigation property Friends for NewComePeople + operationId: NewComePeople.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo': + get: + tags: + - NewComePeople.Person.Location + summary: Get AddressInfo property value + operationId: NewComePeople.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + patch: + tags: + - NewComePeople.Person.Location + summary: Update property AddressInfo value. + operationId: NewComePeople.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + post: + tags: + - NewComePeople.Person.Location + summary: Sets a new value for the collection of Location. + operationId: NewComePeople.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person.Location + summary: Get the number of the resource + operationId: NewComePeople.Friends.AddressInfo.GetCount-9334 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.Friends.ListAddressInfo.AsEventLocation-eeb4 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: NewComePeople.Friends.AddressInfo.GetCount.AsEventLocation-be92 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/HomeAddress': + get: + tags: + - NewComePeople.Person.Location + summary: Get HomeAddress property value + operationId: NewComePeople.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + patch: + tags: + - NewComePeople.Person.Location + summary: Update property HomeAddress value. + operationId: NewComePeople.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.Friends.GetHomeAddress.AsEventLocation-f4d9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - NewComePeople.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: NewComePeople.GetFriends.AsEmployee-2969 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - NewComePeople.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: NewComePeople.GetFriends.AsManager-708f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - NewComePeople.Person + summary: Get Photo for the navigation property Friends from NewComePeople + operationId: NewComePeople.GetFriendsPhoto-e9fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + put: + tags: + - NewComePeople.Person + summary: Update Photo for the navigation property Friends in NewComePeople + operationId: NewComePeople.UpdateFriendsPhoto-e9fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + delete: + tags: + - NewComePeople.Person + summary: Delete Photo for the navigation property Friends in NewComePeople + operationId: NewComePeople.DeleteFriendsPhoto-e9fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person + summary: Get the number of the resource + operationId: NewComePeople.Friends.GetCount-2ec1 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - NewComePeople.Person + summary: Get ref of Friends from NewComePeople + description: Friends of person + operationId: NewComePeople.ListRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - NewComePeople.Person + summary: Create new navigation property ref to Friends for NewComePeople + operationId: NewComePeople.CreateRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - NewComePeople.Person + summary: Delete ref of navigation property Friends for NewComePeople + operationId: NewComePeople.DeleteRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - NewComePeople.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: NewComePeople.ListFriends.AsEmployee-2969 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person + summary: Get the number of the resource + operationId: NewComePeople.Friends.GetCount.AsEmployee-4069 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - NewComePeople.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: NewComePeople.ListFriends.AsManager-708f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person + summary: Get the number of the resource + operationId: NewComePeople.Friends.GetCount.AsManager-d1d3 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/HomeAddress': + get: + tags: + - NewComePeople.Location + summary: Get HomeAddress property value + operationId: NewComePeople.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + patch: + tags: + - NewComePeople.Location + summary: Update property HomeAddress value. + operationId: NewComePeople.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - NewComePeople.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: NewComePeople.GetHomeAddress.AsEventLocation-3fd9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()': + description: Provides operations to call the GetFavoriteAirline method. + get: + tags: + - NewComePeople.Person + summary: Invoke function GetFavoriteAirline + operationId: NewComePeople.Person.GetFavoriteAirline + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + $ref: '#/components/responses/GetFavoriteAirlineResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: function + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': + description: Provides operations to call the GetFriendsTrips method. + get: + tags: + - NewComePeople.Person + summary: Invoke function GetFriendsTrips + operationId: NewComePeople.Person.GetFriendsTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: userName + in: path + description: 'Usage: userName=''{userName}''' + required: true + schema: + type: string + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/GetFriendsTripsResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/trips + description: The GetFriendsTrips API is deprecated and will stop returning data on March 2023. Please use the new trips API on friends. + x-ms-docs-operation-type: function + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip': + description: Provides operations to call the GetPeersForTrip method. + post: + tags: + - NewComePeople.Person + summary: Invoke action GetPeersForTrip + operationId: NewComePeople.Person.GetPeersForTrip + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/GetPeersForTripRequestBody' + responses: + '200': + $ref: '#/components/responses/GetPeersForTripResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: action + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire': + description: Provides operations to call the Hire method. + post: + tags: + - NewComePeople.Person + summary: Invoke action Hire + description: Hires someone for the company. + operationId: NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: Action parameters + content: + application/json: + schema: + type: object + properties: + hire: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - object + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: action + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip': + description: Provides operations to call the ShareTrip method. + post: + tags: + - NewComePeople.Person + summary: Invoke action ShareTrip + description: Details of the shared trip. + operationId: NewComePeople.Person.ShareTrip + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/ShareTripRequestBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: action + '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': + description: Provides operations to call the UpdatePersonLastName method. + get: + tags: + - NewComePeople.Person + summary: Invoke function UpdatePersonLastName + operationId: NewComePeople.Person.UpdatePersonLastName + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: lastName + in: path + description: 'Usage: lastName=''{lastName}''' + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/UpdatePersonLastNameResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: function + '/NewComePeople/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - NewComePeople.Person + summary: Get Photo for Person from NewComePeople + operationId: NewComePeople.Person.GetPhoto-74be + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + put: + tags: + - NewComePeople.Person + summary: Update Photo for Person in NewComePeople + operationId: NewComePeople.Person.UpdatePhoto-74be + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + delete: + tags: + - NewComePeople.Person + summary: Delete Photo for Person in NewComePeople + operationId: NewComePeople.Person.DeletePhoto-74be + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Trips': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - NewComePeople.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: NewComePeople.ListTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - NewComePeople.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: NewComePeople.CreateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - NewComePeople.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: NewComePeople.GetTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + patch: + tags: + - NewComePeople.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: NewComePeople.UpdateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - NewComePeople.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: NewComePeople.DeleteTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - NewComePeople.Trip + summary: Invoke function GetInvolvedPeople + operationId: NewComePeople.Person.Trips.Trip.GetInvolvedPeople + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: function + '/NewComePeople/{UserName}/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - NewComePeople.Trips.PlanItem + summary: Get PlanItems from NewComePeople + operationId: NewComePeople.Trips.ListPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - NewComePeople.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for NewComePeople + operationId: NewComePeople.Trips.planItems.DeleteRefPlanItem + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Trips.PlanItem + summary: Get the number of the resource + operationId: NewComePeople.Trips.PlanItems.GetCount-841f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + '/NewComePeople/{UserName}/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - NewComePeople.Trips.PlanItem + summary: Get ref of PlanItems from NewComePeople + operationId: NewComePeople.Trips.ListRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + post: + tags: + - NewComePeople.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for NewComePeople + operationId: NewComePeople.Trips.CreateRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - NewComePeople.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for NewComePeople + operationId: NewComePeople.Trips.DeleteRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/NewComePeople/{UserName}/Trips/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Trip + summary: Get the number of the resource + operationId: NewComePeople.Trips.GetCount-d155 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /NewComePeople/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - NewComePeople.Person + summary: Get the number of the resource + operationId: NewComePeople.GetCount-55d5 + parameters: + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + /People: + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get entities from People + operationId: People.Person.ListPerson + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person + summary: Add new entity to People + operationId: People.Person.CreatePerson + requestBody: + description: New entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '201': + description: Created entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get entity from People by key + operationId: People.Person.GetPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved entity + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Person + summary: Update entity in People + operationId: People.Person.UpdatePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete entity from People + operationId: People.Person.DeletePerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/AddressInfo': + get: + tags: + - People.Location + summary: Get AddressInfo property value + operationId: People.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property AddressInfo value. + operationId: People.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Location + summary: Sets a new value for the collection of Location. + operationId: People.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Location + summary: Get the number of the resource + operationId: People.AddressInfo.GetCount-ed5a + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.ListAddressInfo.AsEventLocation-e5b8 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.AddressInfo.GetCount.AsEventLocation-4abd + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend': + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: Get BestFriend from People + description: The best friend. + operationId: People.GetBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.UpdateBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend' + '/People/{UserName}/BestFriend/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of BestFriend from People + description: The best friend. + operationId: People.GetRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + put: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.UpdateRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property BestFriend for People + operationId: People.DeleteRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/BestFriend/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.BestFriend.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.BestFriend.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.BestFriend.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.BestFriend.AddressInfo.GetCount-16df + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-c332 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-fe88 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.BestFriend.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.BestFriend.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-53c4 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: People.GetBestFriend.AsEmployee-7188 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get best friend + description: Get the item of type Person cast as Manager + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-get-friend-manager?view=graph-rest-1.0 + operationId: People.GetBestFriend.AsManager-5f08 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/BestFriend/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property BestFriend from People + operationId: People.GetBestFriendPhoto-c3ac + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property BestFriend in People + operationId: People.UpdateBestFriendPhoto-c3ac + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property BestFriend in People + operationId: People.DeleteBestFriendPhoto-c3ac + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends': + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: List friends + description: List the friends of a specific person + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0 + operationId: People.ListFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends' + '/People/{UserName}/Friends/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Person + summary: Delete a friend. + description: Delete an instance of a friend relationship. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0 + operationId: People.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Friends/{UserName1}/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.Friends.AddressInfo.GetCount-bdaf + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-a5f6 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-2795 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-da5e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: People.GetFriends.AsEmployee-11bf + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: People.GetFriends.AsManager-1cfb + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property Friends from People + operationId: People.GetFriendsPhoto-12fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property Friends in People + operationId: People.UpdateFriendsPhoto-12fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property Friends in People + operationId: People.DeleteFriendsPhoto-12fc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Friends.GetCount-92b9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: List friends + description: List the friends of a specific person + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0 + operationId: People.ListRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Person + summary: Create a friend. + description: Create a new friend. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-post-friend?view=graph-rest-1.0 + operationId: People.CreateRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete a friend. + description: Delete an instance of a friend relationship. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0 + operationId: People.DeleteRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.ListFriends.AsEmployee-11bf + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Friends.GetCount.AsEmployee-a96c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.ListFriends.AsManager-1cfb + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Friends.GetCount.AsManager-26b3 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/HomeAddress': + get: + tags: + - People.Location + summary: Get home address + description: Get the home address of a specific person + operationId: People.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property HomeAddress value. + operationId: People.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.GetHomeAddress.AsEventLocation-d0cf + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: People.Person.GetPerson.AsEmployee-317b + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo': + get: + tags: + - People.Location + summary: Get AddressInfo property value + operationId: People.AsEmployee.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property AddressInfo value. + operationId: People.AsEmployee.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsEmployee.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Location + summary: Get the number of the resource + operationId: People.AsEmployee.AddressInfo.GetCount-3d43 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.ListAddressInfo.AsEventLocation-1342 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.AddressInfo.GetCount.AsEventLocation-ac7d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend': + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: Get BestFriend from People + description: The best friend. + operationId: People.AsEmployee.GetBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.AsEmployee.UpdateBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/BestFriend' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of BestFriend from People + description: The best friend. + operationId: People.AsEmployee.GetRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + put: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.AsEmployee.UpdateRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property BestFriend for People + operationId: People.AsEmployee.DeleteRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsEmployee.BestFriend.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsEmployee.BestFriend.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsEmployee.BestFriend.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsEmployee.BestFriend.AddressInfo.GetCount-cb8a + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-7cd9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-0343 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsEmployee.BestFriend.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsEmployee.BestFriend.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-7db9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: People.GetBestFriend.AsManager-7b70 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property BestFriend from People + operationId: People.GetBestFriendPhoto-a839 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property BestFriend in People + operationId: People.UpdateBestFriendPhoto-a839 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property BestFriend in People + operationId: People.DeleteBestFriendPhoto-a839 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends': + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: Get Friends from People + description: Friends of person + operationId: People.AsEmployee.ListFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Friends' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Person + summary: Delete ref of navigation property Friends for People + operationId: People.AsEmployee.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsEmployee.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsEmployee.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsEmployee.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsEmployee.Friends.AddressInfo.GetCount-1e8b + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-d49e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-1f2b + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsEmployee.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsEmployee.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-d77d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: People.GetFriends.AsManager-3e3c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property Friends from People + operationId: People.GetFriendsPhoto-1a66 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property Friends in People + operationId: People.UpdateFriendsPhoto-1a66 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property Friends in People + operationId: People.DeleteFriendsPhoto-1a66 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.AsEmployee.Friends.GetCount-4db4 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of Friends from People + description: Friends of person + operationId: People.AsEmployee.ListRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Person + summary: Create new navigation property ref to Friends for People + operationId: People.AsEmployee.CreateRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property Friends for People + operationId: People.AsEmployee.DeleteRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.ListFriends.AsManager-3e3c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Friends.GetCount.AsManager-b145 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress': + get: + tags: + - People.Location + summary: Get HomeAddress property value + operationId: People.AsEmployee.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property HomeAddress value. + operationId: People.AsEmployee.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.GetHomeAddress.AsEventLocation-90e5 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers': + description: Provides operations to manage the Peers property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee entity. + get: + tags: + - People.Person + summary: Get Peers from People + operationId: People.AsEmployee.ListPeers + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Person + summary: Delete ref of navigation property Peers for People + operationId: People.AsEmployee.peers.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsEmployee.Peers.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsEmployee.Peers.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsEmployee.Peers.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsEmployee.Peers.AddressInfo.GetCount-755d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Peers.ListAddressInfo.AsEventLocation-b918 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.Peers.AddressInfo.GetCount.AsEventLocation-ef5e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsEmployee.Peers.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsEmployee.Peers.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Peers.GetHomeAddress.AsEventLocation-311b + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property Peers from People + operationId: People.GetPeersPhoto-ecda + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property Peers in People + operationId: People.UpdatePeersPhoto-ecda + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property Peers in People + operationId: People.DeletePeersPhoto-ecda + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.AsEmployee.Peers.GetCount-44d2 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Peers/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of Peers from People + operationId: People.AsEmployee.ListRefPeers + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Person + summary: Create new navigation property ref to Peers for People + operationId: People.AsEmployee.CreateRefPeers + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property Peers for People + operationId: People.AsEmployee.DeleteRefPeers + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: People.AsEmployee.ListTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: People.AsEmployee.CreateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips' + - '/People/{UserName}/Trips' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: People.AsEmployee.GetTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: People.AsEmployee.UpdateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: People.AsEmployee.DeleteTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}' + - '/People/{UserName}/Trips/{TripId}' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - People.Trip + summary: Invoke function GetInvolvedPeople + operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - People.Trips.PlanItem + summary: Get PlanItems from People + operationId: People.AsEmployee.Trips.ListPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems' + - '/People/{UserName}/Trips/{TripId}/PlanItems' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.AsEmployee.Trips.planItems.DeleteRefPlanItem + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trips.PlanItem + summary: Get the number of the resource + operationId: People.AsEmployee.Trips.PlanItems.GetCount-7df9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Trips.PlanItem + summary: Get ref of PlanItems from People + operationId: People.AsEmployee.Trips.ListRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for People + operationId: People.AsEmployee.Trips.CreateRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.AsEmployee.Trips.DeleteRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trip + summary: Get the number of the resource + operationId: People.AsEmployee.Trips.GetCount-c760 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()': + description: Provides operations to call the GetFavoriteAirline method. + get: + tags: + - People.Person + summary: Invoke function GetFavoriteAirline + operationId: People.Person.GetFavoriteAirline + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + $ref: '#/components/responses/GetFavoriteAirlineResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': + description: Provides operations to call the GetFriendsTrips method. + get: + tags: + - People.Person + summary: Invoke function GetFriendsTrips + operationId: People.Person.GetFriendsTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: userName + in: path + description: 'Usage: userName=''{userName}''' + required: true + schema: + type: string + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/GetFriendsTripsResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip': + description: Provides operations to call the GetPeersForTrip method. + post: + tags: + - People.Person + summary: Invoke action GetPeersForTrip + operationId: People.Person.GetPeersForTrip + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/GetPeersForTripRequestBody' + responses: + '200': + $ref: '#/components/responses/GetPeersForTripResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: action + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager': + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager + operationId: People.Person.GetPerson.AsManager-d051 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo': + get: + tags: + - People.Location + summary: Get AddressInfo property value + operationId: People.AsManager.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property AddressInfo value. + operationId: People.AsManager.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsManager.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Location + summary: Get the number of the resource + operationId: People.AsManager.AddressInfo.GetCount-f84e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.ListAddressInfo.AsEventLocation-7526 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.AddressInfo.GetCount.AsEventLocation-3722 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend': + description: Provides operations to manage the BestFriend property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: Get BestFriend from People + description: The best friend. + operationId: People.AsManager.GetBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.AsManager.UpdateBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/BestFriend' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/BestFriend' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of BestFriend from People + description: The best friend. + operationId: People.AsManager.GetRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved navigation property link + content: + application/json: + schema: + type: string + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + put: + tags: + - People.Person + summary: Update the best friend. + description: Update an instance of a best friend. + operationId: People.AsManager.UpdateRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPutBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property BestFriend for People + operationId: People.AsManager.DeleteRefBestFriend + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsManager.BestFriend.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsManager.BestFriend.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsManager.BestFriend.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsManager.BestFriend.AddressInfo.GetCount-5a39 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.ListAddressInfo.AsEventLocation-897f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-5af3 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsManager.BestFriend.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsManager.BestFriend.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.BestFriend.GetHomeAddress.AsEventLocation-545d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: People.GetBestFriend.AsEmployee-0445 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/BestFriend/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property BestFriend from People + operationId: People.GetBestFriendPhoto-f05d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property BestFriend in People + operationId: People.UpdateBestFriendPhoto-f05d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property BestFriend in People + operationId: People.DeleteBestFriendPhoto-f05d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports': + description: Provides operations to manage the DirectReports property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager entity. + get: + tags: + - People.Person + summary: Get DirectReports from People + operationId: People.AsManager.ListDirectReports + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Person + summary: Delete ref of navigation property DirectReports for People + operationId: People.AsManager.directReports.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsManager.DirectReports.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsManager.DirectReports.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsManager.DirectReports.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsManager.DirectReports.AddressInfo.GetCount-f46e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.DirectReports.ListAddressInfo.AsEventLocation-1252 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.DirectReports.AddressInfo.GetCount.AsEventLocation-5d49 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsManager.DirectReports.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsManager.DirectReports.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.DirectReports.GetHomeAddress.AsEventLocation-cf8d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property DirectReports from People + operationId: People.GetDirectReportsPhoto-7149 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property DirectReports in People + operationId: People.UpdateDirectReportsPhoto-7149 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property DirectReports in People + operationId: People.DeleteDirectReportsPhoto-7149 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.AsManager.DirectReports.GetCount-0ec4 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/DirectReports/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of DirectReports from People + operationId: People.AsManager.ListRefDirectReports + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Person + summary: Create new navigation property ref to DirectReports for People + operationId: People.AsManager.CreateRefDirectReports + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property DirectReports for People + operationId: People.AsManager.DeleteRefDirectReports + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends': + description: Provides operations to manage the Friends property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Person + summary: Get Friends from People + description: Friends of person + operationId: People.AsManager.ListFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Friends' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Friends' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Person + summary: Delete ref of navigation property Friends for People + operationId: People.AsManager.friends.DeleteRefPerson + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo': + get: + tags: + - People.Person.Location + summary: Get AddressInfo property value + operationId: People.AsManager.Friends.ListAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property AddressInfo value. + operationId: People.AsManager.Friends.UpdateAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + post: + tags: + - People.Person.Location + summary: Sets a new value for the collection of Location. + operationId: People.AsManager.Friends.SetAddressInfo + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + requestBody: + description: New property values + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person.Location + summary: Get the number of the resource + operationId: People.AsManager.Friends.AddressInfo.GetCount-f486 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.ListAddressInfo.AsEventLocation-f8c9 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/AddressInfo/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation/$count': + description: Provides operations to count the resources in the collection. + get: + summary: Get the number of the resource + operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-4480 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/HomeAddress': + get: + tags: + - People.Person.Location + summary: Get HomeAddress property value + operationId: People.AsManager.Friends.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Person.Location + summary: Update property HomeAddress value. + operationId: People.AsManager.Friends.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Person.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.Friends.GetHomeAddress.AsEventLocation-eb71 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person as Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee + operationId: People.GetFriends.AsEmployee-161e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/{UserName1}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get Photo for the navigation property Friends from People + operationId: People.GetFriendsPhoto-b97d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update Photo for the navigation property Friends in People + operationId: People.UpdateFriendsPhoto-b97d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete Photo for the navigation property Friends in People + operationId: People.DeleteFriendsPhoto-b97d + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: UserName1 + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.AsManager.Friends.GetCount-1c0c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Person + summary: Get ref of Friends from People + description: Friends of person + operationId: People.AsManager.ListRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Person + summary: Create new navigation property ref to Friends for People + operationId: People.AsManager.CreateRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Person + summary: Delete ref of navigation property Friends for People + operationId: People.AsManager.DeleteRefFriends + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee': + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.ListFriends.AsEmployee-161e + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Friends/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Friends.GetCount.AsEmployee-f325 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress': + get: + tags: + - People.Location + summary: Get HomeAddress property value + operationId: People.AsManager.GetHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + patch: + tags: + - People.Location + summary: Update property HomeAddress value. + operationId: People.AsManager.UpdateHomeAddress + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/HomeAddress/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation': + description: Casts the previous resource to EventLocation. + get: + tags: + - People.Location + summary: Get the item of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location as Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + operationId: People.GetHomeAddress.AsEventLocation-e3dc + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Entity result. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire': + description: Provides operations to call the Hire method. + post: + tags: + - People.Person + summary: Invoke action Hire + description: Hires someone for the company. + operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: Action parameters + content: + application/json: + schema: + type: object + properties: + hire: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - object + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: action + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: People.AsManager.ListTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: People.AsManager.CreateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips' + - '/People/{UserName}/Trips' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: People.AsManager.GetTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: People.AsManager.UpdateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: People.AsManager.DeleteTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}' + - '/People/{UserName}/Trips/{TripId}' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - People.Trip + summary: Invoke function GetInvolvedPeople + operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - People.Trips.PlanItem + summary: Get PlanItems from People + operationId: People.AsManager.Trips.ListPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems' + - '/People/{UserName}/Trips/{TripId}/PlanItems' + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.AsManager.Trips.planItems.DeleteRefPlanItem + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trips.PlanItem + summary: Get the number of the resource + operationId: People.AsManager.Trips.PlanItems.GetCount-fa08 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Trips.PlanItem + summary: Get ref of PlanItems from People + operationId: People.AsManager.Trips.ListRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for People + operationId: People.AsManager.Trips.CreateRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.AsManager.Trips.DeleteRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trip + summary: Get the number of the resource + operationId: People.AsManager.Trips.GetCount-1f8c + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip': + description: Provides operations to call the ShareTrip method. + post: + tags: + - People.Person + summary: Invoke action ShareTrip + description: Details of the shared trip. + operationId: People.Person.ShareTrip + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + $ref: '#/components/requestBodies/ShareTripRequestBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: action + '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': + description: Provides operations to call the UpdatePersonLastName method. + get: + tags: + - People.Person + summary: Invoke function UpdatePersonLastName + operationId: People.Person.UpdatePersonLastName + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: lastName + in: path + description: 'Usage: lastName=''{lastName}''' + required: true + schema: + type: string + responses: + '200': + $ref: '#/components/responses/UpdatePersonLastNameResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + '/People/{UserName}/Photo': + description: Provides operations to manage the media for the Person entity. + get: + tags: + - People.Person + summary: Get photo + description: Get photo of a specific user + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-get-photo?view=graph-rest-1.0 + operationId: People.Person.GetPhoto-883f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + responses: + '200': + description: Retrieved media content + content: + application/octet-stream: + schema: + type: string + format: binary + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + put: + tags: + - People.Person + summary: Update photo + description: Update photo of a specific user + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-update-photo?view=graph-rest-1.0 + operationId: People.Person.UpdatePhoto-883f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New media content. + content: + application/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + delete: + tags: + - People.Person + summary: Delete photo + description: Delete photo of a specific user + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0 + operationId: People.Person.DeletePhoto-883f + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Trips': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: List trips. + description: Retrieve a list of trips. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 + operationId: People.ListTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trip + summary: Create a trip. + description: Create a new trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-post-trips?view=graph-rest-1.0 + operationId: People.CreateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + requestBody: + description: New navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '201': + description: Created navigation property. + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips' + '/People/{UserName}/Trips/{TripId}': + description: Provides operations to manage the Trips property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person entity. + get: + tags: + - People.Trip + summary: Get a trip. + description: Retrieve the properties of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-get-trips?view=graph-rest-1.0 + operationId: People.GetTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Retrieved navigation property + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + patch: + tags: + - People.Trip + summary: Update a trip. + description: Update an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-update-trips?view=graph-rest-1.0 + operationId: People.UpdateTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + description: New navigation property values + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + required: true + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trip + summary: Delete a trip. + description: Delete an instance of a trip. + externalDocs: + description: Find more info here + url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 + operationId: People.DeleteTrips + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}' + '/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': + description: Provides operations to call the GetInvolvedPeople method. + get: + tags: + - People.Trip + summary: Invoke function GetInvolvedPeople + operationId: People.Person.Trips.Trip.GetInvolvedPeople + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: function + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()' + '/People/{UserName}/Trips/{TripId}/PlanItems': + description: Provides operations to manage the PlanItems property of the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip entity. + get: + tags: + - People.Trips.PlanItem + summary: Get PlanItems from People + operationId: People.Trips.ListPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + x-ms-docs-grouped-path: + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/PlanItems' + - '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/PlanItems' + '/People/{UserName}/Trips/{TripId}/PlanItems/{PlanItemId}/$ref': + description: Provides operations to manage the collection of Person entities. + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.Trips.planItems.DeleteRefPlanItem + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: PlanItemId + in: path + description: The unique identifier of PlanItem + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: PlanItem + - name: If-Match + in: header + description: ETag + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Trips/{TripId}/PlanItems/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trips.PlanItem + summary: Get the number of the resource + operationId: People.Trips.PlanItems.GetCount-9a27 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + '/People/{UserName}/Trips/{TripId}/PlanItems/$ref': + description: Provides operations to manage the collection of Person entities. + get: + tags: + - People.Trips.PlanItem + summary: Get ref of PlanItems from People + operationId: People.Trips.ListRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/StringCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + post: + tags: + - People.Trips.PlanItem + summary: Create new navigation property ref to PlanItems for People + operationId: People.Trips.CreateRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + requestBody: + $ref: '#/components/requestBodies/refPostBody' + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + delete: + tags: + - People.Trips.PlanItem + summary: Delete ref of navigation property PlanItems for People + operationId: People.Trips.DeleteRefPlanItems + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: TripId + in: path + description: The unique identifier of Trip + required: true + schema: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + x-ms-docs-key-type: Trip + - name: If-Match + in: header + description: ETag + schema: + type: string + - name: '@id' + in: query + description: The delete Uri + required: true + schema: + type: string + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + x-ms-docs-operation-type: operation + '/People/{UserName}/Trips/$count': + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Trip + summary: Get the number of the resource + operationId: People.Trips.GetCount-e877 + parameters: + - name: UserName + in: path + description: The unique identifier of Person + required: true + schema: + type: string + x-ms-docs-key-type: Person + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /People/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.GetCount-dd8d + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + description: Casts the previous resource to Employee. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.Person.ListPerson.AsEmployee-013a + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Person.Person.GetCount.AsEmployee-ef29 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + description: Casts the previous resource to Manager. + get: + tags: + - People.Person + summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection + operationId: People.Person.ListPerson.AsManager-3e14 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/top' + - $ref: '#/components/parameters/skip' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + - $ref: '#/components/parameters/count' + - name: $orderby + in: query + description: Order items by property values + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $select + in: query + description: Select properties to be returned + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + type: string + responses: + '200': + $ref: '#/components/responses/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /People/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/$count: + description: Provides operations to count the resources in the collection. + get: + tags: + - People.Person + summary: Get the number of the resource + operationId: People.Person.Person.GetCount.AsManager-2d48 + parameters: + - name: ConsistencyLevel + in: header + description: 'Indicates the requested consistency level. Documentation URL: https://docs.tripservice.com/advanced-queries' + schema: + type: string + examples: + example-1: + description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. + value: eventual + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/filter' + responses: + '200': + $ref: '#/components/responses/ODataCountResponse' + default: + $ref: '#/components/responses/error' + deprecated: true + x-ms-deprecation: + removalDate: '2023-03-15T00:00:00.0000000+00:00' + date: '2021-08-24T00:00:00.0000000+00:00' + version: 2021-05/people + description: The People API is deprecated and will stop returning data on March 2023. Please use the new newPeople API. + /ResetDataSource: + description: Provides operations to call the ResetDataSource method. + post: + tags: + - ResetDataSource + summary: Invoke actionImport ResetDataSource + description: Resets the data source to default values. + operationId: ActionImport.ResetDataSource + responses: + '204': + description: Success + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: actionImport +components: + schemas: + Edm.Geography: + $ref: '#/components/schemas/Edm.Geometry' + Edm.GeographyPoint: + $ref: '#/components/schemas/Edm.GeometryPoint' + Edm.GeographyLineString: + $ref: '#/components/schemas/Edm.GeometryLineString' + Edm.GeographyPolygon: + $ref: '#/components/schemas/Edm.GeometryPolygon' + Edm.GeographyMultiPoint: + $ref: '#/components/schemas/Edm.GeometryMultiPoint' + Edm.GeographyMultiLineString: + $ref: '#/components/schemas/Edm.GeometryMultiLineString' + Edm.GeographyMultiPolygon: + $ref: '#/components/schemas/Edm.GeometryMultiPolygon' + Edm.GeographyCollection: + $ref: '#/components/schemas/Edm.GeometryCollection' + Edm.Geometry: + type: object + oneOf: + - $ref: '#/components/schemas/Edm.GeometryPoint' + - $ref: '#/components/schemas/Edm.GeometryLineString' + - $ref: '#/components/schemas/Edm.GeometryPolygon' + - $ref: '#/components/schemas/Edm.GeometryMultiPoint' + - $ref: '#/components/schemas/Edm.GeometryMultiLineString' + - $ref: '#/components/schemas/Edm.GeometryMultiPolygon' + - $ref: '#/components/schemas/Edm.GeometryCollection' + Edm.GeometryPoint: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - Point + type: string + default: Point + coordinates: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryLineString: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - LineString + coordinates: + minItems: 2 + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryPolygon: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - Polygon + coordinates: + minItems: 4 + type: array + items: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiPoint: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiPoint + coordinates: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiLineString: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiLineString + coordinates: + minItems: 2 + type: array + items: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryMultiPolygon: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - MultiPolygon + coordinates: + minItems: 4 + type: array + items: + type: array + items: + type: array + items: + $ref: '#/components/schemas/GeoJSON.position' + Edm.GeometryCollection: + required: + - type + - coordinates + type: object + properties: + type: + enum: + - GeometryCollection + coordinates: + type: array + items: + $ref: '#/components/schemas/Edm.Geometry' + GeoJSON.position: + minItems: 2 + type: array + items: + type: number + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError: + required: + - error + type: object + properties: + error: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.MainError: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + x-ms-primary-error-message: true + target: + type: + - 'null' + - string + details: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails' + innerError: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ErrorDetails: + required: + - code + - message + type: object + properties: + code: + type: string + message: + type: string + target: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: + title: InnerError + type: object + properties: + 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: + - 'null' + - string + format: date-time + RequestId: + type: + - 'null' + - string + 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: + - 'null' + - string + ReferenceCreate: + type: object + properties: + '@odata.id': + type: string + additionalProperties: + type: object + ReferenceNumeric: + enum: + - '-INF' + - INF + - NaN + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: + title: Person + type: object + properties: + UserName: + type: string + FirstName: + type: string + LastName: + type: + - 'null' + - string + MiddleName: + type: + - 'null' + - string + Gender: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' + Age: + oneOf: + - type: + - 'null' + - number + format: int64 + - type: + - 'null' + - string + Emails: + type: array + items: + type: + - 'null' + - string + AddressInfo: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + HomeAddress: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + - type: + - 'null' + - object + FavoriteFeature: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Features: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' + Photo: + type: + - 'null' + - string + format: base64url + Friends: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + description: Friends of person + x-ms-navigationProperty: true + BestFriend: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - object + description: The best friend. + x-ms-navigationProperty: true + Trips: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + description: Collection of trips. + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: + title: Airline + type: object + properties: + AirlineCode: + type: string + Name: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: + title: Airport + type: object + properties: + Name: + type: + - 'null' + - string + IcaoCode: + type: string + IataCode: + type: + - 'null' + - string + Location: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' + - type: + - 'null' + - object + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: + title: Location + type: object + properties: + Address: + type: + - 'null' + - string + City: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' + - type: + - 'null' + - object + Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: + title: City + type: object + properties: + Name: + type: + - 'null' + - string + CountryRegion: + type: + - 'null' + - string + Region: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + - title: AirportLocation + type: object + properties: + Loc: + $ref: '#/components/schemas/Edm.GeographyPoint' + EmergencyAuthority: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - type: + - 'null' + - 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: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + - title: EventLocation + type: object + properties: + BuildingInfo: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: + title: Trip + type: object + properties: + TripId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ShareId: + pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' + type: string + format: uuid + Name: + type: + - 'null' + - string + Budget: + oneOf: + - type: + - 'null' + - number + format: float + - type: + - 'null' + - string + - $ref: '#/components/schemas/ReferenceNumeric' + Description: + type: + - 'null' + - string + Tags: + type: array + items: + type: + - 'null' + - string + TripData: { } + DestinationInfo: + type: array + 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])$' + type: string + format: date-time + EndsAt: + 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 + format: date-time + PlanItems: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: + title: PlanItem + type: object + properties: + PlanItemId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + ConfirmationCode: + type: + - 'null' + - string + 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])$' + type: string + format: date-time + EndsAt: + 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 + format: date-time + Duration: + pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$' + type: string + format: duration + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' + - title: Event + type: object + properties: + OccursAt: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' + - type: + - 'null' + - object + Description: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' + - title: PublicTransportation + type: object + properties: + SeatNumber: + type: + - 'null' + - string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' + - title: Flight + type: object + properties: + FlightNumber: + type: + - 'null' + - string + Airline: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + - type: + - 'null' + - object + x-ms-navigationProperty: true + From: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + - type: + - 'null' + - object + x-ms-navigationProperty: true + To: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + - type: + - 'null' + - object + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - title: Employee + type: object + properties: + Cost: + oneOf: + - type: + - 'null' + - number + format: int64 + - type: + - 'null' + - string + Peers: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + allOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + - title: Manager + type: object + properties: + Budget: + oneOf: + - type: + - 'null' + - number + format: int64 + - type: + - 'null' + - string + BossOffice: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + - type: + - 'null' + - object + DirectReports: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + x-ms-navigationProperty: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender: + title: PersonGender + enum: + - Male + - Female + - Unknow + type: string + description: Gender of the person. + x-ms-enum: + name: PersonGender + modelAsString: false + values: + - value: Male + description: The Male gender. + name: Male + - value: Female + description: The Female gender. + name: Female + - value: Unknow + description: Unknown gender or prefers not to say. + name: Unknow + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature: + title: Feature + enum: + - Feature1 + - Feature2 + - Feature3 + - Feature4 + type: string + x-ms-enum-flags: + isFlags: true + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse: + title: Collection of Airline + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse: + title: Collection of Airport + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse: + title: Collection of Trip + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse: + title: Collection of PlanItem + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse: + title: Collection of Employee + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse: + title: Collection of Manager + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse: + title: Collection of Event + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse: + title: Collection of PublicTransportation + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse: + title: Collection of Flight + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse: + title: Collection of Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' + responses: + error: + description: error + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.ODataError' + ODataCountResponse: + description: The count of the resource + content: + text/plain: + schema: + $ref: '#/components/schemas/ODataCountResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirlineCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.TripCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItemCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EmployeeCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ManagerCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportationCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse' + Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.LocationCollectionResponse' + StringCollectionResponse: + description: Retrieved collection + content: + application/json: + schema: + $ref: '#/components/schemas/StringCollectionResponse' + GetFavoriteAirlineResponse: + description: Success + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' + - type: + - 'null' + - object + GetFriendsTripsResponse: + description: Success + content: + application/json: + schema: + title: Collection of Trip + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' + UpdatePersonLastNameResponse: + description: Success + content: + application/json: + schema: + type: object + properties: + value: + type: boolean + default: false + GetPeersForTripResponse: + description: Success + content: + application/json: + schema: + title: Collection of Person + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' + parameters: + top: + name: $top + in: query + description: Show only the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + example: 50 + skip: + name: $skip + in: query + description: Skip the first n items + style: form + explode: false + schema: + minimum: 0 + type: number + format: int64 + count: + name: $count + in: query + description: Include count of items + style: form + explode: false + schema: + type: boolean + filter: + name: $filter + in: query + description: Filter items by property values + style: form + explode: false + schema: + type: string + search: + name: $search + in: query + description: Search items by search phrases + style: form + explode: false + schema: + type: string + examples: + Microsoft.OData.Service.Sample.TrippinInMemory.Models.InnerError: + value: + Date: '0001-01-01T00:00:00.0000000+00:00' + RequestId: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: + value: + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender + Age: 0 + Emails: + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + FavoriteFeature: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Features: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Photo: string + Friends: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Trips: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: + value: + AirlineCode: string (identifier) + Name: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: + value: + Name: string + IcaoCode: string (identifier) + IataCode: string + Location: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: + value: + Address: string + City: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City + Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: + value: + Name: string + CountryRegion: string + Region: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: + value: + Address: string + City: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City + Loc: Edm.GeographyPoint + EmergencyAuthority: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: + value: + Address: string + City: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City + BuildingInfo: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: + value: + TripId: 0 + ShareId: 00000000-0000-0000-0000-000000000000 + Name: string + Budget: 0 + Description: string + Tags: + - string + TripData: { } + DestinationInfo: + - { } + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + PlanItems: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: + value: + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: + value: + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + OccursAt: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation + Description: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: + value: + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + SeatNumber: string + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: + value: + PlanItemId: 0 + ConfirmationCode: string + StartsAt: '0001-01-01T00:00:00.0000000+00:00' + EndsAt: '0001-01-01T00:00:00.0000000+00:00' + Duration: string + SeatNumber: string + FlightNumber: string + Airline: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline + From: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport + To: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: + value: + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender + Age: 0 + Emails: + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + FavoriteFeature: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Features: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Photo: string + Friends: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Trips: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip + Cost: 0 + Peers: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: + value: + UserName: string (identifier) + FirstName: string + LastName: string + MiddleName: string + Gender: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender + Age: 0 + Emails: + - string + AddressInfo: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + HomeAddress: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + FavoriteFeature: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Features: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature + Photo: string + Friends: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + BestFriend: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + Trips: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip + Budget: 0 + BossOffice: + '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location + DirectReports: + - '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person + requestBodies: + refPostBody: + description: New navigation property ref value + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceCreate' + required: true + refPutBody: + description: New navigation property ref values + content: + application/json: + schema: + $ref: '#/components/schemas/ReferenceUpdate' + required: true + ShareTripRequestBody: + description: Action parameters + content: + application/json: + schema: + type: object + properties: + userName: + type: string + tripId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + required: true + GetPeersForTripRequestBody: + description: Action parameters + content: + application/json: + schema: + type: object + properties: + userName: + type: string + tripId: + maximum: 2147483647 + minimum: -2147483648 + type: number + format: int32 + required: true +tags: + - name: Airlines.Airline + x-ms-docs-toc-type: page + - name: Airports.Airport + x-ms-docs-toc-type: page + - name: Airports.AirportLocation + x-ms-docs-toc-type: page + - name: Airports.Person + x-ms-docs-toc-type: page + - name: Airports.Person.Location + x-ms-docs-toc-type: page + - name: Airports + x-ms-docs-toc-type: container + - name: People + x-ms-docs-toc-type: container + - name: Me.Person + x-ms-docs-toc-type: page + - name: Me.Location + x-ms-docs-toc-type: page + - name: Me.Person.Location + x-ms-docs-toc-type: page + - name: Me.Trip + x-ms-docs-toc-type: page + - name: Me.Trips.PlanItem + x-ms-docs-toc-type: page + - name: NewComePeople.Person + x-ms-docs-toc-type: page + - name: NewComePeople.Location + x-ms-docs-toc-type: page + - name: NewComePeople.Person.Location + x-ms-docs-toc-type: page + - name: NewComePeople.Trip + x-ms-docs-toc-type: page + - name: NewComePeople.Trips.PlanItem + x-ms-docs-toc-type: page + - name: People.Person + x-ms-docs-toc-type: page + - name: People.Location + x-ms-docs-toc-type: page + - name: People.Person.Location + x-ms-docs-toc-type: page + - name: People.Trip + x-ms-docs-toc-type: page + - name: People.Trips.PlanItem + x-ms-docs-toc-type: page + - name: ResetDataSource + x-ms-docs-toc-type: container \ No newline at end of file From 79ffbbf899c191f6abb6b83e663b145461213c0d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 6 Jan 2025 12:49:28 -0500 Subject: [PATCH 073/103] fix: updates to latest components registrations Signed-off-by: Vincent Biret --- .../Generator/OpenApiSchemaGenerator.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 2f3e7cf85..0d3ccf112 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -42,27 +42,27 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume // append the Edm.Spatial foreach(var schema in context.CreateSpatialSchemas(document)) { - document.AddComponentSchema(schema.Key, schema.Value); + document.AddComponent(schema.Key, schema.Value); } // append the OData errors foreach(var schema in context.CreateODataErrorSchemas(document)) { - document.AddComponentSchema(schema.Key, schema.Value); + document.AddComponent(schema.Key, schema.Value); } if(context.Settings.EnableDollarCountPath) - document.AddComponentSchema(Constants.DollarCountSchemaName, new OpenApiSchema { + document.AddComponent(Constants.DollarCountSchemaName, new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64" }); if(context.HasAnyNonContainedCollections()) { - document.AddComponentSchema($"String{Constants.CollectionSchemaSuffix}", CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document)); + document.AddComponent($"String{Constants.CollectionSchemaSuffix}", CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document)); } - document.AddComponentSchema(Constants.ReferenceUpdateSchemaName, new() + document.AddComponent(Constants.ReferenceUpdateSchemaName, new OpenApiSchema() { Type = JsonSchemaType.Object, Properties = new Dictionary @@ -72,7 +72,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume } }); - document.AddComponentSchema(Constants.ReferenceCreateSchemaName, new() + document.AddComponent(Constants.ReferenceCreateSchemaName, new OpenApiSchema() { Type = JsonSchemaType.Object, Properties = new Dictionary @@ -82,7 +82,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume AdditionalProperties = new OpenApiSchema { Type = JsonSchemaType.Object } }); - document.AddComponentSchema(Constants.ReferenceNumericName, new() + document.AddComponent(Constants.ReferenceNumericName, new OpenApiSchema() { Type = JsonSchemaType.String, Nullable = true, @@ -104,7 +104,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume Title = "Base collection pagination and count responses", Type = JsonSchemaType.Object, }; - document.AddComponentSchema(Constants.BaseCollectionPaginationCountResponse, responseSchema); + document.AddComponent(Constants.BaseCollectionPaginationCountResponse, responseSchema); if (context.Settings.EnableCount) responseSchema.Properties.Add(ODataConstants.OdataCount); @@ -115,7 +115,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume // @odata.nextLink + @odata.deltaLink if (context.Model.SchemaElements.OfType().Any(static x => x.IsDeltaFunction())) { - document.AddComponentSchema(Constants.BaseDeltaFunctionResponse, new() + document.AddComponent(Constants.BaseDeltaFunctionResponse, new OpenApiSchema() { Title = "Base delta function response", Type = JsonSchemaType.Object, @@ -148,7 +148,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume .Equals(context.Settings.InnerErrorComplexTypeName, StringComparison.Ordinal)) continue; - document.AddComponentSchema(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); + document.AddComponent(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); } break; } @@ -164,7 +164,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume CreateCollectionSchema(context, x, document)))) .ToArray()) { - document.AddComponentSchema(collectionEntry.Key, collectionEntry.Value); + document.AddComponent(collectionEntry.Key, collectionEntry.Value); } } internal static bool HasAnyNonContainedCollections(this ODataContext context) From 7af8eb68d671c832e91b9495db15398db36ccbf5 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 9 Jan 2025 11:59:14 -0500 Subject: [PATCH 074/103] chore: updates for async API surface changes --- src/OoasGui/MainForm.cs | 26 ++-- src/OoasUtil/OpenApiGenerator.cs | 10 +- .../EdmModelOpenApiExtensionsTest.cs | 25 ++-- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 29 ++--- .../OpenApiParameterGeneratorTests.cs | 115 +++++++----------- .../OpenApiRequestBodyGeneratorTests.cs | 5 +- .../OpenApiResponseGeneratorTests.cs | 9 +- .../Generator/OpenApiSchemaGeneratorTests.cs | 73 +++++------ .../OpenApiSecuritySchemeGeneratorTests.cs | 7 +- .../OpenApiSpatialTypeSchemaGeneratorTest.cs | 69 +++++------ .../EdmActionImportOperationHandlerTests.cs | 5 +- .../EdmActionOperationHandlerTests.cs | 5 +- .../EdmFunctionImportOperationHandlerTests.cs | 5 +- .../EdmFunctionOperationHandlerTests.cs | 5 +- .../EntityDeleteOperationHandlerTests.cs | 5 +- .../EntityGetOperationHandlerTests.cs | 5 +- .../EntityPatchOperationHandlerTests.cs | 5 +- .../EntityPutOperationHandlerTests.cs | 5 +- .../EntitySetGetOperationHandlerTests.cs | 5 +- .../EntitySetPostOperationHandlerTests.cs | 5 +- ...igationPropertyGetOperationHandlerTests.cs | 5 +- ...ationPropertyPatchOperationHandlerTests.cs | 5 +- ...gationPropertyPostOperationHandlerTests.cs | 5 +- ...igationPropertyPutOperationHandlerTests.cs | 5 +- .../SingletonGetOperationHandlerTests.cs | 5 +- .../SingletonPatchOperationHandlerTests.cs | 9 +- tool/UpdateDocs/Program.cs | 32 ++--- 27 files changed, 230 insertions(+), 254 deletions(-) diff --git a/src/OoasGui/MainForm.cs b/src/OoasGui/MainForm.cs index e10bbae39..5ec23afb3 100644 --- a/src/OoasGui/MainForm.cs +++ b/src/OoasGui/MainForm.cs @@ -202,15 +202,12 @@ private async Task ConvertAsync() } string openApi = null; - await Task.Run(() => - { - _document = EdmModel.ConvertToOpenApi(Settings); - MemoryStream stream = new MemoryStream(); - _document.Serialize(stream, Version, Format); - stream.Flush(); - stream.Position = 0; - openApi = new StreamReader(stream).ReadToEnd(); - }); + _document = EdmModel.ConvertToOpenApi(Settings); + MemoryStream stream = new MemoryStream(); + await _document.SerializeAsync(stream, Version, Format); + await stream.FlushAsync(); + stream.Position = 0; + openApi = await new StreamReader(stream).ReadToEndAsync(); oasRichTextBox.Text = openApi; saveBtn.Enabled = true; @@ -252,14 +249,9 @@ private async void saveBtn_Click(object sender, EventArgs e) if (saveFileDialog.ShowDialog() == DialogResult.OK) { string output = saveFileDialog.FileName; - using (FileStream fs = File.Create(output)) - { - await Task.Run(() => - { - _document?.Serialize(fs, Version, Format); - fs.Flush(); - }); - } + using FileStream fs = File.Create(output); + await _document?.SerializeAsync(fs, Version, Format); + await fs.FlushAsync(); MessageBox.Show("Saved successfully!"); } diff --git a/src/OoasUtil/OpenApiGenerator.cs b/src/OoasUtil/OpenApiGenerator.cs index 3a9218039..e3ef89c91 100644 --- a/src/OoasUtil/OpenApiGenerator.cs +++ b/src/OoasUtil/OpenApiGenerator.cs @@ -60,12 +60,10 @@ public async Task GenerateAsync(CancellationToken cancellationToken = defa this.ModifySettings(); - using (FileStream fs = File.Create(Output)) - { - OpenApiDocument document = edmModel.ConvertToOpenApi(Settings); - document.Serialize(fs, Settings.OpenApiSpecVersion, Format); - await fs.FlushAsync(cancellationToken); - } + using FileStream fs = File.Create(Output); + OpenApiDocument document = edmModel.ConvertToOpenApi(Settings); + await document.SerializeAsync(fs, Settings.OpenApiSpecVersion, Format, cancellationToken).ConfigureAwait(false); + await fs.FlushAsync(cancellationToken).ConfigureAwait(false); } catch(Exception e) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index 388e5a495..ffdcd951e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -6,6 +6,7 @@ using System; using System.IO; using System.Text.Json.Nodes; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Xunit; @@ -33,7 +34,7 @@ public void ConvertToOpenApiThrowsArgumentNullModel() [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] - public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + public async Task EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.EmptyModel; @@ -44,7 +45,7 @@ public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF }; // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + string result = await WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); var fileName = $"Empty.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert @@ -58,7 +59,7 @@ public void EmptyEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] - public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + public async Task BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; @@ -71,7 +72,7 @@ public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF }; // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + string result = await WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); var fileName = $"Basic.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; // Assert @@ -85,7 +86,7 @@ public void BasicEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiF [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] - public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + public async Task MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; @@ -99,7 +100,7 @@ public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion }; // Act - string result = WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); + string result = await WriteEdmModelAsOpenApi(model, format, openApiConvertSettings); var fileName = $"Multiple.Schema.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; @@ -114,7 +115,7 @@ public void MultipleSchemasEdmModelToOpenApiWorks(OpenApiSpecVersion specVersion [InlineData(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml)] [InlineData(OpenApiSpecVersion.OpenApi3_1, OpenApiFormat.Yaml)] - public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) + public async Task TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, OpenApiFormat format) { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; @@ -131,7 +132,7 @@ public void TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersion, Op IncludeAssemblyInfo = false }; // Act - string result = WriteEdmModelAsOpenApi(model, format, settings); + string result = await WriteEdmModelAsOpenApi(model, format, settings); var fileName = $"TripService.OpenApi.{GetVersion(specVersion)}{GetFormatExt(format)}"; @@ -168,7 +169,7 @@ private static string GetVersion(OpenApiSpecVersion version) => _ => throw new NotImplementedException() }; - private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, + private static async Task WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target, OpenApiConvertSettings settings = null) { settings ??= new OpenApiConvertSettings(); @@ -176,9 +177,9 @@ private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat targ Assert.NotNull(document); // guard MemoryStream stream = new(); - document.Serialize(stream, settings.OpenApiSpecVersion, target); - stream.Flush(); + await document.SerializeAsync(stream, settings.OpenApiSpecVersion, target); + await stream.FlushAsync(); stream.Position = 0; - return new StreamReader(stream).ReadToEnd(); + return await new StreamReader(stream).ReadToEndAsync(); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index c13d3b955..e162652a6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -6,6 +6,7 @@ using System; using System.Linq; using System.Text.Json.Nodes; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -47,7 +48,7 @@ public void CreateEdmTypeSchemaThrowArgumentNullEdmTypeReference() [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0)] [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(OpenApiSpecVersion specVersion) + public async Task CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; @@ -62,7 +63,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(Open // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - var json = JsonNode.Parse(schema.SerializeAsJson(context.Settings.OpenApiSpecVersion)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(context.Settings.OpenApiSpecVersion)); // & Assert if (specVersion == OpenApiSpecVersion.OpenApi2_0) @@ -86,7 +87,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionComplexType(Open } [Fact] - public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() + public async Task CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() { // Arrange IEdmModel model = EdmModelHelper.TripServiceModel; @@ -98,7 +99,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ @@ -110,7 +111,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionComplexType() } [Fact] - public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType() + public async Task CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -121,7 +122,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ @@ -133,7 +134,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNonNullableCollectionPrimitiveType } [Fact] - public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() + public async Task CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -144,7 +145,7 @@ public void CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveType() // Act var schema = context.CreateEdmTypeSchema(collectionType, new()); Assert.NotNull(schema); - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ @@ -310,7 +311,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) + public async Task CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -320,7 +321,7 @@ public void CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) @@ -341,7 +342,7 @@ public void CreateEdmTypeSchemaReturnSchemaForString(bool isNullable) [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEdmTypeSchemaReturnSchemaForInt32(bool isNullable) + public async Task CreateEdmTypeSchemaReturnSchemaForInt32(bool isNullable) { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -351,7 +352,7 @@ public void CreateEdmTypeSchemaReturnSchemaForInt32(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) @@ -464,7 +465,7 @@ public void CreateEdmTypeSchemaReturnSchemaForInt64(bool isNullable, bool IEEE75 [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEdmTypeSchemaReturnSchemaForGuid(bool isNullable) + public async Task CreateEdmTypeSchemaReturnSchemaForGuid(bool isNullable) { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -474,7 +475,7 @@ public void CreateEdmTypeSchemaReturnSchemaForGuid(bool isNullable) // Act var schema = context.CreateEdmTypeSchema(edmTypeReference, new()); Assert.NotNull(schema); // guard - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // & Assert if (isNullable) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index e24abb561..471461e8a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json.Nodes; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -31,7 +32,7 @@ public void CreateParametersThrowArgumentNullContext() } [Fact] - public void CreateParametersReturnsCreatedParameters() + public async Task CreateParametersReturnsCreatedParameters() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -46,11 +47,7 @@ public void CreateParametersReturnsCreatedParameters() Assert.Equal(5, parameters.Count); Assert.Equal(new[] { "top", "skip", "count", "filter", "search" }, parameters.Select(p => p.Key)); - Assert.Collection(parameters, - item => // $top - { - var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - var expected = JsonNode.Parse(@"{ + var expectedTop = JsonNode.Parse(@"{ ""name"": ""$top"", ""in"": ""query"", ""description"": ""Show only the first n items"", @@ -63,13 +60,7 @@ public void CreateParametersReturnsCreatedParameters() }, ""example"": 50 }"); - - Assert.True(JsonNode.DeepEquals(expected, json)); - }, - item => // $skip - { - var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - var expected = JsonNode.Parse(@"{ + var expectedSkip = JsonNode.Parse(@"{ ""name"": ""$skip"", ""in"": ""query"", ""description"": ""Skip the first n items"", @@ -81,13 +72,7 @@ public void CreateParametersReturnsCreatedParameters() ""format"": ""int64"" } }"); - - Assert.True(JsonNode.DeepEquals(expected, json)); - }, - item => // $count - { - var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - var expected = JsonNode.Parse(@"{ + var expectedCount = JsonNode.Parse(@"{ ""name"": ""$count"", ""in"": ""query"", ""description"": ""Include count of items"", @@ -97,13 +82,7 @@ public void CreateParametersReturnsCreatedParameters() ""type"": ""boolean"" } }"); - - Assert.True(JsonNode.DeepEquals(expected, json)); - }, - item => // $filter - { - var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - var expected = JsonNode.Parse(@"{ + var expectedFilter = JsonNode.Parse(@"{ ""name"": ""$filter"", ""in"": ""query"", ""description"": ""Filter items by property values"", @@ -113,13 +92,7 @@ public void CreateParametersReturnsCreatedParameters() ""type"": ""string"" } }"); - - Assert.True(JsonNode.DeepEquals(expected, json)); - }, - item => // $search - { - var json = JsonNode.Parse(item.Value.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - var expected = JsonNode.Parse(@"{ + var expectedSearch = JsonNode.Parse(@"{ ""name"": ""$search"", ""in"": ""query"", ""description"": ""Search items by search phrases"", @@ -129,13 +102,17 @@ public void CreateParametersReturnsCreatedParameters() ""type"": ""string"" } }"); - - Assert.True(JsonNode.DeepEquals(expected, json)); - }); + var parametersAsRawJson = await Task.WhenAll(parameters.Select(p => p.Value.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0))); + var parametersAsJson = parametersAsRawJson.Select(x => JsonNode.Parse(x)).ToArray(); + Assert.Contains(parametersAsJson, p => JsonNode.DeepEquals(expectedTop, p)); + Assert.Contains(parametersAsJson, p => JsonNode.DeepEquals(expectedSkip, p)); + Assert.Contains(parametersAsJson, p => JsonNode.DeepEquals(expectedCount, p)); + Assert.Contains(parametersAsJson, p => JsonNode.DeepEquals(expectedFilter, p)); + Assert.Contains(parametersAsJson, p => JsonNode.DeepEquals(expectedSearch, p)); } [Fact] - public void CanSerializeAsYamlFromTheCreatedParameters() + public async Task CanSerializeAsYamlFromTheCreatedParameters() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -148,7 +125,7 @@ public void CanSerializeAsYamlFromTheCreatedParameters() Assert.Contains("skip", parameters.Select(p => p.Key)); var skip = parameters.First(c => c.Key == "skip").Value; - string yaml = skip.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0); + string yaml = await skip.SerializeAsYamlAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Equal( @"name: $skip in: query @@ -165,7 +142,7 @@ public void CanSerializeAsYamlFromTheCreatedParameters() [Theory] [InlineData(true)] [InlineData(false)] - public void CreateKeyParametersForSingleKeyWorks(bool prefix) + public async Task CreateKeyParametersForSingleKeyWorks(bool prefix) { // Arrange EdmModel model = new EdmModel(); @@ -186,7 +163,7 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) Assert.NotNull(parameters); var parameter = Assert.Single(parameters); - var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); JsonNode expected; if (prefix) @@ -224,7 +201,7 @@ public void CreateKeyParametersForSingleKeyWorks(bool prefix) [Theory] [InlineData(true)] [InlineData(false)] - public void CreateKeyParametersForCompositeKeyWorks(bool prefix) + public async Task CreateKeyParametersForCompositeKeyWorks(bool prefix) { // Arrange EdmModel model = new EdmModel(); @@ -248,7 +225,7 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) // 1st var parameter = parameters.First(); - var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expected = JsonNode.Parse(@"{ ""name"": ""firstName"", ""in"": ""path"", @@ -264,7 +241,7 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) // 2nd parameter = parameters.Last(); - json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); expected = JsonNode.Parse(@"{ ""name"": ""lastName"", ""in"": ""path"", @@ -280,7 +257,7 @@ public void CreateKeyParametersForCompositeKeyWorks(bool prefix) } [Fact] - public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() + public async Task CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() { // Arrange EdmModel model = new(); @@ -307,7 +284,7 @@ public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() // Assert Assert.NotNull(parameters); Assert.Single(parameters); - var json = JsonNode.Parse(altParameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await altParameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expected = JsonNode.Parse(@"{ ""name"": ""AltId1"", ""in"": ""path"", @@ -322,7 +299,7 @@ public void CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() } [Fact] - public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() + public async Task CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() { // Arrange EdmModel model = new(); @@ -355,7 +332,7 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() // Assert Assert.NotNull(parameters); Assert.Equal(2, parameters.Count); - var json1 = JsonNode.Parse(altParameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json1 = JsonNode.Parse(await altParameter1.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expected1 = JsonNode.Parse(@"{ ""name"": ""AltId1"", ""in"": ""path"", @@ -368,7 +345,7 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() }"); Assert.True(JsonNode.DeepEquals(expected1, json1)); - var json2 = JsonNode.Parse(altParameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json2 = JsonNode.Parse(await altParameter2.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expected2 = JsonNode.Parse(@"{ ""name"": ""AltId2"", ""in"": ""path"", @@ -385,7 +362,7 @@ public void CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks() [Theory] [InlineData(true)] [InlineData(false)] - public void CreateOrderByAndSelectAndExpandParametersWorks(bool useStringArrayForQueryOptionsSchema) + public async Task CreateOrderByAndSelectAndExpandParametersWorks(bool useStringArrayForQueryOptionsSchema) { // Arrange IEdmModel model = GetEdmModel(); @@ -405,34 +382,34 @@ public void CreateOrderByAndSelectAndExpandParametersWorks(bool useStringArrayFo ""ID"", ""ID desc"" ],"; - VerifyCreateOrderByParameter(entitySet, context, orderByItemsText); - VerifyCreateOrderByParameter(singleton, context); - VerifyCreateOrderByParameter(navigationProperty, context); + await VerifyCreateOrderByParameter(entitySet, context, orderByItemsText); + await VerifyCreateOrderByParameter(singleton, context); + await VerifyCreateOrderByParameter(navigationProperty, context); // Select string selectItemsText = useStringArrayForQueryOptionsSchema ? null : @"""enum"": [ ""ID"", ""Addresses"" ],"; - VerifyCreateSelectParameter(entitySet, context, selectItemsText); - VerifyCreateSelectParameter(singleton, context); - VerifyCreateSelectParameter(navigationProperty, context); + await VerifyCreateSelectParameter(entitySet, context, selectItemsText); + await VerifyCreateSelectParameter(singleton, context); + await VerifyCreateSelectParameter(navigationProperty, context); // Expand string expandItemsText = useStringArrayForQueryOptionsSchema ? null : @"""enum"": [ ""*"", ""Addresses"" ],"; - VerifyCreateExpandParameter(entitySet, context, expandItemsText); + await VerifyCreateExpandParameter(entitySet, context, expandItemsText); string expandItemsDefaultText = useStringArrayForQueryOptionsSchema ? null : @"""enum"": [ ""*"" ],"; - VerifyCreateExpandParameter(singleton, context, expandItemsDefaultText); - VerifyCreateExpandParameter(navigationProperty, context, expandItemsDefaultText); + await VerifyCreateExpandParameter(singleton, context, expandItemsDefaultText); + await VerifyCreateExpandParameter(navigationProperty, context, expandItemsDefaultText); } - private void VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext context, string orderByItemsText = null) + private static async Task VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext context, string orderByItemsText = null) { // Arrange & Act OpenApiParameter parameter; @@ -459,7 +436,7 @@ private void VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext c // Assert Assert.NotNull(parameter); - var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedJson = JsonNode.Parse($@"{{ ""name"": ""$orderby"", ""in"": ""query"", @@ -478,7 +455,7 @@ private void VerifyCreateOrderByParameter(IEdmElement edmElement, ODataContext c Assert.True(JsonNode.DeepEquals(expectedJson, json)); } - private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext context, string selectItemsText = null) + private static async Task VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext context, string selectItemsText = null) { // Arrange & Act OpenApiParameter parameter; @@ -505,7 +482,7 @@ private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext co // Assert Assert.NotNull(parameter); - var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedJson = JsonNode.Parse($@"{{ ""name"": ""$select"", ""in"": ""query"", @@ -523,7 +500,7 @@ private void VerifyCreateSelectParameter(IEdmElement edmElement, ODataContext co Assert.True(JsonNode.DeepEquals(expectedJson, json)); } - private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext context, string expandItemsText) + private static async Task VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext context, string expandItemsText) { // Arrange & Act OpenApiParameter parameter; @@ -545,7 +522,7 @@ private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext co // Assert Assert.NotNull(parameter); - var json = JsonNode.Parse(parameter.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await parameter.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedJson = expandItemsText == null ? $@"{{ @@ -583,7 +560,7 @@ private void VerifyCreateExpandParameter(IEdmElement edmElement, ODataContext co } [Fact] - public void CreateParametersWorks() + public async Task CreateParametersWorks() { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -616,7 +593,7 @@ public void CreateParametersWorks() Assert.Equal(4, parameters3.Count); var parameter3 = parameters3.First(); - var json1 = JsonNode.Parse(parameter1.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json1 = JsonNode.Parse(await parameter1.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedPayload1 = JsonNode.Parse($@"{{ ""name"": ""ids"", ""in"": ""path"", @@ -635,7 +612,7 @@ public void CreateParametersWorks() }}"); Assert.True(JsonNode.DeepEquals(expectedPayload1, json1)); - var json2 = JsonNode.Parse(parameter2.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json2 = JsonNode.Parse(await parameter2.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedPayload2 = JsonNode.Parse($@"{{ ""name"": ""resource"", ""in"": ""path"", @@ -647,7 +624,7 @@ public void CreateParametersWorks() }}"); Assert.True(JsonNode.DeepEquals(expectedPayload2, json2)); - var json3 = JsonNode.Parse(parameter3.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json3 = JsonNode.Parse(await parameter3.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); var expectedPayload3 = JsonNode.Parse($@"{{ ""name"": ""directoryScopeId"", ""in"": ""query"", diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index d0453a8be..d9a5137a2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -6,6 +6,7 @@ using System; using System.Linq; using System.Text.Json.Nodes; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -97,7 +98,7 @@ public void CreateRequestBodyForActionImportReturnCorrectRequestBody() } [Fact] - public void CanSerializeAsJsonFromTheCreatedRequestBody() + public async Task CanSerializeAsJsonFromTheCreatedRequestBody() { // Arrange ODataContext context = new ODataContext(_model); @@ -106,7 +107,7 @@ public void CanSerializeAsJsonFromTheCreatedRequestBody() var requestBody = context.CreateRequestBody(_actionImport, new()); // Assert - string json = requestBody.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await requestBody.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); var expectedJson = @"{ ""description"": ""Action parameters"", ""content"": { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index c173be0bb..d16849ea5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -12,6 +12,7 @@ using Xunit; using Microsoft.OpenApi.OData.Edm; using System.Text.Json.Nodes; +using System.Threading.Tasks; namespace Microsoft.OpenApi.OData.Generator.Tests { @@ -95,7 +96,7 @@ public void CreateResponsesReturnsCreatedResponses() } [Fact] - public void CanSerializeAsJsonFromTheCreatedResponses() + public async Task CanSerializeAsJsonFromTheCreatedResponses() { // Arrange IEdmModel model = EdmCoreModel.Instance; @@ -107,7 +108,7 @@ public void CanSerializeAsJsonFromTheCreatedResponses() // Assert var response = responses["error"]; Assert.NotNull(response); - string json = response.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await response.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); var expectedJson = @"{ ""description"": ""error"", @@ -341,7 +342,7 @@ public void CreateResponseForEdmActionWhenErrorResponsesAsDefaultIsSet(string ac [Theory] [InlineData(true)] [InlineData(false)] - public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableOdataAnnotationRef) + public async Task CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableOdataAnnotationRef) { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -356,7 +357,7 @@ public void CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool enableO o.Parameters.First().Type.FullName() == "Collection(microsoft.graph.application)"); Assert.NotNull(operation); // guard OpenApiResponses responses = context.CreateResponses(operation, new()); - string json = responses.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await responses.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(responses); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index c8a3f9e89..fbf6ed49b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -6,6 +6,7 @@ using System; using System.Linq; using System.Text.Json.Nodes; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -172,7 +173,7 @@ public void CreateStructuredTypeSchemaThrowArgumentNullEnumType() } [Fact] - public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabledReturnsCorrectSchema() + public async Task CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabledReturnsCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -190,7 +191,7 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabled // Act var schema = context.CreateStructuredTypeSchema(entity, new()); var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity, new()); - var json = JsonNode.Parse(schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // Assert Assert.True(derivedSchema.AllOf.FirstOrDefault(x => derivedType.Equals(x.Title))?.Properties.ContainsKey("@odata.type")); @@ -264,7 +265,7 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueEnabled [Theory] [InlineData(true)] [InlineData(false)] - public void CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValueEnabledReturnsCorrectSchema(bool enableTypeDisambiguationForOdataTypePropertyDefaultValue) + public async Task CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValueEnabledReturnsCorrectSchema(bool enableTypeDisambiguationForOdataTypePropertyDefaultValue) { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -279,7 +280,7 @@ public void CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValueEnable // Act var schema = context.CreateStructuredTypeSchema(complex, new()); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -347,7 +348,7 @@ public void CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValueEnable } [Fact] - public void CreateStructuredTypePropertiesSchemaWithCustomAttributeReturnsCorrectSchema() + public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturnsCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -358,7 +359,7 @@ public void CreateStructuredTypePropertiesSchemaWithCustomAttributeReturnsCorrec // Act OpenApiSchema schema = context.CreateStructuredTypeSchema(entity, new()); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -438,7 +439,7 @@ public void CreateStructuredTypePropertiesSchemaWithCustomAttributeReturnsCorrec } [Fact] - public void CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() + public async Task CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; @@ -464,7 +465,7 @@ public void CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() Assert.Equal("Address", schema.Title); // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -490,7 +491,7 @@ public void CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() } [Fact] - public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() + public async Task CreateComplexTypeWithBaseSchemaReturnCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; @@ -538,7 +539,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("Tree", declaredSchema.Title); // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -582,7 +583,7 @@ public void CreateComplexTypeWithBaseSchemaReturnCorrectSchema() } [Fact] - public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() + public async Task CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; @@ -608,7 +609,7 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() Assert.Equal("Zoo", schema.Title); // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -643,7 +644,7 @@ public void CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() } [Fact] - public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() + public async Task CreateEntityTypeWithBaseSchemaReturnCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; @@ -689,7 +690,7 @@ public void CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("Human", declaredSchema.Title); // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); _output.WriteLine(json); // Assert Assert.NotNull(json); @@ -766,7 +767,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() [Theory] [InlineData(true)] [InlineData(false)] - public void CreateStructuredTypeSchemaForEntityTypeWithDefaultValueForOdataTypePropertyEnabledOrDisabledReturnsCorrectSchema(bool enableTypeDisambiguationForOdataTypePropertyDefaultValue) + public async Task CreateStructuredTypeSchemaForEntityTypeWithDefaultValueForOdataTypePropertyEnabledOrDisabledReturnsCorrectSchema(bool enableTypeDisambiguationForOdataTypePropertyDefaultValue) { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -781,7 +782,7 @@ public void CreateStructuredTypeSchemaForEntityTypeWithDefaultValueForOdataTypeP // Act var schema = context.CreateStructuredTypeSchema(entityType, new()); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -812,7 +813,7 @@ public void CreateEnumTypeSchemaThrowArgumentNullEnumType() } [Fact] - public void CreateEnumTypeSchemaReturnCorrectSchema() + public async Task CreateEnumTypeSchemaReturnCorrectSchema() { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; @@ -834,7 +835,7 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() Assert.Equal([ "Blue", "White" ], schema.Enum.Select(e => e.ToString())); // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.NotNull(json); @@ -854,7 +855,7 @@ public void CreateEnumTypeSchemaReturnCorrectSchema() [Theory] [InlineData(OpenApiSpecVersion.OpenApi2_0)] [InlineData(OpenApiSpecVersion.OpenApi3_0)] - public void CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSpecVersion specVersion) + public async Task CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; @@ -869,7 +870,7 @@ public void CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSp // Act var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(specVersion); + string json = await schema.SerializeAsJsonAsync(specVersion); // Assert @@ -890,7 +891,7 @@ public void CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(OpenApiSp [Theory] [InlineData(OpenApiSpecVersion.OpenApi3_0)] [InlineData(OpenApiSpecVersion.OpenApi2_0)] - public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecVersion specVersion) + public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.BasicEdmModel; @@ -899,13 +900,13 @@ public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecV context.Settings.OpenApiSpecVersion = specVersion; IEdmEnumType enumType = model.SchemaElements.OfType().First(e => e.Name == "Color"); - EdmEntityType entitType = new EdmEntityType("NS", "Entity"); - IEdmProperty property = new EdmStructuralProperty(entitType, "ColorEnumValue", new EdmEnumTypeReference(enumType, true), "yellow"); + EdmEntityType entityType = new EdmEntityType("NS", "Entity"); + IEdmProperty property = new EdmStructuralProperty(entityType, "ColorEnumValue", new EdmEnumTypeReference(enumType, true), "yellow"); // Act var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); - string json = schema.SerializeAsJson(specVersion); + string json = await schema.SerializeAsJsonAsync(specVersion); _output.WriteLine(json); // Assert @@ -935,7 +936,7 @@ public void CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecV [Theory] [InlineData(OpenApiSpecVersion.OpenApi3_0)] [InlineData(OpenApiSpecVersion.OpenApi2_0)] - public void CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema(OpenApiSpecVersion specVersion) + public async Task CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema(OpenApiSpecVersion specVersion) { // Arrange IEdmModel model = EdmModelHelper.GraphBetaModel; @@ -949,7 +950,7 @@ public void CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema(OpenA // Act var schema = context.CreatePropertySchema(property, new()); Assert.NotNull(schema); - var json = JsonNode.Parse(schema.SerializeAsJson(specVersion)); + var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(specVersion)); // Assert if (specVersion == OpenApiSpecVersion.OpenApi2_0) @@ -1014,7 +1015,7 @@ public void GetDerivedTypesReferenceSchemaReturnsNullSchemaIfNotExist() #endregion [Fact] - public void NonNullableBooleanPropertyWithDefaultValueWorks() + public async Task NonNullableBooleanPropertyWithDefaultValueWorks() { // Arrange ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); @@ -1029,7 +1030,7 @@ public void NonNullableBooleanPropertyWithDefaultValueWorks() Assert.NotNull(schema); Assert.Equal(JsonSchemaType.Boolean, schema.Type); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""type"": ""boolean"", ""default"": false @@ -1037,7 +1038,7 @@ public void NonNullableBooleanPropertyWithDefaultValueWorks() } [Fact] - public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() + public async Task NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() { // Arrange ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); @@ -1054,7 +1055,7 @@ public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() Assert.NotNull(schema); Assert.Equal(JsonSchemaType.String, schema.Type); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maxLength"": 44, ""type"": ""string"", @@ -1064,7 +1065,7 @@ public void NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks() } [Fact] - public void NonNullableIntegerPropertyWithDefaultValueWorks() + public async Task NonNullableIntegerPropertyWithDefaultValueWorks() { // Arrange ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); @@ -1079,7 +1080,7 @@ public void NonNullableIntegerPropertyWithDefaultValueWorks() Assert.NotNull(schema); Assert.Equal(JsonSchemaType.Number, schema.Type); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""maximum"": 2147483647, ""minimum"": -2147483648, @@ -1090,7 +1091,7 @@ public void NonNullableIntegerPropertyWithDefaultValueWorks() } [Fact] - public void NonNullableDoublePropertyWithDefaultStringWorks() + public async Task NonNullableDoublePropertyWithDefaultStringWorks() { // Arrange ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); @@ -1105,7 +1106,7 @@ public void NonNullableDoublePropertyWithDefaultStringWorks() Assert.NotNull(schema); Assert.Null(schema.Type); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ ""oneOf"": [ @@ -1128,7 +1129,7 @@ public void NonNullableDoublePropertyWithDefaultStringWorks() [Fact] - public void NonNullableUntypedPropertyWorks() + public async Task NonNullableUntypedPropertyWorks() { ODataContext context = new ODataContext( EdmModelHelper.BasicEdmModel, @@ -1147,7 +1148,7 @@ public void NonNullableUntypedPropertyWorks() Assert.NotNull(schema); Assert.Null(schema.Type); - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Equal("{ }", json); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs index f62b54115..dff2f3cba 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs @@ -15,13 +15,14 @@ using Microsoft.OpenApi.OData.Generator; using Xunit; using System.Text.Json.Nodes; +using System.Threading.Tasks; namespace Microsoft.OpenApi.OData.Tests { public class OpenApiSecuritySchemeGeneratorTest { [Fact] - public void CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() + public async Task CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() { // Arrange ODataContext context = new ODataContext(GetEdmModel()); @@ -40,7 +41,7 @@ public void CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() Assert.Equal("http://TokenUrl", scheme.Flows.ClientCredentials.TokenUrl.OriginalString); Assert.Equal("http://RefreshUrl", scheme.Flows.ClientCredentials.RefreshUrl.OriginalString); Assert.Equal("OAuth2ClientCredentials Description", scheme.Description); - string json = scheme.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await scheme.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); var expectedJson = JsonNode.Parse(@"{ ""type"": ""oauth2"", ""description"": ""OAuth2ClientCredentials Description"", @@ -58,7 +59,7 @@ public void CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContainer() scheme = schemes["Http Name"]; Assert.Equal(SecuritySchemeType.Http, scheme.Type); - json = scheme.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + json = await scheme.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); expectedJson = JsonNode.Parse(@"{ ""type"": ""http"", ""description"": ""Http Description"", diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs index e1b9f42d2..7699e3d27 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.OData.Edm; @@ -82,14 +83,14 @@ public void CreateSpatialSchemasReturnFullSpatialSchemasForModelWithEdmSpatialTy } [Fact] - public void CreateEdmGeographySchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographySchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographySchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -98,14 +99,14 @@ public void CreateEdmGeographySchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyPointSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyPointSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPointSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -114,14 +115,14 @@ public void CreateEdmGeographyPointSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyLineStringSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -130,14 +131,14 @@ public void CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPolygonSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -146,14 +147,14 @@ public void CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPointSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -162,14 +163,14 @@ public void CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiLineStringSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -178,14 +179,14 @@ public void CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPolygonSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -194,14 +195,14 @@ public void CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyCollectionSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -210,14 +211,14 @@ public void CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometrySchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometrySchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometrySchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -249,14 +250,14 @@ public void CreateEdmGeometrySchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml + public async Task CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPointSchema(new()); Assert.NotNull(schema); // guard // Act - string yaml = schema.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0); + string yaml = await schema.SerializeAsYamlAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal( @@ -275,14 +276,14 @@ public void CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml } [Fact] - public void CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryLineStringSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -309,14 +310,14 @@ public void CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPolygonSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -346,14 +347,14 @@ public void CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPointSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -379,14 +380,14 @@ public void CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test yaml + public async Task CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test yaml { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiLineStringSchema(new()); Assert.NotNull(schema); // guard // Act - string yaml = schema.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0); + string yaml = await schema.SerializeAsYamlAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"required: @@ -407,14 +408,14 @@ public void CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test } [Fact] - public void CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPolygonSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -447,14 +448,14 @@ public void CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() } [Fact] - public void CreateEdmGeometryCollectionSchemaSerializeAsJsonWorks() + public async Task CreateEdmGeometryCollectionSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryCollectionSchema(new()); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ @@ -480,14 +481,14 @@ public void CreateEdmGeometryCollectionSchemaSerializeAsJsonWorks() } [Fact] - public void CreateGeoJSON_PositionSchemaSerializeAsJsonWorks() + public async Task CreateGeoJSON_PositionSchemaSerializeAsJsonWorks() { // Arrange var schema = OpenApiSpatialTypeSchemaGenerator.CreateGeoJsonPointSchema(); Assert.NotNull(schema); // guard // Act - string json = schema.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert Assert.Equal(@"{ diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs index 2ec163ecf..e2c7f4eb1 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -92,7 +93,7 @@ public void CreateOperationForEdmActionImportReturnsCorrectOperationId(bool enab [Theory] [InlineData(true)] [InlineData(false)] - public void OperationRestrictionsTermWorksToCreateOperationForEdmActionImport(bool enableAnnotation) + public async Task OperationRestrictionsTermWorksToCreateOperationForEdmActionImport(bool enableAnnotation) { string template = @" @@ -191,7 +192,7 @@ public void OperationRestrictionsTermWorksToCreateOperationForEdmActionImport(bo { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index 1b9e2bca9..354ef162e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Reflection.Metadata; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -202,7 +203,7 @@ public void CreateOperationForEdmActionWithTypeCastReturnsCorrectOperationId(boo [Theory] [InlineData(true)] [InlineData(false)] - public void OperationRestrictionsTermWorksToCreateOperationForEdmAction(bool enableAnnotation) + public async Task OperationRestrictionsTermWorksToCreateOperationForEdmAction(bool enableAnnotation) { string template = @" @@ -286,7 +287,7 @@ public void OperationRestrictionsTermWorksToCreateOperationForEdmAction(bool ena { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index 94ca18074..5f53b903a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -161,7 +162,7 @@ public void CreateOperationIdWithSHA5ForOverloadEdmFunctionImport(bool enableOpe [Theory] [InlineData(true)] [InlineData(false)] - public void OperationRestrictionsTermWorksToCreateOperationForEdmFunctionImport(bool enableAnnotation) + public async Task OperationRestrictionsTermWorksToCreateOperationForEdmFunctionImport(bool enableAnnotation) { string template = @" @@ -275,7 +276,7 @@ public void OperationRestrictionsTermWorksToCreateOperationForEdmFunctionImport( { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index cbe6a251d..bd9e1c93d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -404,7 +405,7 @@ public void CreateOperationForComposableOverloadEdmFunctionReturnsCorrectOperati [Theory] [InlineData(true)] [InlineData(false)] - public void OperationRestrictionsTermWorksToCreateOperationForEdmFunction(bool enableAnnotation) + public async Task OperationRestrictionsTermWorksToCreateOperationForEdmFunction(bool enableAnnotation) { string template = @" @@ -489,7 +490,7 @@ public void OperationRestrictionsTermWorksToCreateOperationForEdmFunction(bool e { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index 24293e8ad..fa22e1cd7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -72,7 +73,7 @@ public void CreateEntityDeleteOperationReturnsCorrectOperation(bool enableOperat [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntityDeleteReturnsSecurityForDeleteRestrictions(bool enableAnnotation) + public async Task CreateEntityDeleteReturnsSecurityForDeleteRestrictions(bool enableAnnotation) { string annotation = @" @@ -148,7 +149,7 @@ public void CreateEntityDeleteReturnsSecurityForDeleteRestrictions(bool enableAn { Assert.Equal(2, delete.Security.Count); - string json = delete.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await delete.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index ef43282cf..a2513a24d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -120,7 +121,7 @@ public void CreateEntityGetOperationReturnsParameterForNavigationRestrictions(bo [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntityGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) + public async Task CreateEntityGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) { string annotation = @" @@ -200,7 +201,7 @@ public void CreateEntityGetOperationReturnsSecurityForReadRestrictions(bool enab { Assert.Equal(2, get.Security.Count); - string json = get.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await get.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index 399c5c8e7..bafaf46f9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -86,7 +87,7 @@ public void CreateEntityPatchOperationReturnsCorrectOperation(bool enableOperati [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntityPatchReturnsSecurityForUpdateRestrictions(bool enableAnnotation) + public async Task CreateEntityPatchReturnsSecurityForUpdateRestrictions(bool enableAnnotation) { string annotation = @" @@ -162,7 +163,7 @@ public void CreateEntityPatchReturnsSecurityForUpdateRestrictions(bool enableAnn { Assert.Equal(2, patch.Security.Count); - string json = patch.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await patch.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index 7ad20bcf4..bf0203af2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -86,7 +87,7 @@ public void CreateEntityPutOperationReturnsCorrectOperation(bool enableOperation [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntityPutReturnsSecurityForUpdateRestrictions(bool enableAnnotation) + public async Task CreateEntityPutReturnsSecurityForUpdateRestrictions(bool enableAnnotation) { string annotation = @" @@ -162,7 +163,7 @@ public void CreateEntityPutReturnsSecurityForUpdateRestrictions(bool enableAnnot { Assert.Equal(2, putOperation.Security.Count); - string json = putOperation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await putOperation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index f21677733..c0ba82a34 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -236,7 +237,7 @@ public void CreateEntitySetGetOperationReturnsParameterForNavigationRestrictions [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntitySetGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) + public async Task CreateEntitySetGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) { string annotation = @" @@ -312,7 +313,7 @@ public void CreateEntitySetGetOperationReturnsSecurityForReadRestrictions(bool e { Assert.Equal(2, get.Security.Count); - string json = get.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await get.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index b4c36ecd9..70d6351cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -13,6 +13,7 @@ using Microsoft.OpenApi.OData.Tests; using Microsoft.OpenApi.OData.Vocabulary.Core; using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Xunit; @@ -131,7 +132,7 @@ private void VerifyEntitySetPostOperation(string annotation, bool enableOperatio [Theory] [InlineData(true)] [InlineData(false)] - public void CreateEntitySetPostReturnsSecurityForInsertRestrictions(bool enableAnnotation) + public async Task CreateEntitySetPostReturnsSecurityForInsertRestrictions(bool enableAnnotation) { string annotation = @" @@ -207,7 +208,7 @@ public void CreateEntitySetPostReturnsSecurityForInsertRestrictions(bool enableA { Assert.Equal(2, post.Security.Count); - string json = post.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await post.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index 0d70083e7..be43ee8d6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -209,7 +210,7 @@ public void CreateNavigationGetOperationViaOverloadedComposableFunctionReturnsCo [Theory] [InlineData(true)] [InlineData(false)] - public void CreateNavigationGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) + public async Task CreateNavigationGetOperationReturnsSecurityForReadRestrictions(bool enableAnnotation) { string annotation = @" @@ -305,7 +306,7 @@ public void CreateNavigationGetOperationReturnsSecurityForReadRestrictions(bool { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index fa61cacda..8c2d845b0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.OData.PathItem.Tests; using Microsoft.OpenApi.OData.Tests; using System.Linq; +using System.Threading.Tasks; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -112,7 +113,7 @@ public void CreateNavigationPatchOperationReturnsCorrectOperationWithAnnotatedRe [Theory] [InlineData(true)] [InlineData(false)] - public void CreateNavigationPatchOperationReturnsSecurityForUpdateRestrictions(bool enableAnnotation) + public async Task CreateNavigationPatchOperationReturnsSecurityForUpdateRestrictions(bool enableAnnotation) { string annotation = @" @@ -210,7 +211,7 @@ public void CreateNavigationPatchOperationReturnsSecurityForUpdateRestrictions(b { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index 3ec42875b..c7cd2c6b4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.OData.PathItem.Tests; using Microsoft.OpenApi.OData.Tests; using System.Linq; +using System.Threading.Tasks; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -130,7 +131,7 @@ public void CreateNavigationPostOperationReturnsCorrectOperationWithAnnotatedReq [Theory] [InlineData(true)] [InlineData(false)] - public void CreateNavigationPostOperationReturnsSecurityForInsertRestrictions(bool enableAnnotation) + public async Task CreateNavigationPostOperationReturnsSecurityForInsertRestrictions(bool enableAnnotation) { string annotation = @" @@ -227,7 +228,7 @@ public void CreateNavigationPostOperationReturnsSecurityForInsertRestrictions(bo { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index 28427dd3b..750390147 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -11,6 +11,7 @@ using Microsoft.OpenApi.OData.PathItem.Tests; using Microsoft.OpenApi.OData.Tests; using System.Linq; +using System.Threading.Tasks; using Xunit; namespace Microsoft.OpenApi.OData.Operation.Tests @@ -90,7 +91,7 @@ public void CreateNavigationPutOperationReturnsCorrectOperation(bool enableOpera [Theory] [InlineData(true)] [InlineData(false)] - public void CreateNavigationPuthOperationReturnsSecurityForUpdateRestrictions(bool enableAnnotation) + public async Task CreateNavigationPuthOperationReturnsSecurityForUpdateRestrictions(bool enableAnnotation) { string annotation = @" @@ -188,7 +189,7 @@ public void CreateNavigationPuthOperationReturnsSecurityForUpdateRestrictions(bo { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index af995a471..1d31f59c2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; @@ -130,7 +131,7 @@ public void CreateSingletonGetOperationReturnsParameterForNavigationRestrictions [Theory] [InlineData(true)] [InlineData(false)] - public void ReadRestrictionsTermWorksToCreateOperationForSingletonGetOperation(bool enableAnnotation) + public async Task ReadRestrictionsTermWorksToCreateOperationForSingletonGetOperation(bool enableAnnotation) { string annotation = @" @@ -212,7 +213,7 @@ public void ReadRestrictionsTermWorksToCreateOperationForSingletonGetOperation(b { Assert.Equal(2, operation.Security.Count); - string json = operation.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await operation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index ebc6a8a08..6791b9147 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Linq; +using System.Threading.Tasks; using Microsoft.OData.Edm; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -91,7 +92,7 @@ public void CreateSingletonPatchOperationReturnsCorrectOperation(bool enableOper [Theory] [InlineData(false)] [InlineData(true)] - public void CreateSingletonPatchOperationReturnsParameterForUpdateRestrictions(bool hasRestriction) + public async Task CreateSingletonPatchOperationReturnsParameterForUpdateRestrictions(bool hasRestriction) { // Arrange string annotation = @" @@ -190,10 +191,10 @@ public void CreateSingletonPatchOperationReturnsParameterForUpdateRestrictions(b "; // Act & Assert - VerifyOperation(annotation, hasRestriction); + await VerifyOperation(annotation, hasRestriction); } - private void VerifyOperation(string annotation, bool hasRestriction) + private async Task VerifyOperation(string annotation, bool hasRestriction) { // Arrange IEdmModel model = CapabilitiesModelHelper.GetEdmModelOutline(hasRestriction ? annotation : ""); @@ -231,7 +232,7 @@ private void VerifyOperation(string annotation, bool hasRestriction) Assert.Equal("authorizationName", securityRequirement.Key.Reference.Id); Assert.Equal(new[] { "scopeName1", "scopeName2" }, securityRequirement.Value); - string json = patch.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0); + string json = await patch.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); Assert.Contains(@" ""security"": [ { diff --git a/tool/UpdateDocs/Program.cs b/tool/UpdateDocs/Program.cs index 174fdd701..43f9938a3 100644 --- a/tool/UpdateDocs/Program.cs +++ b/tool/UpdateDocs/Program.cs @@ -10,15 +10,15 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Csdl; using Microsoft.OpenApi; -using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData; using Microsoft.OpenApi.Extensions; +using System.Threading.Tasks; namespace UpdateDocs { class Program { - static int Main(string[] args) + static async Task Main(string[] args) { // we assume the path are existed for simplicity. string path = Directory.GetCurrentDirectory(); @@ -30,7 +30,7 @@ static int Main(string[] args) { Console.WriteLine(filePath); - IEdmModel model = LoadEdmModel(filePath); + IEdmModel model = await LoadEdmModelAsync(filePath); if (model == null) { continue; @@ -51,28 +51,14 @@ static int Main(string[] args) settings.ServiceRoot = new Uri("https://graph.microsoft.com/v1.0"); } - OpenApiDocument document = model.ConvertToOpenApi(settings); - - string output;/* = oas20 + "/" + fileName + ".yaml"; - File.WriteAllText(output, document.SerializeAsYaml(OpenApiSpecVersion.OpenApi2_0)); - - output = oas20 + "/" + fileName + ".json"; - File.WriteAllText(output, document.SerializeAsJson(OpenApiSpecVersion.OpenApi2_0)); - - output = oas30 + "/" + fileName + ".yaml"; - File.WriteAllText(output, document.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0)); - - output = oas30 + "/" + fileName + ".json"; - File.WriteAllText(output, document.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); - */ settings.EnableKeyAsSegment = true; settings.EnableUnqualifiedCall = true; - output = oas30 + "/" + fileName + ".json"; - document = model.ConvertToOpenApi(settings); - File.WriteAllText(output, document.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0)); + var output = oas30 + "/" + fileName + ".json"; + var document = model.ConvertToOpenApi(settings); + await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); output = oas20 + "/" + fileName + ".json"; - File.WriteAllText(output, document.SerializeAsJson(OpenApiSpecVersion.OpenApi2_0)); + await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi2_0)); Console.WriteLine("Output [ " + fileName + " ] Successful!"); } @@ -81,11 +67,11 @@ static int Main(string[] args) return 0; } - public static IEdmModel LoadEdmModel(string file) + private static async Task LoadEdmModelAsync(string file) { try { - string csdl = File.ReadAllText(file); + string csdl = await File.ReadAllTextAsync(file); return CsdlReader.Parse(XElement.Parse(csdl).CreateReader()); } catch From 718d02faf4be1e1c3c33d10c2bbbab0df003d6cf Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 20 Jan 2025 15:32:57 -0500 Subject: [PATCH 075/103] chore: updates 3.1 integration test documents with latest fixes Signed-off-by: Vincent Biret --- .../Multiple.Schema.OpenApi.V3.1.json | 14 ++++- .../Multiple.Schema.OpenApi.V3.1.yaml | 10 +++- .../Resources/TripService.OpenApi.V3.1.json | 60 +++++++++++++------ .../Resources/TripService.OpenApi.V3.1.yaml | 48 +++++++++------ 4 files changed, 90 insertions(+), 42 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json index dc276bab4..06b33b220 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json @@ -663,7 +663,7 @@ "description": "Provides operations to call the Upload method.", "post": { "tags": [ - "Documents.DocumentDto" + "Documents.DocumentDto.Actions" ], "summary": "Invoke action Upload", "operationId": "Documents.DocumentDto.Upload", @@ -3940,7 +3940,7 @@ "description": "Provides operations to call the Upload method.", "post": { "tags": [ - "Tasks.DocumentDto" + "Tasks.DocumentDto.Actions" ], "summary": "Invoke action Upload", "operationId": "Tasks.DocumentDto.Upload", @@ -7763,6 +7763,10 @@ "name": "Documents.DocumentDto", "x-ms-docs-toc-type": "page" }, + { + "name": "Documents.DocumentDto.Actions", + "x-ms-docs-toc-type": "container" + }, { "name": "Documents.RevisionDto", "x-ms-docs-toc-type": "page" @@ -7803,6 +7807,10 @@ "name": "Tasks.DocumentDto", "x-ms-docs-toc-type": "page" }, + { + "name": "Tasks.DocumentDto.Actions", + "x-ms-docs-toc-type": "container" + }, { "name": "Tasks.RevisionDto", "x-ms-docs-toc-type": "page" @@ -7812,4 +7820,4 @@ "x-ms-docs-toc-type": "page" } ] -} +} \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml index b3d276f4e..627c61ea0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml @@ -460,7 +460,7 @@ paths: description: Provides operations to call the Upload method. post: tags: - - Documents.DocumentDto + - Documents.DocumentDto.Actions summary: Invoke action Upload operationId: Documents.DocumentDto.Upload parameters: @@ -2771,7 +2771,7 @@ paths: description: Provides operations to call the Upload method. post: tags: - - Tasks.DocumentDto + - Tasks.DocumentDto.Actions summary: Invoke action Upload operationId: Tasks.DocumentDto.Upload parameters: @@ -5538,6 +5538,8 @@ tags: x-ms-docs-toc-type: page - name: Documents.DocumentDto x-ms-docs-toc-type: page + - name: Documents.DocumentDto.Actions + x-ms-docs-toc-type: container - name: Documents.RevisionDto x-ms-docs-toc-type: page - name: Documents.DocumentTagRelDto @@ -5558,7 +5560,9 @@ tags: x-ms-docs-toc-type: page - name: Tasks.DocumentDto x-ms-docs-toc-type: page + - name: Tasks.DocumentDto.Actions + x-ms-docs-toc-type: container - name: Tasks.RevisionDto x-ms-docs-toc-type: page - name: Tasks.DocumentTagRelDto - x-ms-docs-toc-type: page + x-ms-docs-toc-type: page \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json index 1adf625b1..ba34c5169 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json @@ -8418,7 +8418,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "Me.Person" + "Me.Person.Functions" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "Me.GetFavoriteAirline", @@ -8444,7 +8444,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "Me.Person" + "Me.Person.Functions" ], "summary": "Invoke function GetFriendsTrips", "operationId": "Me.GetFriendsTrips", @@ -8538,7 +8538,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "Me.Person" + "Me.Person.Actions" ], "summary": "Invoke action GetPeersForTrip", "operationId": "Me.GetPeersForTrip", @@ -11870,7 +11870,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "Me.Person" + "Me.Person.Actions" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -12808,7 +12808,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "Me.Person" + "Me.Person.Actions" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -12838,7 +12838,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "Me.Person" + "Me.Person.Functions" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "Me.UpdatePersonLastName", @@ -17043,7 +17043,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Functions" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "NewComePeople.Person.GetFavoriteAirline", @@ -17074,7 +17074,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Functions" ], "summary": "Invoke function GetFriendsTrips", "operationId": "NewComePeople.Person.GetFriendsTrips", @@ -17178,7 +17178,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Actions" ], "summary": "Invoke action GetPeersForTrip", "operationId": "NewComePeople.Person.GetPeersForTrip", @@ -17212,7 +17212,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Actions" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -17270,7 +17270,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Actions" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -17305,7 +17305,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "NewComePeople.Person" + "NewComePeople.Person.Functions" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "NewComePeople.Person.UpdatePersonLastName", @@ -26942,7 +26942,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "People.Person" + "People.Person.Functions" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "People.Person.GetFavoriteAirline", @@ -26980,7 +26980,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "People.Person" + "People.Person.Functions" ], "summary": "Invoke function GetFriendsTrips", "operationId": "People.Person.GetFriendsTrips", @@ -27084,7 +27084,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "People.Person" + "People.Person.Actions" ], "summary": "Invoke action GetPeersForTrip", "operationId": "People.Person.GetPeersForTrip", @@ -31142,7 +31142,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "People.Person" + "People.Person.Actions" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -32224,7 +32224,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "People.Person" + "People.Person.Actions" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -32266,7 +32266,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "People.Person" + "People.Person.Functions" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "People.Person.UpdatePersonLastName", @@ -35613,6 +35613,14 @@ "name": "Me.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, + { + "name": "Me.Person.Functions", + "x-ms-docs-toc-type": "container" + }, + { + "name": "Me.Person.Actions", + "x-ms-docs-toc-type": "container" + }, { "name": "NewComePeople.Person", "x-ms-docs-toc-type": "page" @@ -35625,6 +35633,14 @@ "name": "NewComePeople.Person.Location", "x-ms-docs-toc-type": "page" }, + { + "name": "NewComePeople.Person.Functions", + "x-ms-docs-toc-type": "container" + }, + { + "name": "NewComePeople.Person.Actions", + "x-ms-docs-toc-type": "container" + }, { "name": "NewComePeople.Trip", "x-ms-docs-toc-type": "page" @@ -35653,6 +35669,14 @@ "name": "People.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, + { + "name": "People.Person.Functions", + "x-ms-docs-toc-type": "container" + }, + { + "name": "People.Person.Actions", + "x-ms-docs-toc-type": "container" + }, { "name": "ResetDataSource", "x-ms-docs-toc-type": "container" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml index 84bf69eba..185ff5d35 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml @@ -5635,7 +5635,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - Me.Person + - Me.Person.Functions summary: Invoke function GetFavoriteAirline operationId: Me.GetFavoriteAirline responses: @@ -5654,7 +5654,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - Me.Person + - Me.Person.Functions summary: Invoke function GetFriendsTrips operationId: Me.GetFriendsTrips parameters: @@ -5715,7 +5715,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - Me.Person + - Me.Person.Actions summary: Invoke action GetPeersForTrip operationId: Me.GetPeersForTrip requestBody: @@ -7959,7 +7959,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - Me.Person + - Me.Person.Actions summary: Invoke action Hire description: Hires someone for the company. operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -8599,7 +8599,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - Me.Person + - Me.Person.Actions summary: Invoke action ShareTrip description: Details of the shared trip. operationId: Me.ShareTrip @@ -8621,7 +8621,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - Me.Person + - Me.Person.Functions summary: Invoke function UpdatePersonLastName operationId: Me.UpdatePersonLastName parameters: @@ -11425,7 +11425,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - NewComePeople.Person + - NewComePeople.Person.Functions summary: Invoke function GetFavoriteAirline operationId: NewComePeople.Person.GetFavoriteAirline parameters: @@ -11446,7 +11446,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - NewComePeople.Person + - NewComePeople.Person.Functions summary: Invoke function GetFriendsTrips operationId: NewComePeople.Person.GetFriendsTrips parameters: @@ -11514,7 +11514,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - NewComePeople.Person + - NewComePeople.Person.Actions summary: Invoke action GetPeersForTrip operationId: NewComePeople.Person.GetPeersForTrip parameters: @@ -11537,7 +11537,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - NewComePeople.Person + - NewComePeople.Person.Actions summary: Invoke action Hire description: Hires someone for the company. operationId: NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -11573,7 +11573,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - NewComePeople.Person + - NewComePeople.Person.Actions summary: Invoke action ShareTrip description: Details of the shared trip. operationId: NewComePeople.Person.ShareTrip @@ -11597,7 +11597,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - NewComePeople.Person + - NewComePeople.Person.Functions summary: Invoke function UpdatePersonLastName operationId: NewComePeople.Person.UpdatePersonLastName parameters: @@ -18113,7 +18113,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - People.Person + - People.Person.Functions summary: Invoke function GetFavoriteAirline operationId: People.Person.GetFavoriteAirline parameters: @@ -18140,7 +18140,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - People.Person + - People.Person.Functions summary: Invoke function GetFriendsTrips operationId: People.Person.GetFriendsTrips parameters: @@ -18208,7 +18208,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - People.Person + - People.Person.Actions summary: Invoke action GetPeersForTrip operationId: People.Person.GetPeersForTrip parameters: @@ -20953,7 +20953,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - People.Person + - People.Person.Actions summary: Invoke action Hire description: Hires someone for the company. operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -21693,7 +21693,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - People.Person + - People.Person.Actions summary: Invoke action ShareTrip description: Details of the shared trip. operationId: People.Person.ShareTrip @@ -21723,7 +21723,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - People.Person + - People.Person.Functions summary: Invoke function UpdatePersonLastName operationId: People.Person.UpdatePersonLastName parameters: @@ -23899,12 +23899,20 @@ tags: x-ms-docs-toc-type: page - name: Me.Trips.PlanItem x-ms-docs-toc-type: page + - name: Me.Person.Functions + x-ms-docs-toc-type: container + - name: Me.Person.Actions + x-ms-docs-toc-type: container - name: NewComePeople.Person x-ms-docs-toc-type: page - name: NewComePeople.Location x-ms-docs-toc-type: page - name: NewComePeople.Person.Location x-ms-docs-toc-type: page + - name: NewComePeople.Person.Functions + x-ms-docs-toc-type: container + - name: NewComePeople.Person.Actions + x-ms-docs-toc-type: container - name: NewComePeople.Trip x-ms-docs-toc-type: page - name: NewComePeople.Trips.PlanItem @@ -23919,5 +23927,9 @@ tags: x-ms-docs-toc-type: page - name: People.Trips.PlanItem x-ms-docs-toc-type: page + - name: People.Person.Functions + x-ms-docs-toc-type: container + - name: People.Person.Actions + x-ms-docs-toc-type: container - name: ResetDataSource x-ms-docs-toc-type: container \ No newline at end of file From 6c21a4368bac19aec6516b949f3d0b85b902ec2b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 08:13:33 -0500 Subject: [PATCH 076/103] chore: bumps to latest oai.net preview --- .../Microsoft.OpenAPI.OData.Reader.csproj | 2 +- src/OoasGui/OoasGui.csproj | 2 +- .../Microsoft.OpenAPI.OData.Reader.Tests.csproj | 6 +++++- tool/UpdateDocs/UpdateDocs.csproj | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) 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 c947f74dc..052fc0b97 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -54,7 +54,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/OoasGui/OoasGui.csproj b/src/OoasGui/OoasGui.csproj index 6489d12d2..9b96180cb 100644 --- a/src/OoasGui/OoasGui.csproj +++ b/src/OoasGui/OoasGui.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index 4389d026a..c6624f431 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -89,7 +89,7 @@ all - + all @@ -97,4 +97,8 @@ + + + + diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj index 1772b839f..8d619f751 100644 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ b/tool/UpdateDocs/UpdateDocs.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file From e9d9487f61df044bcd351cf26b2b22d6906cd704 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 08:41:04 -0500 Subject: [PATCH 077/103] fix: missing references to document Signed-off-by: Vincent Biret --- .../Common/OpenApiOperationExtensions.cs | 14 +++--- .../Generator/OpenApiResponseGenerator.cs | 45 +++++++++++-------- .../OpenApiSecurityRequirementGenerator.cs | 31 ++----------- .../ComplexPropertyGetOperationHandler.cs | 4 +- .../ComplexPropertyPostOperationHandler.cs | 4 +- .../ComplexPropertyUpdateOperationHandler.cs | 4 +- .../DollarCountGetOperationHandler.cs | 4 +- .../EdmOperationImportOperationHandler.cs | 2 +- .../Operation/EdmOperationOperationHandler.cs | 2 +- .../Operation/EntityDeleteOperationHandler.cs | 4 +- .../Operation/EntityGetOperationHandler.cs | 4 +- .../Operation/EntitySetGetOperationHandler.cs | 6 +-- .../EntitySetPostOperationHandler.cs | 4 +- .../Operation/EntityUpdateOperationHandler.cs | 4 +- .../MediaEntityDeleteOperationHandler.cs | 4 +- .../MediaEntityGetOperationHandler.cs | 4 +- .../MediaEntityPutOperationHandler.cs | 6 +-- .../Operation/MetadataGetOperationHandler.cs | 2 +- ...avigationPropertyDeleteOperationHandler.cs | 4 +- .../NavigationPropertyGetOperationHandler.cs | 6 +-- .../NavigationPropertyPostOperationHandler.cs | 4 +- ...avigationPropertyUpdateOperationHandler.cs | 4 +- .../ODataTypeCastGetOperationHandler.cs | 4 +- .../Operation/OperationHandler.cs | 2 +- .../Operation/RefDeleteOperationHandler.cs | 4 +- .../Operation/RefGetOperationHandler.cs | 6 +-- .../Operation/RefPostOperationHandler.cs | 4 +- .../Operation/RefPutOperationHandler.cs | 4 +- .../Operation/SingletonGetOperationHandler.cs | 4 +- .../SingletonPatchOperationHandler.cs | 4 +- .../Common/OpenApiOperationExtensionsTests.cs | 2 +- .../OpenApiResponseGeneratorTests.cs | 4 +- 32 files changed, 95 insertions(+), 109 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs index 3eb561308..b0502dd4d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs @@ -22,10 +22,12 @@ public static class OpenApiOperationExtensions /// The settings. /// Optional: Whether to add a 204 no content response. /// Optional: The OpenAPI schema of the response. - public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, bool addNoContent = false, OpenApiSchema schema = null) + /// The OpenAPI document to lookup references. + public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, OpenApiDocument document, bool addNoContent = false, OpenApiSchema schema = null) { Utils.CheckArgumentNull(operation, nameof(operation)); Utils.CheckArgumentNull(settings, nameof(settings)); + Utils.CheckArgumentNull(document, nameof(document)); if (operation.Responses == null) { @@ -54,22 +56,22 @@ public static void AddErrorResponses(this OpenApiOperation operation, OpenApiCon } }; } - operation.Responses.Add(Constants.StatusCodeClass2XX, response ?? Constants.StatusCodeClass2XX.GetResponse()); + operation.Responses.Add(Constants.StatusCodeClass2XX, response ?? Constants.StatusCodeClass2XX.GetResponse(document)); } else { - operation.Responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse()); + operation.Responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse(document)); } } if (settings.ErrorResponsesAsDefault) { - operation.Responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse()); + operation.Responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse(document)); } else { - operation.Responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse()); - operation.Responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse()); + operation.Responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse(document)); + operation.Responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse(document)); } } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 8857ad5c2..d88c13aaa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.OData.Edm; using Microsoft.OpenApi.Models; @@ -19,28 +20,34 @@ namespace Microsoft.OpenApi.OData.Generator /// internal static class OpenApiResponseGenerator { - private static IDictionary _responses = - new Dictionary - { - { Constants.StatusCodeDefault, - new OpenApiResponseReference(Constants.Error, null) - }, + private static Dictionary _responses; - { Constants.StatusCode204, new OpenApiResponse { Description = Constants.Success} }, - { Constants.StatusCode201, new OpenApiResponse { Description = Constants.Created} }, - { Constants.StatusCodeClass2XX, new OpenApiResponse { Description = Constants.Success} }, - { Constants.StatusCodeClass4XX, new OpenApiResponseReference(Constants.Error, null)}, - { Constants.StatusCodeClass5XX, new OpenApiResponseReference(Constants.Error, null)} - }; + private static Dictionary GetResponses(OpenApiDocument openApiDocument) + { + _responses ??= new() + { + { Constants.StatusCodeDefault, + new OpenApiResponseReference(Constants.Error, openApiDocument) + }, + + { Constants.StatusCode204, new OpenApiResponse { Description = Constants.Success} }, + { Constants.StatusCode201, new OpenApiResponse { Description = Constants.Created} }, + { Constants.StatusCodeClass2XX, new OpenApiResponse { Description = Constants.Success} }, + { Constants.StatusCodeClass4XX, new OpenApiResponseReference(Constants.Error, openApiDocument)}, + { Constants.StatusCodeClass5XX, new OpenApiResponseReference(Constants.Error, openApiDocument)} + }; + return _responses; + } /// /// Get the for the build-in statusCode. /// /// The status code. + /// The OpenApi document to lookup references. /// The created . - public static OpenApiResponse GetResponse(this string statusCode) + public static OpenApiResponse GetResponse(this string statusCode, OpenApiDocument document) { - if (_responses.TryGetValue(statusCode, out OpenApiResponse response)) + if (GetResponses(document).TryGetValue(statusCode, out OpenApiResponse response)) { return response; } @@ -129,13 +136,13 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp if (operation.IsAction() && operation.ReturnType == null) { - responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse()); + responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse(document)); } else if (context.Model.OperationTargetsMultiplePaths(operation)) { responses.Add( context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{operation.Name}Response", null) + new OpenApiResponseReference($"{operation.Name}Response", document) ); } else @@ -146,12 +153,12 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp if (context.Settings.ErrorResponsesAsDefault) { - responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse()); + responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse(document)); } else { - responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse()); - responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse()); + responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse(document)); + responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse(document)); } return responses; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs index 8cd78094c..3aa231f98 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs @@ -19,41 +19,18 @@ namespace Microsoft.OpenApi.OData.Generator /// internal static class OpenApiSecurityRequirementGenerator { - /// - /// Create the list of object. - /// - /// The OData to Open API context. - /// The securitySchemes. - /// The created collection. - public static IEnumerable CreateSecurityRequirements(this ODataContext context, - IList securitySchemes) - { - Utils.CheckArgumentNull(context, nameof(context)); - - if (securitySchemes != null) - { - foreach (var securityScheme in securitySchemes) - { - yield return new OpenApiSecurityRequirement - { - [ - new OpenApiSecuritySchemeReference(securityScheme.Authorization, null) - ] = new List(securityScheme.RequiredScopes ?? new List()) - }; - } - } - } - /// /// Create the list of object. /// /// The OData to Open API context. /// The permissions. + /// The Open API document to use for references lookup. /// The created collection. public static IEnumerable CreateSecurityRequirements(this ODataContext context, - IList permissions) + IList permissions, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); if (permissions != null) { @@ -62,7 +39,7 @@ public static IEnumerable CreateSecurityRequirements yield return new OpenApiSecurityRequirement { [ - new OpenApiSecuritySchemeReference(permission.SchemeName, null) + new OpenApiSecuritySchemeReference(permission.SchemeName, document) ] = new List(permission.Scopes?.Select(c => c.Scope) ?? new List()) }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index 18f4bedbb..7341bbfe9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -163,7 +163,7 @@ protected override void SetResponses(OpenApiOperation operation) SetSingleResponse(operation, schema); } - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -174,7 +174,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 60b92e675..1d6c4e93a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -101,7 +101,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -112,7 +112,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index 4552b2cb5..3de188752 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -78,7 +78,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); base.SetResponses(operation); } protected override void SetSecurity(OpenApiOperation operation) @@ -88,7 +88,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 43d8d8407..80ed1d477 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -170,10 +170,10 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference(Constants.DollarCountSchemaName, null) + new OpenApiResponseReference(Constants.DollarCountSchemaName, _document) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index 1fb944384..532c38e26 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -113,7 +113,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index 100247829..b1e2fe8ff 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -222,7 +222,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs index 4dbce864e..343e8f997 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs @@ -96,7 +96,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, true); + operation.AddErrorResponses(settings, _document, true); base.SetResponses(operation); } @@ -107,7 +107,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index 99161945b..336a9c8ca 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -137,7 +137,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -160,7 +160,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index 740653603..254f6f486 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -155,11 +155,11 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}", null) + new OpenApiResponseReference($"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}", _document) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -171,7 +171,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 06f34bd60..68fd4d230 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -92,7 +92,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -104,7 +104,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 5870c7f02..ca3b5fc75 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -115,7 +115,7 @@ protected IDictionary GetContent() /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -126,7 +126,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs index 49d79e8c0..fc71789a9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs @@ -93,7 +93,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, true); + operation.AddErrorResponses(settings, _document, true); base.SetResponses(operation); } @@ -104,7 +104,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs index 823870fcf..60a95ccdc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs @@ -104,7 +104,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -130,7 +130,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index 8bf47bfd5..664285b92 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -101,11 +101,11 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiSchema schema = new OpenApiSchemaReference(entityType.FullName(), _document); - operation.AddErrorResponses(Context.Settings, addNoContent: true, schema: schema); + operation.AddErrorResponses(Context.Settings, _document, addNoContent: true, schema: schema); } else { - operation.AddErrorResponses(Context.Settings, true); + operation.AddErrorResponses(Context.Settings, _document, true); } base.SetResponses(operation); @@ -121,7 +121,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(update.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(update.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs index 46509783c..9cba74f5d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs @@ -76,7 +76,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs index aceb4b340..864c02ca8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs @@ -82,7 +82,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions, _document).ToList(); } /// @@ -92,7 +92,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, true); + operation.AddErrorResponses(settings, _document, true); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 567bd183a..bf8a76d01 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -106,7 +106,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}", null) + new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}", _document) { Links = links } @@ -148,7 +148,7 @@ protected override void SetResponses(OpenApiOperation operation) }; } - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -241,7 +241,7 @@ protected override void SetSecurity(OpenApiOperation operation) readBase = _readRestriction.ReadByKeyRestrictions; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs index 6cd505eaf..2c4d1274e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs @@ -99,7 +99,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -111,7 +111,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs index 3e51a289b..9daf7e5fe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs @@ -78,7 +78,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -89,7 +89,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 66d8f0a20..22f9cd0a5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -227,7 +227,7 @@ protected override void SetResponses(OpenApiOperation operation) SetCollectionResponse(operation, TargetSchemaElement.FullName()); } - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -358,7 +358,7 @@ protected override void SetSecurity(OpenApiOperation operation) ReadRestrictionsBase readBase = restriction.ReadRestrictions; - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); } protected override void SetExtensions(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index cb9a25713..aa68a2b40 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -315,7 +315,7 @@ internal void SetCollectionResponse(OpenApiOperation operation, string targetEle { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{targetElementFullName}{Constants.CollectionSchemaSuffix}", null) + new OpenApiResponseReference($"{targetElementFullName}{Constants.CollectionSchemaSuffix}", _document) } }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs index a0118de90..7cb172556 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs @@ -109,7 +109,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions, _document).ToList(); } /// @@ -119,7 +119,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, true); + operation.AddErrorResponses(settings, _document, true); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index db0579be4..2e1c8aa70 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -91,7 +91,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"String{Constants.CollectionSchemaSuffix}", null) + new OpenApiResponseReference($"String{Constants.CollectionSchemaSuffix}", _document) } }; } @@ -135,7 +135,7 @@ protected override void SetResponses(OpenApiOperation operation) }; } - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -195,7 +195,7 @@ protected override void SetSecurity(OpenApiOperation operation) } ReadRestrictionsBase readBase = _readRestriction; - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index 05eff1f0c..faa3b99d4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -72,7 +72,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -84,7 +84,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index efe34925f..fb4d7b190 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -72,7 +72,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -83,7 +83,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions, _document).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 6ee4c3b9e..93dd3f969 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -122,7 +122,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, false); + operation.AddErrorResponses(Context.Settings, _document, false); base.SetResponses(operation); } @@ -135,7 +135,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index ce5dc20da..7fa7aceb4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -85,7 +85,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -97,7 +97,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); } /// diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs index 576677d2b..860780d67 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs @@ -25,7 +25,7 @@ public void AddsErrorResponses(bool addNoContent, bool errorAsDefault) var operation = new OpenApiOperation(); // Act - operation.AddErrorResponses(settings, addNoContent); + operation.AddErrorResponses(settings, new(), addNoContent); // Assert Assert.NotNull(operation.Responses); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index d16849ea5..03c466a2b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -25,7 +25,7 @@ public class OpenApiResponseGeneratorTest public void GetResponseReturnsNullResponseObject(string input) { // Arrange & Act - var response = input.GetResponse(); + var response = input.GetResponse(new()); // Assert Assert.Null(response); @@ -37,7 +37,7 @@ public void GetResponseReturnsNullResponseObject(string input) public void GetResponseReturnsResponseObject(string input) { // Arrange & Act - var response = input.GetResponse(); + var response = input.GetResponse(new()); // Assert Assert.NotNull(response); From 982a9b1485de26896ac8f4d188006fd13af929ce Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 09:28:45 -0500 Subject: [PATCH 078/103] fix: visibility of methods Signed-off-by: Vincent Biret --- .../Common/OpenApiOperationExtensions.cs | 2 +- src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs | 2 +- src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs index b0502dd4d..dd337a016 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs @@ -12,7 +12,7 @@ namespace Microsoft.OpenApi.OData.Common; /// /// Extensions methods for the OpenApiOperation class. /// -public static class OpenApiOperationExtensions +internal static class OpenApiOperationExtensions { /// /// Adds a default response to the operation or 4XX/5XX responses for the errors depending on the settings. diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs index b7dc53516..123bcbd0e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs @@ -43,7 +43,7 @@ public static bool IsUrlEscapeFunction(this IEdmModel model, IEdmOperation opera /// The Edm model. /// The specified function /// true if the specified operation is UrlEscape function; otherwise, false. - public static bool IsUrlEscapeFunction(this IEdmModel model, IEdmFunction function) + private static bool IsUrlEscapeFunction(this IEdmModel model, IEdmFunction function) { Utils.CheckArgumentNull(model, nameof(model)); Utils.CheckArgumentNull(function, nameof(function)); diff --git a/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt b/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt index eb93babff..96bcd04af 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt +++ b/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt @@ -70,7 +70,6 @@ override Microsoft.OpenApi.OData.Edm.ODataRefSegment.GetPathItemName(Microsoft.O override Microsoft.OpenApi.OData.Edm.ODataStreamContentSegment.GetPathItemName(Microsoft.OpenApi.OData.OpenApiConvertSettings settings, System.Collections.Generic.HashSet parameters) -> string override Microsoft.OpenApi.OData.Edm.ODataStreamPropertySegment.GetPathItemName(Microsoft.OpenApi.OData.OpenApiConvertSettings settings, System.Collections.Generic.HashSet parameters) -> string override Microsoft.OpenApi.OData.Edm.ODataTypeCastSegment.GetPathItemName(Microsoft.OpenApi.OData.OpenApiConvertSettings settings, System.Collections.Generic.HashSet parameters) -> string -static Microsoft.OpenApi.OData.Common.OpenApiOperationExtensions.AddErrorResponses(this Microsoft.OpenApi.Models.OpenApiOperation operation, Microsoft.OpenApi.OData.OpenApiConvertSettings settings, bool addNoContent = false, Microsoft.OpenApi.Models.OpenApiSchema schema = null) -> void static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.OperationTargetsMultiplePaths(this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmOperation operation) -> bool static Microsoft.OpenApi.OData.Edm.EdmTypeExtensions.ShouldPathParameterBeQuoted(this Microsoft.OData.Edm.IEdmType edmType, Microsoft.OpenApi.OData.OpenApiConvertSettings settings) -> bool Microsoft.OpenApi.OData.Edm.IODataPathProvider @@ -302,7 +301,6 @@ static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.FindAllBaseTypes(this Micr static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.GetAllElements(this Microsoft.OData.Edm.IEdmModel model) -> System.Collections.Generic.IEnumerable static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.IsOperationImportOverload(this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmOperationImport operationImport) -> bool static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.IsOperationOverload(this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmOperation operation) -> bool -static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.IsUrlEscapeFunction(this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmFunction function) -> bool static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.IsUrlEscapeFunction(this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmOperation operation) -> bool static Microsoft.OpenApi.OData.Edm.EdmModelExtensions.LoadAllNavigationSources(this Microsoft.OData.Edm.IEdmModel model) -> System.Collections.Generic.IDictionary> static Microsoft.OpenApi.OData.Edm.ODataRefSegment.Instance -> Microsoft.OpenApi.OData.Edm.ODataRefSegment @@ -313,4 +311,3 @@ virtual Microsoft.OpenApi.OData.Edm.ODataPathProvider.CanFilter(Microsoft.OData. virtual Microsoft.OpenApi.OData.Edm.ODataPathProvider.GetPaths(Microsoft.OData.Edm.IEdmModel model, Microsoft.OpenApi.OData.OpenApiConvertSettings settings) -> System.Collections.Generic.IEnumerable virtual Microsoft.OpenApi.OData.Edm.ODataPathProvider.Initialize(Microsoft.OData.Edm.IEdmModel model) -> void virtual Microsoft.OpenApi.OData.Edm.ODataSegment.EntityType.get -> Microsoft.OData.Edm.IEdmEntityType -Microsoft.OpenApi.OData.Common.OpenApiOperationExtensions From a2e30c3685a5b102e915634971a6d85023297f65 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 09:29:05 -0500 Subject: [PATCH 079/103] fix: defaults to oas 3.1 Signed-off-by: Vincent Biret --- .../OpenApiConvertSettings.cs | 2 +- src/OoasGui/MainForm.cs | 2 +- src/OoasUtil/ComLineProcesser.cs | 4 ++-- tool/UpdateDocs/Program.cs | 15 ++++++++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs index 188675bf7..ecb73a7d4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs @@ -66,7 +66,7 @@ public class OpenApiConvertSettings /// Gets/sets a value indicating whether the version of openApi to serialize to is v2. /// Currently only impacts nullable references for EdmTypeSchemaGenerator /// - public OpenApiSpecVersion OpenApiSpecVersion { get; set; } = OpenApiSpecVersion.OpenApi3_0; + public OpenApiSpecVersion OpenApiSpecVersion { get; set; } = OpenApiSpecVersion.OpenApi3_1; /// /// Gets/sets a value indicating to set the OperationId on Open API operation. diff --git a/src/OoasGui/MainForm.cs b/src/OoasGui/MainForm.cs index 5ec23afb3..63cea0f30 100644 --- a/src/OoasGui/MainForm.cs +++ b/src/OoasGui/MainForm.cs @@ -27,7 +27,7 @@ public partial class MainForm : Form { private OpenApiFormat Format { get; set; } = OpenApiFormat.Json; - private OpenApiSpecVersion Version { get; set; } = OpenApiSpecVersion.OpenApi3_0; + private OpenApiSpecVersion Version { get; set; } = OpenApiSpecVersion.OpenApi3_1; private OpenApiConvertSettings Settings = new OpenApiConvertSettings(); diff --git a/src/OoasUtil/ComLineProcesser.cs b/src/OoasUtil/ComLineProcesser.cs index bea0f1d8c..9f73d63be 100644 --- a/src/OoasUtil/ComLineProcesser.cs +++ b/src/OoasUtil/ComLineProcesser.cs @@ -245,7 +245,7 @@ public bool Process() if (Version == null) { - Version = OpenApiSpecVersion.OpenApi3_0; + Version = OpenApiSpecVersion.OpenApi3_1; } if (KeyAsSegment == null) @@ -432,7 +432,7 @@ private bool ProcessTarget(int version) return false; } - Version = version == 2 ? OpenApiSpecVersion.OpenApi2_0 : OpenApiSpecVersion.OpenApi3_0; + Version = version == 2 ? OpenApiSpecVersion.OpenApi2_0 : OpenApiSpecVersion.OpenApi3_1; return true; } diff --git a/tool/UpdateDocs/Program.cs b/tool/UpdateDocs/Program.cs index 43f9938a3..ddfcf2f00 100644 --- a/tool/UpdateDocs/Program.cs +++ b/tool/UpdateDocs/Program.cs @@ -22,9 +22,11 @@ static async Task Main(string[] args) { // we assume the path are existed for simplicity. string path = Directory.GetCurrentDirectory(); - string csdl = path + "/../../../../../docs/csdl"; - string oas20 = path + "/../../../../../docs/oas_2_0"; - string oas30 = path + "/../../../../../docs/oas3_0_0"; + string parentPath = Path.Combine(path, "..", "..", "..", "..", ".."); + string csdl = Path.Combine(parentPath, "docs", "csdl"); + string oas20 = Path.Combine(parentPath, "docs", "oas_2_0"); + string oas30 = Path.Combine(parentPath, "docs", "oas3_0_0"); + string oas31 = Path.Combine(parentPath, "docs", "oas3_1_0"); foreach (var filePath in Directory.GetFiles(csdl, "*.xml")) { @@ -53,11 +55,14 @@ static async Task Main(string[] args) settings.EnableKeyAsSegment = true; settings.EnableUnqualifiedCall = true; - var output = oas30 + "/" + fileName + ".json"; + var output = Path.Combine(oas31, fileName + ".json"); var document = model.ConvertToOpenApi(settings); + await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_1)); + + output = Path.Combine(oas30, fileName + ".json"); await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); - output = oas20 + "/" + fileName + ".json"; + output = Path.Combine(oas20, fileName + ".json"); await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi2_0)); Console.WriteLine("Output [ " + fileName + " ] Successful!"); From f778ec2c99313eefdbd9942a534207f8dba9b83a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 09:36:38 -0500 Subject: [PATCH 080/103] chore: code linting Signed-off-by: Vincent Biret --- .../Edm/EdmModelExtensions.cs | 8 ++++---- .../Operation/MediaEntityOperationalHandler.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs index 123bcbd0e..3ece9f1f6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/EdmModelExtensions.cs @@ -157,9 +157,9 @@ public static bool IsOperationOverload(this IEdmModel model, IEdmOperation opera Utils.CheckArgumentNull(operation, nameof(operation)); return model.GetAllElements().OfType() - .Where(o => o.IsBound == operation.IsBound && o.FullName() == operation.FullName() && + .Count(o => o.IsBound == operation.IsBound && o.FullName() == operation.FullName() && o.Parameters.First().Type.Definition.FullTypeName() == operation.Parameters.First().Type.Definition.FullTypeName() - ).Count() > 1; + ) > 1; } /// @@ -180,7 +180,7 @@ public static bool OperationTargetsMultiplePaths(this IEdmModel model, IEdmOpera return model.EntityContainer.EntitySets().Select(static x => x.EntityType) .Concat(model.EntityContainer.Singletons().Select(static x => x.EntityType)) - .Where(x => x.FullName().Equals(bindingParameterType.FullName(), StringComparison.OrdinalIgnoreCase)).Count() > 1; + .Count(x => x.FullName().Equals(bindingParameterType.FullName(), StringComparison.OrdinalIgnoreCase)) > 1; } /// @@ -200,7 +200,7 @@ public static bool IsOperationImportOverload(this IEdmModel model, IEdmOperation } return model.EntityContainer.OperationImports() - .Where(o => o.Operation.IsBound == operationImport.Operation.IsBound && o.Name == operationImport.Name).Count() > 1; + .Count(o => o.Operation.IsBound == operationImport.Operation.IsBound && o.Name == operationImport.Name) > 1; } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index b4874a3e5..422c22564 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -65,7 +65,7 @@ protected override void Initialize(ODataContext context, ODataPath path) // Check whether path is a navigation property path IsNavigationPropertyPath = Path.Segments.Contains( - Path.Segments.Where(segment => segment is ODataNavigationPropertySegment).FirstOrDefault()); + Path.Segments.FirstOrDefault(segment => segment is ODataNavigationPropertySegment)); LastSegmentIsStreamPropertySegment = Path.LastSegment.Kind == ODataSegmentKind.StreamProperty; From 33911136438dd18d211b48b902d9146ff3b87804 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 09:48:22 -0500 Subject: [PATCH 081/103] chore: use pattern matching for safer casting Signed-off-by: Vincent Biret --- .../Operation/EdmFunctionImportOperationHandler.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index bb1015919..94522cb92 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -32,7 +32,10 @@ protected override void SetParameters(OpenApiOperation operation) { base.SetParameters(operation); - IEdmFunctionImport functionImport = EdmOperationImport as IEdmFunctionImport; + if (EdmOperationImport is not IEdmFunctionImport functionImport) + { + return; + } if (OperationImportSegment.ParameterMappings != null) { From 35089881b73b2cdd6b1957dbc67b170c073c5e16 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 12:25:40 -0500 Subject: [PATCH 082/103] chore: linting Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGenerator.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 1a9c72e7e..998aec5ca 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -82,13 +82,10 @@ public static IList CreateParameters(this ODataContext context int skip = function.IsBound ? 1 : 0; foreach (IEdmOperationParameter edmParameter in function.Parameters.Skip(skip)) { - if (parameterNameMapping != null) + if (parameterNameMapping != null && !parameterNameMapping.ContainsKey(edmParameter.Name)) { - if (!parameterNameMapping.ContainsKey(edmParameter.Name)) - { - continue; - } - } + continue; + } OpenApiParameter parameter; bool isOptionalParameter = edmParameter is IEdmOptionalParameter; From 13c0970a2a5c7ad1888d480282df3dbbded8ba21 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 12:40:08 -0500 Subject: [PATCH 083/103] fix: missing type for openapi v2 query parameters Signed-off-by: Vincent Biret --- .../OpenApiEdmTypeSchemaGenerator.cs | 97 +++++++++++-------- .../Generator/OpenApiParameterGenerator.cs | 10 +- .../Resources/TripService.OpenApi.V2.json | 2 + .../Resources/TripService.OpenApi.V2.yaml | 2 + 4 files changed, 66 insertions(+), 45 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 9b1bbb681..c811b3777 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -22,14 +22,24 @@ namespace Microsoft.OpenApi.OData.Generator /// internal static class OpenApiEdmTypeSchemaGenerator { + /// + /// Create a for a when producing an OpenAPI parameter. + /// + /// The OData context. + /// The Edm type reference. + /// The Open API document to lookup references. + /// The created . + public static OpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + => CreateEdmTypeSchema(context, edmTypeReference, document, true); /// /// Create a for a . /// /// The OData context. /// The Edm type reference. /// The Open API document to lookup references. + /// Whether the schema is for a parameter. /// The created . - public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(edmTypeReference, nameof(edmTypeReference)); @@ -45,7 +55,7 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT OpenApiSchema schema; schema = typeRef.TypeKind() == EdmTypeKind.Complex || typeRef.TypeKind() == EdmTypeKind.Entity ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), document, true) - : context.CreateEdmTypeSchema(typeRef, document); + : context.CreateEdmTypeSchema(typeRef, document, schemaForParameter); return new OpenApiSchema { @@ -67,7 +77,7 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT // represented as Schema Objects that are JSON References to definitions in the Definitions Object case EdmTypeKind.Primitive: IEdmPrimitiveTypeReference primitiveTypeReference = (IEdmPrimitiveTypeReference)edmTypeReference; - return context.CreateSchema(primitiveTypeReference, document); + return context.CreateSchema(primitiveTypeReference, document, schemaForParameter); case EdmTypeKind.TypeDefinition: return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, document); @@ -90,14 +100,15 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT /// The OData context. /// The Edm primitive reference. /// The Open API document to lookup references. + /// Whether the schema is for a parameter. /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document) + public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); Utils.CheckArgumentNull(document, nameof(document)); - OpenApiSchema schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document); + OpenApiSchema schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document, schemaForParameter); if (schema != null) { switch(primitiveType.PrimitiveKind()) @@ -151,8 +162,9 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv /// The OData context. /// The Edm primitive type. /// The Open API document to lookup references. + /// Whether the schema is for a parameter. /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document) + public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); @@ -166,6 +178,9 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv AnyOf = null }; + var emitIEEECompatibleTypes = context.Settings.IEEE754Compatible && (context.Settings.OpenApiSpecVersion >= OpenApiSpecVersion.OpenApi3_0 || !schemaForParameter); + var emitV2CompatibleParameterTypes = context.Settings.OpenApiSpecVersion == OpenApiSpecVersion.OpenApi2_0 && schemaForParameter; + switch (primitiveType.PrimitiveKind) { case EdmPrimitiveTypeKind.Binary: // binary @@ -185,36 +200,42 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv schema.Format = "date-time"; schema.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])$"; break; - case EdmPrimitiveTypeKind.Decimal: // decimal - if (context.Settings.IEEE754Compatible) - { - schema.OneOf = new List - { - new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.DecimalFormat, Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, - }; - } - else - { + case EdmPrimitiveTypeKind.Decimal when emitIEEECompatibleTypes: // decimal + schema.OneOf = + [ + new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.DecimalFormat, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + ]; + break; + case EdmPrimitiveTypeKind.Decimal when !emitIEEECompatibleTypes: // decimal schema.Type = JsonSchemaType.Number; schema.Format = Constants.DecimalFormat; - } break; - case EdmPrimitiveTypeKind.Double: // double - schema.OneOf = new List - { + case EdmPrimitiveTypeKind.Double when emitV2CompatibleParameterTypes: // double + schema.Type = JsonSchemaType.Number; + schema.Format = "double"; + schema.Nullable = true; + break; + case EdmPrimitiveTypeKind.Double when !emitV2CompatibleParameterTypes: // double + schema.OneOf = + [ new OpenApiSchema { Type = JsonSchemaType.Number, Format = "double", Nullable = true }, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, new OpenApiSchemaReference(Constants.ReferenceNumericName, document) - }; + ]; break; - case EdmPrimitiveTypeKind.Single: // single - schema.OneOf = new List - { + case EdmPrimitiveTypeKind.Single when emitV2CompatibleParameterTypes: // single + schema.Type = JsonSchemaType.Number; + schema.Format = "float"; + schema.Nullable = true; + break; + case EdmPrimitiveTypeKind.Single when !emitV2CompatibleParameterTypes: // single + schema.OneOf = + [ new OpenApiSchema { Type = JsonSchemaType.Number, Format = "float", Nullable = true }, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, new OpenApiSchemaReference(Constants.ReferenceNumericName, document) - }; + ]; break; case EdmPrimitiveTypeKind.Guid: // guid schema.Type = JsonSchemaType.String; @@ -233,20 +254,16 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv schema.Minimum = Int32.MinValue; // -2147483648 schema.Maximum = Int32.MaxValue; // 2147483647 break; - case EdmPrimitiveTypeKind.Int64: - if (context.Settings.IEEE754Compatible) - { - schema.OneOf = new List - { - new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.Int64Format, Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } - }; - } - else - { - schema.Type = JsonSchemaType.Number; - schema.Format = Constants.Int64Format; - } + case EdmPrimitiveTypeKind.Int64 when emitIEEECompatibleTypes: + schema.OneOf = + [ + new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.Int64Format, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } + ]; + break; + case EdmPrimitiveTypeKind.Int64 when !emitIEEECompatibleTypes: + schema.Type = JsonSchemaType.Number; + schema.Format = Constants.Int64Format; break; case EdmPrimitiveTypeKind.SByte: schema.Type = JsonSchemaType.Number; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 998aec5ca..de46fb8cd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -133,7 +133,7 @@ public static IList CreateParameters(this ODataContext context Name = parameterNameMapping == null ? edmParameter.Name : parameterNameMapping[edmParameter.Name], In = isOptionalParameter ? ParameterLocation.Query : ParameterLocation.Path, Required = !isOptionalParameter, - Schema = context.CreateEdmTypeSchema(edmParameter.Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(edmParameter.Type, document) }; } @@ -191,7 +191,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"The unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(keys[0].Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(keys[0].Type, document) }; parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiAny(entityType.Name)); @@ -210,7 +210,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"Property in multi-part unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(keyProperty.Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(keyProperty.Type, document) }; if (keySegment.KeyMappings != null) @@ -254,7 +254,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = alternateKey.First().Key, In = ParameterLocation.Path, Description = $"Alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(alternateKey.First().Value.Type, document), + Schema = context.CreateEdmTypeSchemaForParameter(alternateKey.First().Value.Type, document), Required = true } ); @@ -272,7 +272,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = compositekey.Key, In = ParameterLocation.Path, Description = $"Property in multi-part alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchema(compositekey.Value.Type, document), + Schema = context.CreateEdmTypeSchemaForParameter(compositekey.Value.Type, document), Required = true } ); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index c237bf55b..c92129afc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -1244,12 +1244,14 @@ "in": "path", "name": "lat", "required": true, + "type": "number", "format": "double" }, { "in": "path", "name": "lon", "required": true, + "type": "number", "format": "double" } ], 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 d7b3ed116..0db8df73c 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 @@ -818,10 +818,12 @@ paths: - in: path name: lat required: true + type: number format: double - in: path name: lon required: true + type: number format: double responses: '200': From 8e7e884c772bb476b2f3ce4c733e5e946da3b491 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 12:44:58 -0500 Subject: [PATCH 084/103] fix: missing parameter information Signed-off-by: Vincent Biret --- .../Generator/OpenApiEdmTypeSchemaGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index c811b3777..3f20af009 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -80,7 +80,7 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT return context.CreateSchema(primitiveTypeReference, document, schemaForParameter); case EdmTypeKind.TypeDefinition: - return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, document); + return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, document, schemaForParameter); case EdmTypeKind.EntityReference: return context.CreateTypeDefinitionSchema(edmTypeReference.AsTypeDefinition(), document); From 3ba9330950d5ec2b0c4e744eb60a332f52e607b7 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 12:53:30 -0500 Subject: [PATCH 085/103] fix: switches parameters components model to add Signed-off-by: Vincent Biret --- .../Generator/OpenApiComponentsGenerator.cs | 2 +- .../Generator/OpenApiParameterGenerator.cs | 17 ++++++++--------- .../Generator/OpenApiParameterGeneratorTests.cs | 13 ++++++++++--- .../Microsoft.OpenAPI.OData.Reader.Tests.csproj | 1 + 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index 40c78dde3..f84adebf5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -27,8 +27,8 @@ public static OpenApiComponents CreateComponents(this ODataContext context, Open Utils.CheckArgumentNull(context, nameof(context)); context.AddSchemasToDocument(document); + context.AddParametersToDocument(document); //TODO convert all other create methods to add - document.Components.Parameters = context.CreateParameters(); document.Components.Responses = context.CreateResponses(document); document.Components.RequestBodies = context.CreateRequestBodies(document); document.Components.Examples = context.CreateExamples(document); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index de46fb8cd..6c2466bcf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -29,21 +29,20 @@ internal static class OpenApiParameterGenerator /// Create a map of object. /// /// The OData context. + /// The Open API document. /// The created map of object. - public static IDictionary CreateParameters(this ODataContext context) + public static void AddParametersToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); // It allows defining query options and headers that can be reused across operations of the service. // The value of parameters is a map of Parameter Objects. - return new Dictionary - { - { "top", CreateTop(context.Settings.TopExample) }, - { "skip", CreateSkip() }, - { "count", CreateCount() }, - { "filter", CreateFilter() }, - { "search", CreateSearch() }, - }; + document.AddComponent("top", CreateTop(context.Settings.TopExample)); + document.AddComponent("skip", CreateSkip()); + document.AddComponent("count", CreateCount()); + document.AddComponent("filter", CreateFilter()); + document.AddComponent("search", CreateSearch()); } /// diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 471461e8a..ce24539c7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -15,6 +15,7 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; +using Moq; using Xunit; namespace Microsoft.OpenApi.OData.Generator.Tests @@ -26,9 +27,11 @@ public void CreateParametersThrowArgumentNullContext() { // Arrange ODataContext context = null; + var mockModel = new Mock().Object; // Act & Assert - Assert.Throws("context", () => context.CreateParameters()); + Assert.Throws("context", () => context.AddParametersToDocument(new())); + Assert.Throws("document", () => new ODataContext(mockModel).AddParametersToDocument(null)); } [Fact] @@ -37,9 +40,11 @@ public async Task CreateParametersReturnsCreatedParameters() // Arrange IEdmModel model = EdmCoreModel.Instance; ODataContext context = new ODataContext(model); + OpenApiDocument openApiDocument = new (); // Act - var parameters = context.CreateParameters(); + context.AddParametersToDocument(openApiDocument); + var parameters = openApiDocument.Components.Parameters; // Assert Assert.NotNull(parameters); @@ -117,9 +122,11 @@ public async Task CanSerializeAsYamlFromTheCreatedParameters() // Arrange IEdmModel model = EdmCoreModel.Instance; ODataContext context = new ODataContext(model); + OpenApiDocument openApiDocument = new (); // Act - var parameters = context.CreateParameters(); + context.AddParametersToDocument(openApiDocument); + var parameters = openApiDocument.Components.Parameters; // Assert Assert.Contains("skip", parameters.Select(p => p.Key)); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index c6624f431..2a22ccac9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -90,6 +90,7 @@ + all From 8c1efe96e5994245bb305433c883c3a0f5b3f33b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 13:47:09 -0500 Subject: [PATCH 086/103] fix: normalizes request bodies adding pattern Signed-off-by: Vincent Biret --- .../Generator/OpenApiComponentsGenerator.cs | 8 +++--- .../Generator/OpenApiParameterGenerator.cs | 1 - .../Generator/OpenApiRequestBodyGenerator.cs | 25 +++++-------------- .../Generator/OpenApiResponseGenerator.cs | 9 ++++--- .../OpenApiRequestBodyGeneratorTests.cs | 4 ++- .../OpenApiResponseGeneratorTests.cs | 17 ++++++++++--- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index f84adebf5..dd0c305af 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -28,11 +28,11 @@ public static OpenApiComponents CreateComponents(this ODataContext context, Open context.AddSchemasToDocument(document); context.AddParametersToDocument(document); + context.AddResponsesToDocument(document); + context.AddRequestBodiesToDocument(document); //TODO convert all other create methods to add - document.Components.Responses = context.CreateResponses(document); - document.Components.RequestBodies = context.CreateRequestBodies(document); - document.Components.Examples = context.CreateExamples(document); - document.Components.SecuritySchemes = context.CreateSecuritySchemes(); + context.CreateExamples(document); + context.CreateSecuritySchemes(); document.Components.Links = null; document.Components.Callbacks = null; document.Components.Extensions = null; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 6c2466bcf..57c899bc3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -30,7 +30,6 @@ internal static class OpenApiParameterGenerator /// /// The OData context. /// The Open API document. - /// The created map of object. public static void AddParametersToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index 0d787af5b..9ec4cad33 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -96,34 +96,21 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE /// /// The OData context. /// The OpenApi document to lookup references. - /// The created dictionary of indexed by ref name - public static IDictionary CreateRequestBodies(this ODataContext context, OpenApiDocument document) + public static void AddRequestBodiesToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(document, nameof(document)); - Dictionary requestBodies = new() - { - { - Constants.ReferencePostRequestBodyName, - CreateRefPostRequestBody(document) - }, - { - Constants.ReferencePutRequestBodyName, - CreateRefPutRequestBody(document) - } - }; + document.AddComponent(Constants.ReferencePostRequestBodyName, CreateRefPostRequestBody(document)); + document.AddComponent(Constants.ReferencePutRequestBodyName, CreateRefPutRequestBody(document)); // add request bodies for actions targeting multiple related paths foreach (IEdmAction action in context.Model.SchemaElements.OfType() - .Where(action => context.Model.OperationTargetsMultiplePaths(action))) + .Where(context.Model.OperationTargetsMultiplePaths)) { - OpenApiRequestBody requestBody = context.CreateRequestBody(action, document); - if (requestBody != null) - requestBodies.Add($"{action.Name}RequestBody", requestBody); + if (context.CreateRequestBody(action, document) is OpenApiRequestBody requestBody) + document.AddComponent($"{action.Name}RequestBody", requestBody); } - - return requestBodies; } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index d88c13aaa..63597fe5c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -63,10 +63,10 @@ public static OpenApiResponse GetResponse(this string statusCode, OpenApiDocumen /// /// The OData context. /// The OpenApi document to lookup references. - /// The name/value pairs for the standard OData error response. - public static IDictionary CreateResponses(this ODataContext context, OpenApiDocument document) + public static void AddResponsesToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); var responses = new Dictionary { @@ -101,7 +101,10 @@ public static IDictionary CreateResponses(this ODataCon responses[$"{operation.Name}Response"] = response; } - return responses; + foreach (var response in responses) + { + document.AddComponent(response.Key, response.Value); + } } /// diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index d9a5137a2..57742f7f2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -163,9 +163,11 @@ public void CreateRefRequestBodies() { // Arrange ODataContext context = new ODataContext(_model); + OpenApiDocument openApiDocument = new OpenApiDocument(); // Act - var requestBodies = context.CreateRequestBodies(new()); + context.AddRequestBodiesToDocument(openApiDocument); + var requestBodies = openApiDocument.Components.RequestBodies; requestBodies.TryGetValue(Common.Constants.ReferencePostRequestBodyName, out Models.OpenApiRequestBody refPostBody); // Assert diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 03c466a2b..39428ddaa 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -13,6 +13,7 @@ using Microsoft.OpenApi.OData.Edm; using System.Text.Json.Nodes; using System.Threading.Tasks; +using Moq; namespace Microsoft.OpenApi.OData.Generator.Tests { @@ -48,9 +49,11 @@ public void CreateResponsesThrowArgumentNullContext() { // Arrange ODataContext context = null; + var mockModel = new Mock().Object; // Act & Assert - Assert.Throws("context", () => context.CreateResponses(new())); + Assert.Throws("context", () => context.AddResponsesToDocument(new())); + Assert.Throws("document", () => new ODataContext(mockModel).AddResponsesToDocument(null)); } [Fact] @@ -64,9 +67,11 @@ public void CreatesCollectionResponses() EnablePagination = true, }; ODataContext context = new(model, settings); + OpenApiDocument document = new(); // Act & Assert - var responses = context.CreateResponses(new()); + context.AddResponsesToDocument(document); + var responses = document.Components.Responses; var flightCollectionResponse = responses["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; var stringCollectionResponse = responses["StringCollectionResponse"]; @@ -81,9 +86,11 @@ public void CreateResponsesReturnsCreatedResponses() // Arrange IEdmModel model = EdmCoreModel.Instance; ODataContext context = new ODataContext(model); + OpenApiDocument document = new(); // Act - var responses = context.CreateResponses(new()); + context.AddResponsesToDocument(document); + var responses = document.Components.Responses; // Assert Assert.NotNull(responses); @@ -101,9 +108,11 @@ public async Task CanSerializeAsJsonFromTheCreatedResponses() // Arrange IEdmModel model = EdmCoreModel.Instance; ODataContext context = new ODataContext(model); + OpenApiDocument document = new(); // Act - var responses = context.CreateResponses(new()); + context.AddResponsesToDocument(document); + var responses = document.Components.Responses; // Assert var response = responses["error"]; From a17d5294b71f6b2770a61ce086740a0c8b2aa7a3 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Jan 2025 15:22:55 -0500 Subject: [PATCH 087/103] fix: aligns to add pattern for example, components, security schemes, paths Signed-off-by: Vincent Biret --- .../Generator/OpenApiComponentsGenerator.cs | 10 +- .../Generator/OpenApiDocumentGenerator.cs | 4 +- .../Generator/OpenApiExampleGenerator.cs | 23 +- .../Generator/OpenApiPathItemGenerator.cs | 14 +- .../Generator/OpenApiPathsGenerator.cs | 11 +- .../OpenApiSecuritySchemeGenerator.cs | 20 +- .../OpenApiComponentsGeneratorTests.cs | 8 +- .../OpenApiPathItemGeneratorTests.cs | 14 +- .../Generator/OpenApiPathsGeneratorTests.cs | 19 +- .../OpenApiSecuritySchemeGeneratorTests.cs | 4 +- .../Resources/Basic.OpenApi.V2.json | 328 ++++++++++-------- .../Resources/Basic.OpenApi.V2.yaml | 29 ++ 12 files changed, 271 insertions(+), 213 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs index dd0c305af..64fe4417a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs @@ -21,22 +21,20 @@ internal static class OpenApiComponentsGenerator /// /// The OData to Open API context. /// The Open API document. - /// The created object. - public static OpenApiComponents CreateComponents(this ODataContext context, OpenApiDocument document) + public static void AddComponentsToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); context.AddSchemasToDocument(document); context.AddParametersToDocument(document); context.AddResponsesToDocument(document); context.AddRequestBodiesToDocument(document); - //TODO convert all other create methods to add - context.CreateExamples(document); - context.CreateSecuritySchemes(); + context.AddExamplesToDocument(document); + context.AddSecuritySchemesToDocument(document); document.Components.Links = null; document.Components.Callbacks = null; document.Components.Extensions = null; - return document.Components; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index 61a00ac4c..273ae47f4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -43,8 +43,8 @@ public static OpenApiDocument CreateDocument(this ODataContext context) ExternalDocs = null, }; - doc.Components = context.CreateComponents(doc); - doc.Paths = context.CreatePaths(doc); + context.AddComponentsToDocument(doc); + context.AddPathsToDocument(doc); doc.Tags = context.CreateTags(); // order matters so the operation generators have populated the tags diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index 61d5a5c71..fc315fdcb 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -6,6 +6,7 @@ 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; @@ -23,37 +24,27 @@ internal static class OpenApiExampleGenerator /// /// The OData to Open API context. /// The Open API document. - /// The created dictionary. - public static IDictionary CreateExamples(this ODataContext context, OpenApiDocument document) + public static void AddExamplesToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(document, nameof(document)); - IDictionary examples = new Dictionary(); // Each entity type, complex type, enumeration type, and type definition directly // or indirectly used in the paths field is represented as a name / value pair of the schemas map. // Ideally this would be driven off the types used in the paths, but in practice, it is simply // all of the types present in the model. - IEnumerable elements = context.Model.GetAllElements(); + var elements = context.Model.GetAllElements() + .Where(static x => x.SchemaElementKind is EdmSchemaElementKind.TypeDefinition) + .OfType(); foreach (var element in elements) { - switch (element.SchemaElementKind) + if (context.CreateExample(element, document) is OpenApiExample example) { - case EdmSchemaElementKind.TypeDefinition when element is IEdmType reference: // Type definition - { - OpenApiExample example = context.CreateExample(reference, document); - if (example != null) - { - examples.Add(reference.FullTypeName(), example); - } - } - break; + document.AddComponent(element.FullTypeName(), example); } } - - return examples; } private static OpenApiExample CreateExample(this ODataContext context, IEdmType edmType, OpenApiDocument document) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index 4b3611eef..cff731a4d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -23,17 +23,17 @@ internal static class OpenApiPathItemGenerator /// /// The OData context. /// The Open API document to use to lookup references. - /// The created map of . - public static IDictionary CreatePathItems(this ODataContext context, OpenApiDocument document) + public static void AddPathItemsToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); - IDictionary pathItems = new Dictionary(); if (context.EntityContainer == null) { - return pathItems; + return; } + document.Paths ??= []; OpenApiConvertSettings settings = context.Settings.Clone(); settings.EnableKeyAsSegment = context.KeyAsSegment; foreach (ODataPath path in context.AllPaths) @@ -50,7 +50,7 @@ public static IDictionary CreatePathItems(this ODataCon continue; } - pathItems.TryAddPath(context, path, pathItem); + document.Paths.TryAddPath(context, path, pathItem); } if (settings.ShowRootPath) @@ -73,10 +73,8 @@ public static IDictionary CreatePathItems(this ODataCon } } }; - pathItems.Add("/", rootPath); + document.Paths.Add("/", rootPath); } - - return pathItems; } private static IDictionary CreateRootLinks(IEdmEntityContainer entityContainer) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs index 811fef695..dfb0661d4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathsGenerator.cs @@ -23,8 +23,7 @@ internal static class OpenApiPathsGenerator /// /// The OData context. /// The Open API document to use to lookup references. - /// The created object. - public static OpenApiPaths CreatePaths(this ODataContext context, OpenApiDocument document) + public static void AddPathsToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(document, nameof(document)); @@ -32,13 +31,7 @@ public static OpenApiPaths CreatePaths(this ODataContext context, OpenApiDocumen // Due to the power and flexibility of OData a full representation of all service capabilities // in the Paths Object is typically not feasible, so this mapping only describes the minimum // information desired in the Paths Object. - OpenApiPaths paths = []; - foreach (var item in context.CreatePathItems(document)) - { - paths.Add(item.Key, item.Value); - } - - return paths; + context.AddPathItemsToDocument(document); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs index f0cfb92cc..e5156a837 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecuritySchemeGenerator.cs @@ -24,21 +24,15 @@ internal static class OpenApiSecuritySchemeGenerator /// The name of each pair is the name of authorization. The value of each pair is a . /// /// The OData to Open API context. - /// The string/security scheme dictionary. - public static IDictionary CreateSecuritySchemes(this ODataContext context) + /// The Open API document. + public static void AddSecuritySchemesToDocument(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); + Utils.CheckArgumentNull(document, nameof(document)); - if (context.Model == null || context.Model.EntityContainer == null) + if (context.Model == null || context.Model.EntityContainer == null || context.Model.GetAuthorizations(context.EntityContainer) is not {} authorizations) { - return null; - } - - IDictionary securitySchemes = new Dictionary(); - var authorizations = context.Model.GetAuthorizations(context.EntityContainer); - if (authorizations == null) - { - return securitySchemes; + return; } foreach (var authorization in authorizations) @@ -68,10 +62,8 @@ public static IDictionary CreateSecuritySchemes(t break; } - securitySchemes[authorization.Name] = scheme; + document.AddComponent(authorization.Name, scheme); } - - return securitySchemes; } private static void AppendApiKey(OpenApiSecurityScheme scheme, ApiKey apiKey) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs index 65bcbdf0b..5e52da5bc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiComponentsGeneratorTests.cs @@ -8,6 +8,7 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; +using Moq; using Xunit; namespace Microsoft.OpenApi.OData.Generator.Tests @@ -20,9 +21,11 @@ public void CreateComponentsThrowArgumentNullContext() // Arrange ODataContext context = null; OpenApiDocument openApiDocument = new(); + var mockModel = new Mock().Object; // Act & Assert - Assert.Throws("context", () => context.CreateComponents(openApiDocument)); + Assert.Throws("context", () => context.AddComponentsToDocument(openApiDocument)); + Assert.Throws("document", () => new ODataContext(mockModel).AddComponentsToDocument(null)); } [Fact] @@ -34,7 +37,8 @@ public void CreateComponentsReturnsForEmptyModel() OpenApiDocument openApiDocument = new(); // Act - var components = context.CreateComponents(openApiDocument); + context.AddComponentsToDocument(openApiDocument); + var components = openApiDocument.Components; // Assert Assert.NotNull(components); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs index 00ef2f08a..187c36bd5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathItemGeneratorTests.cs @@ -27,7 +27,7 @@ public void CreatePathItemsThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreatePathItems(openApiDocument)); + Assert.Throws("context", () => context.AddPathItemsToDocument(openApiDocument)); } [Fact] @@ -39,7 +39,8 @@ public void CreatePathItemsReturnsForEmptyModel() ODataContext context = new ODataContext(model); // Act - var pathItems = context.CreatePathItems(openApiDocument); + context.AddPathItemsToDocument(openApiDocument); + var pathItems = openApiDocument.Paths; // Assert Assert.NotNull(pathItems); @@ -62,7 +63,8 @@ public void CreatePathItemsReturnsForBasicModel(bool useAnnotationToGeneratePath ODataContext context = new ODataContext(model, settings); // Act - var pathItems = context.CreatePathItems(openApiDocument); + context.AddPathItemsToDocument(openApiDocument); + var pathItems = openApiDocument.Paths; // Assert Assert.NotNull(pathItems); @@ -149,7 +151,8 @@ public void CreatePathItemsReturnsForEscapeFunctionModel(bool enableEscaped, boo ODataContext context = new ODataContext(model, settings); // Act - var pathItems = context.CreatePathItems(openApiDocument); + context.AddPathItemsToDocument(openApiDocument); + var pathItems = openApiDocument.Paths; // Assert Assert.NotNull(pathItems); @@ -205,7 +208,8 @@ public void CreatePathItemsDoesNotAddPathItemEntryForPathItemsWithNoOperations() ODataContext context = new(model); // Act - var pathItems = context.CreatePathItems(openApiDocument); + context.AddPathItemsToDocument(openApiDocument); + var pathItems = openApiDocument.Paths; // Assert Assert.NotNull(pathItems); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs index 351238731..f658bfdac 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiPathsGeneratorTests.cs @@ -8,23 +8,24 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; +using Moq; using Xunit; namespace Microsoft.OpenApi.OData.Generator.Tests { public class OpenApiPathsGeneratorTest { - private OpenApiConvertSettings _settings = new OpenApiConvertSettings(); - [Fact] public void CreatePathsThrowArgumentNullContext() { // Arrange OpenApiDocument openApiDocument = new(); ODataContext context = null; + var mockModel = new Mock().Object; // Act & Assert - Assert.Throws("context", () => context.CreatePaths(openApiDocument)); + Assert.Throws("context", () => context.AddPathsToDocument(openApiDocument)); + Assert.Throws("document", () => new ODataContext(mockModel).AddPathsToDocument(null)); } [Fact] @@ -36,7 +37,8 @@ public void CreatePathsReturnsForEmptyModel() ODataContext context = new ODataContext(model); // Act - var paths = context.CreatePaths(openApiDocument); + context.AddPathsToDocument(openApiDocument); + var paths = openApiDocument.Paths; // Assert Assert.NotNull(paths); @@ -59,7 +61,8 @@ public void CreatePathsReturnsForBasicModel(bool useAnnotationToGeneratePath, in ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(openApiDocument); + context.AddPathsToDocument(openApiDocument); + var paths = openApiDocument.Paths; // Assert Assert.NotNull(paths); @@ -120,7 +123,8 @@ public void CreatePathsReturnsForBasicModelWithPrefix(bool useAnnotationToGenera ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(openApiDocument); + context.AddPathsToDocument(openApiDocument); + var paths = openApiDocument.Paths; // Assert Assert.NotNull(paths); @@ -178,7 +182,8 @@ public void CreatePathsReturnsForContractModelWithHierarhicalClass() ODataContext context = new ODataContext(model, settings); // Act - var paths = context.CreatePaths(openApiDocument); + context.AddPathsToDocument(openApiDocument); + var paths = openApiDocument.Paths; // Assert Assert.NotNull(paths); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs index dff2f3cba..6686ea29a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSecuritySchemeGeneratorTests.cs @@ -26,9 +26,11 @@ public async Task CreateSecuritySchemesWorksForAuthorizationsOnEntitySetContaine { // Arrange ODataContext context = new ODataContext(GetEdmModel()); + OpenApiDocument openApiDocument = new(); // Act - var schemes = context.CreateSecuritySchemes(); + context.AddSecuritySchemesToDocument(openApiDocument); + var schemes = openApiDocument.Components.SecuritySchemes; // Assert Assert.NotNull(schemes); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json index 2eb08cef5..24a0baa40 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json @@ -17,6 +17,9 @@ ], "summary": "Get entities from City", "operationId": "City.City.ListCity", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -39,11 +42,11 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Name", "Name desc" - ], - "type": "string" + ] } }, { @@ -52,10 +55,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -64,10 +67,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -143,10 +146,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -155,10 +158,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -184,6 +187,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -219,6 +225,9 @@ ], "summary": "Delete entity from City", "operationId": "City.City.DeleteCity", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -254,6 +263,10 @@ ], "summary": "Get the number of the resource", "operationId": "City.GetCount-8728", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -280,6 +293,9 @@ ], "summary": "Get entities from CountryOrRegion", "operationId": "CountryOrRegion.CountryOrRegion.ListCountryOrRegion", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -302,11 +318,11 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "Name", "Name desc" - ], - "type": "string" + ] } }, { @@ -315,10 +331,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -327,10 +343,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -406,10 +422,10 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "Name" - ], - "type": "string" + ] } }, { @@ -418,10 +434,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -447,6 +463,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -482,6 +501,9 @@ ], "summary": "Delete entity from CountryOrRegion", "operationId": "CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -517,6 +539,10 @@ ], "summary": "Get the number of the resource", "operationId": "CountryOrRegion.GetCount-daf5", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -553,13 +579,13 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "UserName", "HomeAddress", "WorkAddress", "Addresses" - ], - "type": "string" + ] } }, { @@ -568,10 +594,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -597,6 +623,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -628,6 +657,9 @@ "summary": "Get entities from People", "description": "People's description.", "operationId": "People.Person.ListPerson", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -650,6 +682,7 @@ "description": "Order items by property values", "type": "array", "items": { + "type": "string", "enum": [ "UserName", "UserName desc", @@ -659,8 +692,7 @@ "WorkAddress desc", "Addresses", "Addresses desc" - ], - "type": "string" + ] } }, { @@ -669,13 +701,13 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "UserName", "HomeAddress", "WorkAddress", "Addresses" - ], - "type": "string" + ] } }, { @@ -684,10 +716,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -763,13 +795,13 @@ "description": "Select properties to be returned", "type": "array", "items": { + "type": "string", "enum": [ "UserName", "HomeAddress", "WorkAddress", "Addresses" - ], - "type": "string" + ] } }, { @@ -778,10 +810,10 @@ "description": "Expand related entities", "type": "array", "items": { + "type": "string", "enum": [ "*" - ], - "type": "string" + ] } } ], @@ -807,6 +839,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -842,6 +877,9 @@ ], "summary": "Delete entity from People", "operationId": "People.Person.DeletePerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -877,6 +915,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.GetCount-dd8d", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -898,18 +940,113 @@ } }, "definitions": { + "DefaultNs.ODataErrors.ODataError": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "$ref": "#/definitions/DefaultNs.ODataErrors.MainError" + } + } + }, + "DefaultNs.ODataErrors.MainError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string", + "x-ms-primary-error-message": true + }, + "target": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/DefaultNs.ODataErrors.ErrorDetails" + } + }, + "innerError": { + "$ref": "#/definitions/DefaultNs.ODataErrors.InnerError" + } + } + }, + "DefaultNs.ODataErrors.ErrorDetails": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": "string" + } + } + }, + "DefaultNs.ODataErrors.InnerError": { + "type": "object", + "description": "The structure of this object is service-specific" + }, + "ODataCountResponse": { + "type": "number", + "format": "int64" + }, + "ReferenceUpdate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + }, + "@odata.type": { + "type": "string" + } + } + }, + "ReferenceCreate": { + "type": "object", + "properties": { + "@odata.id": { + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "ReferenceNumeric": { + "type": "string", + "enum": [ + "-INF", + "INF", + "NaN" + ] + }, "DefaultNs.Color": { - "title": "Color", + "type": "string", "description": "Enum type 'Color' description.", + "title": "Color", "enum": [ "Blue", "White" - ], - "type": "string" + ] }, "DefaultNs.Person": { - "title": "Person", "type": "object", + "title": "Person", "properties": { "UserName": { "type": "string" @@ -943,8 +1080,8 @@ } }, "DefaultNs.City": { - "title": "City", "type": "object", + "title": "City", "properties": { "Name": { "type": "string" @@ -955,8 +1092,8 @@ } }, "DefaultNs.CountryOrRegion": { - "title": "CountryOrRegion", "type": "object", + "title": "CountryOrRegion", "properties": { "Name": { "type": "string" @@ -967,14 +1104,14 @@ } }, "DefaultNs.Address": { - "title": "Address", "type": "object", + "title": "Address", "properties": { "Id": { + "type": "number", "format": "int32", "maximum": 2147483647, - "minimum": -2147483648, - "type": "number" + "minimum": -2147483648 }, "City": { "$ref": "#/definitions/DefaultNs.City" @@ -993,8 +1130,8 @@ "$ref": "#/definitions/DefaultNs.Address" }, { - "title": "WorkAddress", "type": "object", + "title": "WorkAddress", "properties": { "CountryOrRegion": { "$ref": "#/definitions/DefaultNs.CountryOrRegion" @@ -1012,74 +1149,9 @@ } } }, - "DefaultNs.ODataErrors.ODataError": { - "required": [ - "error" - ], - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/DefaultNs.ODataErrors.MainError" - } - } - }, - "DefaultNs.ODataErrors.MainError": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string", - "x-ms-primary-error-message": true - }, - "target": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/DefaultNs.ODataErrors.ErrorDetails" - } - }, - "innerError": { - "$ref": "#/definitions/DefaultNs.ODataErrors.InnerError" - } - } - }, - "DefaultNs.ODataErrors.ErrorDetails": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "DefaultNs.ODataErrors.InnerError": { - "description": "The structure of this object is service-specific", - "type": "object" - }, - "ODataCountResponse": { - "format": "int64", - "type": "number" - }, "DefaultNs.PersonCollectionResponse": { - "title": "Collection of Person", "type": "object", + "title": "Collection of Person", "properties": { "value": { "type": "array", @@ -1090,8 +1162,8 @@ } }, "DefaultNs.CityCollectionResponse": { - "title": "Collection of City", "type": "object", + "title": "Collection of City", "properties": { "value": { "type": "array", @@ -1102,8 +1174,8 @@ } }, "DefaultNs.CountryOrRegionCollectionResponse": { - "title": "Collection of CountryOrRegion", "type": "object", + "title": "Collection of CountryOrRegion", "properties": { "value": { "type": "array", @@ -1114,8 +1186,8 @@ } }, "DefaultNs.AddressCollectionResponse": { - "title": "Collection of DefaultNs.Address", "type": "object", + "title": "Collection of DefaultNs.Address", "properties": { "value": { "type": "array", @@ -1124,36 +1196,6 @@ } } } - }, - "ReferenceUpdate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - }, - "@odata.type": { - "type": "string" - } - } - }, - "ReferenceCreate": { - "type": "object", - "properties": { - "@odata.id": { - "type": "string" - } - }, - "additionalProperties": { - "type": "object" - } - }, - "ReferenceNumeric": { - "enum": [ - "-INF", - "INF", - "NaN" - ], - "type": "string" } }, "parameters": { 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 430082f1c..f4087138d 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 @@ -13,6 +13,8 @@ paths: - City.City summary: Get entities from City operationId: City.City.ListCity + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -120,6 +122,8 @@ paths: operationId: City.City.UpdateCity consumes: - application/json + produces: + - application/json parameters: - in: path name: Name @@ -144,6 +148,8 @@ paths: - City.City summary: Delete entity from City operationId: City.City.DeleteCity + produces: + - application/json parameters: - in: path name: Name @@ -168,6 +174,9 @@ paths: - City.City summary: Get the number of the resource operationId: City.GetCount-8728 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -183,6 +192,8 @@ paths: - CountryOrRegion.CountryOrRegion summary: Get entities from CountryOrRegion operationId: CountryOrRegion.CountryOrRegion.ListCountryOrRegion + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -290,6 +301,8 @@ paths: operationId: CountryOrRegion.CountryOrRegion.UpdateCountryOrRegion consumes: - application/json + produces: + - application/json parameters: - in: path name: Name @@ -314,6 +327,8 @@ paths: - CountryOrRegion.CountryOrRegion summary: Delete entity from CountryOrRegion operationId: CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion + produces: + - application/json parameters: - in: path name: Name @@ -338,6 +353,9 @@ paths: - CountryOrRegion.CountryOrRegion summary: Get the number of the resource operationId: CountryOrRegion.GetCount-daf5 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -390,6 +408,8 @@ paths: operationId: Me.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -411,6 +431,8 @@ paths: summary: Get entities from People description: People's description. operationId: People.Person.ListPerson + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -530,6 +552,8 @@ paths: operationId: People.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -554,6 +578,8 @@ paths: - People.Person summary: Delete entity from People operationId: People.Person.DeletePerson + produces: + - application/json parameters: - in: path name: UserName @@ -578,6 +604,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.GetCount-dd8d + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' From 44aee0b975b1a43be776b2d83dac2b6e9c0afb4e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 22 Jan 2025 10:02:04 -0500 Subject: [PATCH 088/103] fix: updates v2 definitions for missing produces/consumes Signed-off-by: Vincent Biret --- .../Resources/Multiple.Schema.OpenApi.V2.json | 211 +++ .../Resources/Multiple.Schema.OpenApi.V2.yaml | 145 ++ .../Resources/TripService.OpenApi.V2.json | 1519 ++++++++++++++++- .../Resources/TripService.OpenApi.V2.yaml | 1019 +++++++++++ 4 files changed, 2870 insertions(+), 24 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json index abe6a051a..857c4a3e4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json @@ -17,6 +17,9 @@ ], "summary": "Get entities from Categories", "operationId": "Categories.CategoryDto.ListCategoryDto", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -207,6 +210,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -245,6 +251,9 @@ ], "summary": "Delete entity from Categories", "operationId": "Categories.CategoryDto.DeleteCategoryDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -283,6 +292,10 @@ ], "summary": "Get the number of the resource", "operationId": "Categories.GetCount-2f72", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -309,6 +322,9 @@ ], "summary": "Get entities from Documents", "operationId": "Documents.DocumentDto.ListDocumentDto", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -519,6 +535,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -557,6 +576,9 @@ ], "summary": "Delete entity from Documents", "operationId": "Documents.DocumentDto.DeleteDocumentDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -595,6 +617,9 @@ ], "summary": "Invoke action Upload", "operationId": "Documents.DocumentDto.Upload", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -627,6 +652,9 @@ ], "summary": "Get Revisions from Documents", "operationId": "Documents.ListRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -761,6 +789,9 @@ ], "summary": "Delete ref of navigation property Revisions for Documents", "operationId": "Documents.revisions.DeleteRefRevisionDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -810,6 +841,10 @@ ], "summary": "Get the number of the resource", "operationId": "Documents.Revisions.GetCount-f834", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -847,6 +882,9 @@ ], "summary": "Get ref of Revisions from Documents", "operationId": "Documents.ListRefRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -936,6 +974,12 @@ ], "summary": "Create new navigation property ref to Revisions for Documents", "operationId": "Documents.CreateRefRevisions", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -968,6 +1012,9 @@ ], "summary": "Delete ref of navigation property Revisions for Documents", "operationId": "Documents.DeleteRefRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1013,6 +1060,9 @@ ], "summary": "Get Tags property value", "operationId": "Documents.ListTags", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1096,6 +1146,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1144,6 +1197,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1192,6 +1248,10 @@ ], "summary": "Get the number of the resource", "operationId": "Documents.Tags.GetCount-ed53", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -1229,6 +1289,10 @@ ], "summary": "Get the number of the resource", "operationId": "Documents.GetCount-f555", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -1255,6 +1319,9 @@ ], "summary": "Get entities from Libraries", "operationId": "Libraries.LibraryDto.ListLibraryDto", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -1485,6 +1552,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1523,6 +1593,9 @@ ], "summary": "Delete entity from Libraries", "operationId": "Libraries.LibraryDto.DeleteLibraryDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1561,6 +1634,9 @@ ], "summary": "Get Documents from Libraries", "operationId": "Libraries.ListDocuments", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1674,6 +1750,9 @@ ], "summary": "Delete ref of navigation property Documents for Libraries", "operationId": "Libraries.documents.DeleteRefDocumentDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1723,6 +1802,9 @@ ], "summary": "Get Tags property value", "operationId": "Libraries.Documents.ListTags", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1817,6 +1899,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1876,6 +1961,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1935,6 +2023,10 @@ ], "summary": "Get the number of the resource", "operationId": "Libraries.Documents.Tags.GetCount-2853", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -1983,6 +2075,10 @@ ], "summary": "Get the number of the resource", "operationId": "Libraries.Documents.GetCount-34c7", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -2020,6 +2116,9 @@ ], "summary": "Get ref of Documents from Libraries", "operationId": "Libraries.ListRefDocuments", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2095,6 +2194,12 @@ ], "summary": "Create new navigation property ref to Documents for Libraries", "operationId": "Libraries.CreateRefDocuments", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2127,6 +2232,9 @@ ], "summary": "Delete ref of navigation property Documents for Libraries", "operationId": "Libraries.DeleteRefDocuments", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2172,6 +2280,10 @@ ], "summary": "Get the number of the resource", "operationId": "Libraries.GetCount-e13e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -2198,6 +2310,9 @@ ], "summary": "Get entities from Revisions", "operationId": "Revisions.RevisionDto.ListRevisionDto", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -2436,6 +2551,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2474,6 +2592,9 @@ ], "summary": "Delete entity from Revisions", "operationId": "Revisions.RevisionDto.DeleteRevisionDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2664,6 +2785,12 @@ ], "summary": "Update the ref of navigation property Document in Revisions", "operationId": "Revisions.UpdateRefDocument", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2696,6 +2823,9 @@ ], "summary": "Delete ref of navigation property Document for Revisions", "operationId": "Revisions.DeleteRefDocument", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2734,6 +2864,9 @@ ], "summary": "Get DocumentClasses property value", "operationId": "Revisions.Document.ListDocumentClasses", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2840,6 +2973,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2888,6 +3024,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2936,6 +3075,10 @@ ], "summary": "Get the number of the resource", "operationId": "Revisions.Document.DocumentClasses.GetCount-6342", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -2973,6 +3116,9 @@ ], "summary": "Get Tags property value", "operationId": "Revisions.Document.ListTags", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3078,6 +3224,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3126,6 +3275,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3174,6 +3326,10 @@ ], "summary": "Get the number of the resource", "operationId": "Revisions.Document.Tags.GetCount-161f", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -3211,6 +3367,10 @@ ], "summary": "Get the number of the resource", "operationId": "Revisions.GetCount-c6a5", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -3237,6 +3397,9 @@ ], "summary": "Get entities from Tasks", "operationId": "Tasks.DocumentDto.ListDocumentDto", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -3447,6 +3610,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3485,6 +3651,9 @@ ], "summary": "Delete entity from Tasks", "operationId": "Tasks.DocumentDto.DeleteDocumentDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3523,6 +3692,9 @@ ], "summary": "Invoke action Upload", "operationId": "Tasks.DocumentDto.Upload", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3555,6 +3727,9 @@ ], "summary": "Get Revisions from Tasks", "operationId": "Tasks.ListRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3689,6 +3864,9 @@ ], "summary": "Delete ref of navigation property Revisions for Tasks", "operationId": "Tasks.revisions.DeleteRefRevisionDto", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3738,6 +3916,10 @@ ], "summary": "Get the number of the resource", "operationId": "Tasks.Revisions.GetCount-9297", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -3775,6 +3957,9 @@ ], "summary": "Get ref of Revisions from Tasks", "operationId": "Tasks.ListRefRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3864,6 +4049,12 @@ ], "summary": "Create new navigation property ref to Revisions for Tasks", "operationId": "Tasks.CreateRefRevisions", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3896,6 +4087,9 @@ ], "summary": "Delete ref of navigation property Revisions for Tasks", "operationId": "Tasks.DeleteRefRevisions", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3941,6 +4135,9 @@ ], "summary": "Get Tags property value", "operationId": "Tasks.ListTags", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -4024,6 +4221,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -4072,6 +4272,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -4120,6 +4323,10 @@ ], "summary": "Get the number of the resource", "operationId": "Tasks.Tags.GetCount-3a1b", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -4157,6 +4364,10 @@ ], "summary": "Get the number of the resource", "operationId": "Tasks.GetCount-2961", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" 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 0d6ae4504..c925391ea 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 @@ -13,6 +13,8 @@ paths: - Categories.CategoryDto summary: Get entities from Categories operationId: Categories.CategoryDto.ListCategoryDto + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -143,6 +145,8 @@ paths: operationId: Categories.CategoryDto.UpdateCategoryDto consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -170,6 +174,8 @@ paths: - Categories.CategoryDto summary: Delete entity from Categories operationId: Categories.CategoryDto.DeleteCategoryDto + produces: + - application/json parameters: - in: path name: Id @@ -197,6 +203,9 @@ paths: - Categories.CategoryDto summary: Get the number of the resource operationId: Categories.GetCount-2f72 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -212,6 +221,8 @@ paths: - Documents.DocumentDto summary: Get entities from Documents operationId: Documents.DocumentDto.ListDocumentDto + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -362,6 +373,8 @@ paths: operationId: Documents.DocumentDto.UpdateDocumentDto consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -389,6 +402,8 @@ paths: - Documents.DocumentDto summary: Delete entity from Documents operationId: Documents.DocumentDto.DeleteDocumentDto + produces: + - application/json parameters: - in: path name: Id @@ -416,6 +431,8 @@ paths: - Documents.DocumentDto.Actions summary: Invoke action Upload operationId: Documents.DocumentDto.Upload + produces: + - application/json parameters: - in: path name: Id @@ -439,6 +456,8 @@ paths: - Documents.RevisionDto summary: Get Revisions from Documents operationId: Documents.ListRevisions + produces: + - application/json parameters: - in: path name: Id @@ -542,6 +561,8 @@ paths: - Documents.RevisionDto summary: Delete ref of navigation property Revisions for Documents operationId: Documents.revisions.DeleteRefRevisionDto + produces: + - application/json parameters: - in: path name: Id @@ -578,6 +599,9 @@ paths: - Documents.RevisionDto summary: Get the number of the resource operationId: Documents.Revisions.GetCount-f834 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -602,6 +626,8 @@ paths: - Documents.RevisionDto summary: Get ref of Revisions from Documents operationId: Documents.ListRefRevisions + produces: + - application/json parameters: - in: path name: Id @@ -669,6 +695,10 @@ paths: - Documents.RevisionDto summary: Create new navigation property ref to Revisions for Documents operationId: Documents.CreateRefRevisions + consumes: + - application/json + produces: + - application/json parameters: - in: path name: Id @@ -691,6 +721,8 @@ paths: - Documents.RevisionDto summary: Delete ref of navigation property Revisions for Documents operationId: Documents.DeleteRefRevisions + produces: + - application/json parameters: - in: path name: Id @@ -723,6 +755,8 @@ paths: - Documents.DocumentTagRelDto summary: Get Tags property value operationId: Documents.ListTags + produces: + - application/json parameters: - in: path name: Id @@ -775,6 +809,8 @@ paths: operationId: Documents.UpdateTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -808,6 +844,8 @@ paths: operationId: Documents.SetTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -841,6 +879,9 @@ paths: - Documents.DocumentTagRelDto summary: Get the number of the resource operationId: Documents.Tags.GetCount-ed53 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -865,6 +906,9 @@ paths: - Documents.DocumentDto summary: Get the number of the resource operationId: Documents.GetCount-f555 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -880,6 +924,8 @@ paths: - Libraries.LibraryDto summary: Get entities from Libraries operationId: Libraries.LibraryDto.ListLibraryDto + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -1050,6 +1096,8 @@ paths: operationId: Libraries.LibraryDto.UpdateLibraryDto consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1077,6 +1125,8 @@ paths: - Libraries.LibraryDto summary: Delete entity from Libraries operationId: Libraries.LibraryDto.DeleteLibraryDto + produces: + - application/json parameters: - in: path name: Id @@ -1104,6 +1154,8 @@ paths: - Libraries.DocumentDto summary: Get Documents from Libraries operationId: Libraries.ListDocuments + produces: + - application/json parameters: - in: path name: Id @@ -1186,6 +1238,8 @@ paths: - Libraries.DocumentDto summary: Delete ref of navigation property Documents for Libraries operationId: Libraries.documents.DeleteRefDocumentDto + produces: + - application/json parameters: - in: path name: Id @@ -1222,6 +1276,8 @@ paths: - Libraries.DocumentDto.DocumentTagRelDto summary: Get Tags property value operationId: Libraries.Documents.ListTags + produces: + - application/json parameters: - in: path name: Id @@ -1283,6 +1339,8 @@ paths: operationId: Libraries.Documents.UpdateTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1325,6 +1383,8 @@ paths: operationId: Libraries.Documents.SetTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1367,6 +1427,9 @@ paths: - Libraries.DocumentDto.DocumentTagRelDto summary: Get the number of the resource operationId: Libraries.Documents.Tags.GetCount-2853 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -1400,6 +1463,9 @@ paths: - Libraries.DocumentDto summary: Get the number of the resource operationId: Libraries.Documents.GetCount-34c7 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -1424,6 +1490,8 @@ paths: - Libraries.DocumentDto summary: Get ref of Documents from Libraries operationId: Libraries.ListRefDocuments + produces: + - application/json parameters: - in: path name: Id @@ -1477,6 +1545,10 @@ paths: - Libraries.DocumentDto summary: Create new navigation property ref to Documents for Libraries operationId: Libraries.CreateRefDocuments + consumes: + - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1499,6 +1571,8 @@ paths: - Libraries.DocumentDto summary: Delete ref of navigation property Documents for Libraries operationId: Libraries.DeleteRefDocuments + produces: + - application/json parameters: - in: path name: Id @@ -1531,6 +1605,9 @@ paths: - Libraries.LibraryDto summary: Get the number of the resource operationId: Libraries.GetCount-e13e + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -1546,6 +1623,8 @@ paths: - Revisions.RevisionDto summary: Get entities from Revisions operationId: Revisions.RevisionDto.ListRevisionDto + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -1724,6 +1803,8 @@ paths: operationId: Revisions.RevisionDto.UpdateRevisionDto consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1751,6 +1832,8 @@ paths: - Revisions.RevisionDto summary: Delete entity from Revisions operationId: Revisions.RevisionDto.DeleteRevisionDto + produces: + - application/json parameters: - in: path name: Id @@ -1901,6 +1984,10 @@ paths: - Revisions.Document summary: Update the ref of navigation property Document in Revisions operationId: Revisions.UpdateRefDocument + consumes: + - application/json + produces: + - application/json parameters: - in: path name: Id @@ -1923,6 +2010,8 @@ paths: - Revisions.Document summary: Delete ref of navigation property Document for Revisions operationId: Revisions.DeleteRefDocument + produces: + - application/json parameters: - in: path name: Id @@ -1950,6 +2039,8 @@ paths: - Revisions.Document.DocumentClass summary: Get DocumentClasses property value operationId: Revisions.Document.ListDocumentClasses + produces: + - application/json parameters: - in: path name: Id @@ -2025,6 +2116,8 @@ paths: operationId: Revisions.Document.UpdateDocumentClasses consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2058,6 +2151,8 @@ paths: operationId: Revisions.Document.SetDocumentClasses consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2091,6 +2186,9 @@ paths: - Revisions.Document.DocumentClass summary: Get the number of the resource operationId: Revisions.Document.DocumentClasses.GetCount-6342 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -2115,6 +2213,8 @@ paths: - Revisions.Document.DocumentTagRel summary: Get Tags property value operationId: Revisions.Document.ListTags + produces: + - application/json parameters: - in: path name: Id @@ -2189,6 +2289,8 @@ paths: operationId: Revisions.Document.UpdateTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2222,6 +2324,8 @@ paths: operationId: Revisions.Document.SetTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2255,6 +2359,9 @@ paths: - Revisions.Document.DocumentTagRel summary: Get the number of the resource operationId: Revisions.Document.Tags.GetCount-161f + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -2279,6 +2386,9 @@ paths: - Revisions.RevisionDto summary: Get the number of the resource operationId: Revisions.GetCount-c6a5 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -2294,6 +2404,8 @@ paths: - Tasks.DocumentDto summary: Get entities from Tasks operationId: Tasks.DocumentDto.ListDocumentDto + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -2444,6 +2556,8 @@ paths: operationId: Tasks.DocumentDto.UpdateDocumentDto consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2471,6 +2585,8 @@ paths: - Tasks.DocumentDto summary: Delete entity from Tasks operationId: Tasks.DocumentDto.DeleteDocumentDto + produces: + - application/json parameters: - in: path name: Id @@ -2498,6 +2614,8 @@ paths: - Tasks.DocumentDto.Actions summary: Invoke action Upload operationId: Tasks.DocumentDto.Upload + produces: + - application/json parameters: - in: path name: Id @@ -2521,6 +2639,8 @@ paths: - Tasks.RevisionDto summary: Get Revisions from Tasks operationId: Tasks.ListRevisions + produces: + - application/json parameters: - in: path name: Id @@ -2624,6 +2744,8 @@ paths: - Tasks.RevisionDto summary: Delete ref of navigation property Revisions for Tasks operationId: Tasks.revisions.DeleteRefRevisionDto + produces: + - application/json parameters: - in: path name: Id @@ -2660,6 +2782,9 @@ paths: - Tasks.RevisionDto summary: Get the number of the resource operationId: Tasks.Revisions.GetCount-9297 + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -2684,6 +2809,8 @@ paths: - Tasks.RevisionDto summary: Get ref of Revisions from Tasks operationId: Tasks.ListRefRevisions + produces: + - application/json parameters: - in: path name: Id @@ -2751,6 +2878,10 @@ paths: - Tasks.RevisionDto summary: Create new navigation property ref to Revisions for Tasks operationId: Tasks.CreateRefRevisions + consumes: + - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2773,6 +2904,8 @@ paths: - Tasks.RevisionDto summary: Delete ref of navigation property Revisions for Tasks operationId: Tasks.DeleteRefRevisions + produces: + - application/json parameters: - in: path name: Id @@ -2805,6 +2938,8 @@ paths: - Tasks.DocumentTagRelDto summary: Get Tags property value operationId: Tasks.ListTags + produces: + - application/json parameters: - in: path name: Id @@ -2857,6 +2992,8 @@ paths: operationId: Tasks.UpdateTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2890,6 +3027,8 @@ paths: operationId: Tasks.SetTags consumes: - application/json + produces: + - application/json parameters: - in: path name: Id @@ -2923,6 +3062,9 @@ paths: - Tasks.DocumentTagRelDto summary: Get the number of the resource operationId: Tasks.Tags.GetCount-3a1b + produces: + - text/plain + - application/json parameters: - in: path name: Id @@ -2947,6 +3089,9 @@ paths: - Tasks.DocumentDto summary: Get the number of the resource operationId: Tasks.GetCount-2961 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index c92129afc..2a1aa2324 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -18,6 +18,9 @@ ], "summary": "Get entities from Airlines", "operationId": "Airlines.Airline.ListAirline", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -169,6 +172,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -204,6 +210,9 @@ ], "summary": "Delete entity from Airlines", "operationId": "Airlines.Airline.DeleteAirline", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -239,6 +248,10 @@ ], "summary": "Get the number of the resource", "operationId": "Airlines.GetCount-27a7", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -265,6 +278,9 @@ ], "summary": "Get entities from Airports", "operationId": "Airports.Airport.ListAirport", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -416,6 +432,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -451,6 +470,9 @@ ], "summary": "Delete entity from Airports", "operationId": "Airports.Airport.DeleteAirport", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -538,6 +560,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -661,6 +686,12 @@ ], "summary": "Update the ref of navigation property EmergencyAuthority in Airports", "operationId": "Airports.UpdateRefEmergencyAuthority", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -690,6 +721,9 @@ ], "summary": "Delete ref of navigation property EmergencyAuthority for Airports", "operationId": "Airports.DeleteRefEmergencyAuthority", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -725,6 +759,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Airports.EmergencyAuthority.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -795,6 +832,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -840,6 +880,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -885,6 +928,10 @@ ], "summary": "Get the number of the resource", "operationId": "Airports.EmergencyAuthority.AddressInfo.GetCount-2ffe", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -950,6 +997,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Airports.EmergencyAuthority.AddressInfo.GetCount.AsEventLocation-e708", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -1036,6 +1087,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1107,7 +1161,8 @@ "summary": "Get Photo for the navigation property EmergencyAuthority from Airports", "operationId": "Airports.GetEmergencyAuthorityPhoto-13fb", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -1141,6 +1196,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1176,6 +1234,9 @@ ], "summary": "Delete Photo for the navigation property EmergencyAuthority in Airports", "operationId": "Airports.DeleteEmergencyAuthorityPhoto-13fb", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1210,6 +1271,10 @@ ], "summary": "Get the number of the resource", "operationId": "Airports.GetCount-60cc", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -1356,6 +1421,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -1393,6 +1461,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -1462,6 +1533,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -1506,6 +1580,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -1550,6 +1627,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount-38f2", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -1611,6 +1692,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-5575", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -1698,6 +1783,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -1770,6 +1858,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "Me.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPutBody" @@ -1798,6 +1892,9 @@ ], "summary": "Delete ref of navigation property BestFriend for Me", "operationId": "Me.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -1832,6 +1929,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -1901,6 +2001,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -1945,6 +2048,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -1989,6 +2095,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount-b695", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -2050,6 +2160,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-0105", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -2134,6 +2248,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -2303,7 +2420,8 @@ "summary": "Get Photo for the navigation property BestFriend from Me", "operationId": "Me.GetBestFriendPhoto-8333", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "responses": { "200": { @@ -2334,6 +2452,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -2368,6 +2489,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in Me", "operationId": "Me.DeleteBestFriendPhoto-8333", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -2402,6 +2526,9 @@ "summary": "Get Friends from Me", "description": "Friends of person", "operationId": "Me.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -2488,6 +2615,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2530,6 +2660,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2607,6 +2740,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2659,6 +2795,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -2711,6 +2850,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.AddressInfo.GetCount-246e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -2790,6 +2933,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-42c7", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -2890,6 +3037,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3117,7 +3267,8 @@ "summary": "Get Photo for the navigation property Friends from Me", "operationId": "Me.GetFriendsPhoto-287d", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -3158,6 +3309,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3200,6 +3354,9 @@ ], "summary": "Delete Photo for the navigation property Friends in Me", "operationId": "Me.DeleteFriendsPhoto-287d", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -3241,6 +3398,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.GetCount-182b", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -3287,6 +3448,9 @@ "summary": "Get ref of Friends from Me", "description": "Friends of person", "operationId": "Me.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -3348,6 +3512,12 @@ ], "summary": "Create new navigation property ref to Friends for Me", "operationId": "Me.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPostBody" @@ -3376,6 +3546,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -3417,6 +3590,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "Me.ListFriends.AsEmployee-f4a5", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -3498,6 +3674,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.GetCount.AsEmployee-884b", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -3543,6 +3723,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "Me.ListFriends.AsManager-98ae", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -3624,6 +3807,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.GetCount.AsManager-9376", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -3720,6 +3907,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -3837,6 +4027,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsEmployee.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -3906,6 +4099,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -3950,6 +4146,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -3994,6 +4193,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.AddressInfo.GetCount-8488", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -4055,6 +4258,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-9375", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -4142,6 +4349,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -4214,6 +4424,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "Me.AsEmployee.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPutBody" @@ -4242,6 +4458,9 @@ ], "summary": "Delete ref of navigation property BestFriend for Me", "operationId": "Me.AsEmployee.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -4276,6 +4495,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsEmployee.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -4345,6 +4567,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -4389,6 +4614,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -4433,6 +4661,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -4494,6 +4726,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -4578,6 +4814,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -4696,7 +4935,8 @@ "summary": "Get Photo for the navigation property BestFriend from Me", "operationId": "Me.GetBestFriendPhoto-4dc7", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "responses": { "200": { @@ -4727,6 +4967,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -4761,6 +5004,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in Me", "operationId": "Me.DeleteBestFriendPhoto-4dc7", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -4795,6 +5041,9 @@ "summary": "Get Friends from Me", "description": "Friends of person", "operationId": "Me.AsEmployee.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -4881,6 +5130,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.AsEmployee.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -4923,6 +5175,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsEmployee.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -5000,6 +5255,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -5052,6 +5310,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -5104,6 +5365,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Friends.AddressInfo.GetCount-660e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -5183,6 +5448,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-feb8", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -5283,8 +5552,11 @@ "consumes": [ "application/json" ], - "parameters": [ - { + "produces": [ + "application/json" + ], + "parameters": [ + { "in": "path", "name": "UserName", "description": "The unique identifier of Person", @@ -5439,7 +5711,8 @@ "summary": "Get Photo for the navigation property Friends from Me", "operationId": "Me.GetFriendsPhoto-6e41", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -5480,6 +5753,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -5522,6 +5798,9 @@ ], "summary": "Delete Photo for the navigation property Friends in Me", "operationId": "Me.DeleteFriendsPhoto-6e41", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -5563,6 +5842,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Friends.GetCount-0cb7", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -5609,6 +5892,9 @@ "summary": "Get ref of Friends from Me", "description": "Friends of person", "operationId": "Me.AsEmployee.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -5670,6 +5956,12 @@ ], "summary": "Create new navigation property ref to Friends for Me", "operationId": "Me.AsEmployee.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPostBody" @@ -5698,6 +5990,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.AsEmployee.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -5739,6 +6034,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "Me.ListFriends.AsManager-f993", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -5820,6 +6118,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.GetCount.AsManager-85ff", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -5916,6 +6218,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -5982,6 +6287,9 @@ ], "summary": "Get Peers from Me", "operationId": "Me.AsEmployee.ListPeers", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -6052,6 +6360,9 @@ ], "summary": "Delete ref of navigation property Peers for Me", "operationId": "Me.AsEmployee.peers.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6094,6 +6405,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsEmployee.Peers.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6171,6 +6485,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6223,6 +6540,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6275,6 +6595,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Peers.AddressInfo.GetCount-3e91", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -6354,6 +6678,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.Peers.AddressInfo.GetCount.AsEventLocation-be1d", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -6454,6 +6782,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6539,7 +6870,8 @@ "summary": "Get Photo for the navigation property Peers from Me", "operationId": "Me.GetPeersPhoto-4c48", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -6580,6 +6912,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6622,6 +6957,9 @@ ], "summary": "Delete Photo for the navigation property Peers in Me", "operationId": "Me.DeletePeersPhoto-4c48", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -6663,6 +7001,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Peers.GetCount-9fc2", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -6696,6 +7038,9 @@ ], "summary": "Get ref of Peers from Me", "operationId": "Me.AsEmployee.ListRefPeers", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -6745,6 +7090,12 @@ ], "summary": "Create new navigation property ref to Peers for Me", "operationId": "Me.AsEmployee.CreateRefPeers", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPostBody" @@ -6773,6 +7124,9 @@ ], "summary": "Delete ref of navigation property Peers for Me", "operationId": "Me.AsEmployee.DeleteRefPeers", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -6819,6 +7173,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "Me.AsEmployee.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -7026,6 +7383,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7076,6 +7436,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "Me.AsEmployee.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7225,6 +7588,9 @@ ], "summary": "Get PlanItems from Me", "operationId": "Me.AsEmployee.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7310,6 +7676,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.AsEmployee.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7366,6 +7735,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Trips.PlanItems.GetCount-a822", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -7410,6 +7783,9 @@ ], "summary": "Get ref of PlanItems from Me", "operationId": "Me.AsEmployee.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7470,6 +7846,12 @@ ], "summary": "Create new navigation property ref to PlanItems for Me", "operationId": "Me.AsEmployee.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7509,6 +7891,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.AsEmployee.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7561,6 +7946,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsEmployee.Trips.GetCount-5aa2", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -7606,6 +7995,9 @@ ], "summary": "Invoke function GetFavoriteAirline", "operationId": "Me.GetFavoriteAirline", + "produces": [ + "application/json" + ], "responses": { "200": { "$ref": "#/responses/GetFavoriteAirlineResponse" @@ -7632,6 +8024,9 @@ ], "summary": "Invoke function GetFriendsTrips", "operationId": "Me.GetFriendsTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -7709,6 +8104,12 @@ ], "summary": "Invoke action GetPeersForTrip", "operationId": "Me.GetPeersForTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/GetPeersForTripRequestBody" @@ -7791,6 +8192,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsManager.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -7860,6 +8264,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -7904,6 +8311,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -7948,6 +8358,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.AddressInfo.GetCount-75da", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -8009,6 +8423,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.AddressInfo.GetCount.AsEventLocation-f67e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -8096,6 +8514,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -8168,6 +8589,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "Me.AsManager.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPutBody" @@ -8196,6 +8623,9 @@ ], "summary": "Delete ref of navigation property BestFriend for Me", "operationId": "Me.AsManager.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -8230,6 +8660,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsManager.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -8299,6 +8732,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -8343,6 +8779,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -8387,6 +8826,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -8448,6 +8891,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -8532,6 +8979,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -8650,7 +9100,8 @@ "summary": "Get Photo for the navigation property BestFriend from Me", "operationId": "Me.GetBestFriendPhoto-bac8", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "responses": { "200": { @@ -8681,6 +9132,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -8715,6 +9169,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in Me", "operationId": "Me.DeleteBestFriendPhoto-bac8", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -8748,6 +9205,9 @@ ], "summary": "Get DirectReports from Me", "operationId": "Me.AsManager.ListDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -8818,6 +9278,9 @@ ], "summary": "Delete ref of navigation property DirectReports for Me", "operationId": "Me.AsManager.directReports.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -8860,6 +9323,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsManager.DirectReports.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -8937,6 +9403,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -8989,6 +9458,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9041,6 +9513,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.DirectReports.AddressInfo.GetCount-f650", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -9120,6 +9596,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.DirectReports.AddressInfo.GetCount.AsEventLocation-a070", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -9220,6 +9700,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9305,7 +9788,8 @@ "summary": "Get Photo for the navigation property DirectReports from Me", "operationId": "Me.GetDirectReportsPhoto-e60c", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -9346,6 +9830,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9388,6 +9875,9 @@ ], "summary": "Delete Photo for the navigation property DirectReports in Me", "operationId": "Me.DeleteDirectReportsPhoto-e60c", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9429,6 +9919,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.DirectReports.GetCount-8b92", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -9462,6 +9956,9 @@ ], "summary": "Get ref of DirectReports from Me", "operationId": "Me.AsManager.ListRefDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -9511,6 +10008,12 @@ ], "summary": "Create new navigation property ref to DirectReports for Me", "operationId": "Me.AsManager.CreateRefDirectReports", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPostBody" @@ -9539,6 +10042,9 @@ ], "summary": "Delete ref of navigation property DirectReports for Me", "operationId": "Me.AsManager.DeleteRefDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -9581,6 +10087,9 @@ "summary": "Get Friends from Me", "description": "Friends of person", "operationId": "Me.AsManager.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -9667,6 +10176,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.AsManager.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9709,6 +10221,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "Me.AsManager.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9786,6 +10301,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9838,6 +10356,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -9890,6 +10411,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.Friends.AddressInfo.GetCount-b7db", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -9969,6 +10494,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "Me.Friends.AddressInfo.GetCount.AsEventLocation-4d69", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -10069,6 +10598,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -10225,7 +10757,8 @@ "summary": "Get Photo for the navigation property Friends from Me", "operationId": "Me.GetFriendsPhoto-64bd", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -10266,6 +10799,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -10308,6 +10844,9 @@ ], "summary": "Delete Photo for the navigation property Friends in Me", "operationId": "Me.DeleteFriendsPhoto-64bd", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -10349,6 +10888,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.Friends.GetCount-60a7", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -10395,6 +10938,9 @@ "summary": "Get ref of Friends from Me", "description": "Friends of person", "operationId": "Me.AsManager.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -10456,6 +11002,12 @@ ], "summary": "Create new navigation property ref to Friends for Me", "operationId": "Me.AsManager.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/refPostBody" @@ -10484,6 +11036,9 @@ ], "summary": "Delete ref of navigation property Friends for Me", "operationId": "Me.AsManager.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -10525,6 +11080,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "Me.ListFriends.AsEmployee-fe32", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -10606,6 +11164,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Friends.GetCount.AsEmployee-6a35", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -10702,6 +11264,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -10772,6 +11337,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -10819,6 +11387,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "Me.AsManager.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -11026,6 +11597,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11076,6 +11650,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "Me.AsManager.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11225,6 +11802,9 @@ ], "summary": "Get PlanItems from Me", "operationId": "Me.AsManager.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11310,6 +11890,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.AsManager.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11366,6 +11949,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.Trips.PlanItems.GetCount-5ad2", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -11410,6 +11997,9 @@ ], "summary": "Get ref of PlanItems from Me", "operationId": "Me.AsManager.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11470,6 +12060,12 @@ ], "summary": "Create new navigation property ref to PlanItems for Me", "operationId": "Me.AsManager.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11509,6 +12105,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.AsManager.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11561,6 +12160,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.AsManager.Trips.GetCount-f3f4", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -11607,6 +12210,12 @@ "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", "operationId": "Me.ShareTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/ShareTripRequestBody" @@ -11638,6 +12247,9 @@ ], "summary": "Invoke function UpdatePersonLastName", "operationId": "Me.UpdatePersonLastName", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -11674,7 +12286,8 @@ "summary": "Get Photo for Person from Me", "operationId": "Me.Person.GetPhoto-ab7e", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "responses": { "200": { @@ -11705,6 +12318,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", @@ -11739,6 +12355,9 @@ ], "summary": "Delete Photo for Person in Me", "operationId": "Me.Person.DeletePhoto-ab7e", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -11777,6 +12396,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "Me.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -11984,6 +12606,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12034,6 +12659,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "Me.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12183,6 +12811,9 @@ ], "summary": "Get PlanItems from Me", "operationId": "Me.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12268,6 +12899,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12324,6 +12958,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Trips.PlanItems.GetCount-c250", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -12368,6 +13006,9 @@ ], "summary": "Get ref of PlanItems from Me", "operationId": "Me.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12428,6 +13069,12 @@ ], "summary": "Create new navigation property ref to PlanItems for Me", "operationId": "Me.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12467,6 +13114,9 @@ ], "summary": "Delete ref of navigation property PlanItems for Me", "operationId": "Me.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12519,6 +13169,10 @@ ], "summary": "Get the number of the resource", "operationId": "Me.Trips.GetCount-7b69", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -12564,6 +13218,9 @@ ], "summary": "Get entities from NewComePeople", "operationId": "NewComePeople.Person.ListPerson", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/top" @@ -12715,6 +13372,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12750,6 +13410,9 @@ ], "summary": "Delete entity from NewComePeople", "operationId": "NewComePeople.Person.DeletePerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12785,6 +13448,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "NewComePeople.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12855,6 +13521,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12900,6 +13569,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -12945,6 +13617,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.AddressInfo.GetCount-29d6", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -13010,6 +13686,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "NewComePeople.AddressInfo.GetCount.AsEventLocation-29d3", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -13106,6 +13786,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13192,6 +13875,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "NewComePeople.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13228,6 +13917,9 @@ ], "summary": "Delete ref of navigation property BestFriend for NewComePeople", "operationId": "NewComePeople.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13270,6 +13962,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "NewComePeople.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13347,6 +14042,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13399,6 +14097,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13451,6 +14152,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.BestFriend.AddressInfo.GetCount-513c", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -13530,6 +14235,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "NewComePeople.BestFriend.AddressInfo.GetCount.AsEventLocation-ba36", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -13630,6 +14339,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13833,7 +14545,8 @@ "summary": "Get Photo for the navigation property BestFriend from NewComePeople", "operationId": "NewComePeople.GetBestFriendPhoto-4f67", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -13874,6 +14587,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13916,6 +14632,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in NewComePeople", "operationId": "NewComePeople.DeleteBestFriendPhoto-4f67", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -13958,6 +14677,9 @@ "summary": "Get Friends from NewComePeople", "description": "Friends of person", "operationId": "NewComePeople.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14041,6 +14763,9 @@ ], "summary": "Delete ref of navigation property Friends for NewComePeople", "operationId": "NewComePeople.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14084,6 +14809,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "NewComePeople.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14162,6 +14890,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14215,6 +14946,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14268,6 +15002,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Friends.AddressInfo.GetCount-9334", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -14349,6 +15087,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "NewComePeople.Friends.AddressInfo.GetCount.AsEventLocation-be92", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -14451,6 +15193,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14682,7 +15427,8 @@ "summary": "Get Photo for the navigation property Friends from NewComePeople", "operationId": "NewComePeople.GetFriendsPhoto-e9fc", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -14724,6 +15470,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14767,6 +15516,9 @@ ], "summary": "Delete Photo for the navigation property Friends in NewComePeople", "operationId": "NewComePeople.DeleteFriendsPhoto-e9fc", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14809,6 +15561,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Friends.GetCount-2ec1", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -14856,6 +15612,9 @@ "summary": "Get ref of Friends from NewComePeople", "description": "Friends of person", "operationId": "NewComePeople.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14918,6 +15677,12 @@ ], "summary": "Create new navigation property ref to Friends for NewComePeople", "operationId": "NewComePeople.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14947,6 +15712,9 @@ ], "summary": "Delete ref of navigation property Friends for NewComePeople", "operationId": "NewComePeople.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -14989,6 +15757,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "NewComePeople.ListFriends.AsEmployee-2969", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15071,6 +15842,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Friends.GetCount.AsEmployee-4069", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -15117,6 +15892,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "NewComePeople.ListFriends.AsManager-708f", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15199,6 +15977,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Friends.GetCount.AsManager-d1d3", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -15297,6 +16079,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15367,6 +16152,9 @@ ], "summary": "Invoke function GetFavoriteAirline", "operationId": "NewComePeople.Person.GetFavoriteAirline", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15396,6 +16184,9 @@ ], "summary": "Invoke function GetFriendsTrips", "operationId": "NewComePeople.Person.GetFriendsTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15481,6 +16272,12 @@ ], "summary": "Invoke action GetPeersForTrip", "operationId": "NewComePeople.Person.GetPeersForTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15517,6 +16314,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15561,6 +16361,12 @@ "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", "operationId": "NewComePeople.Person.ShareTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15593,6 +16399,9 @@ ], "summary": "Invoke function UpdatePersonLastName", "operationId": "NewComePeople.Person.UpdatePersonLastName", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15630,7 +16439,8 @@ "summary": "Get Photo for Person from NewComePeople", "operationId": "NewComePeople.Person.GetPhoto-74be", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -15664,6 +16474,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15699,6 +16512,9 @@ ], "summary": "Delete Photo for Person in NewComePeople", "operationId": "NewComePeople.Person.DeletePhoto-74be", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15738,6 +16554,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "NewComePeople.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15944,6 +16763,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -15995,6 +16817,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "NewComePeople.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16138,6 +16963,9 @@ ], "summary": "Get PlanItems from NewComePeople", "operationId": "NewComePeople.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16220,6 +17048,9 @@ ], "summary": "Delete ref of navigation property PlanItems for NewComePeople", "operationId": "NewComePeople.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16277,6 +17108,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Trips.PlanItems.GetCount-841f", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -16322,6 +17157,9 @@ ], "summary": "Get ref of PlanItems from NewComePeople", "operationId": "NewComePeople.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16383,6 +17221,12 @@ ], "summary": "Create new navigation property ref to PlanItems for NewComePeople", "operationId": "NewComePeople.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16423,6 +17267,9 @@ ], "summary": "Delete ref of navigation property PlanItems for NewComePeople", "operationId": "NewComePeople.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16476,6 +17323,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.Trips.GetCount-d155", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -16522,6 +17373,10 @@ ], "summary": "Get the number of the resource", "operationId": "NewComePeople.GetCount-55d5", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "$ref": "#/parameters/search" @@ -16548,6 +17403,9 @@ ], "summary": "Get entities from People", "operationId": "People.Person.ListPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -16744,6 +17602,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16786,6 +17647,9 @@ ], "summary": "Delete entity from People", "operationId": "People.Person.DeletePerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16828,6 +17692,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16905,6 +17772,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -16957,6 +17827,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17009,6 +17882,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AddressInfo.GetCount-ed5a", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -17088,6 +17965,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.AddressInfo.GetCount.AsEventLocation-4abd", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -17191,6 +18072,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17281,6 +18165,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "People.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17317,6 +18207,9 @@ ], "summary": "Delete ref of navigation property BestFriend for People", "operationId": "People.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17359,6 +18252,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17436,6 +18332,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17488,6 +18387,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17540,6 +18442,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.BestFriend.AddressInfo.GetCount-16df", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -17619,6 +18525,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-fe88", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -17719,6 +18629,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -17927,7 +18840,8 @@ "summary": "Get Photo for the navigation property BestFriend from People", "operationId": "People.GetBestFriendPhoto-c3ac", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -17968,6 +18882,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18010,6 +18927,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in People", "operationId": "People.DeleteBestFriendPhoto-c3ac", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18056,6 +18976,9 @@ "url": "https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0" }, "operationId": "People.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18155,6 +19078,9 @@ "url": "https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0" }, "operationId": "People.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18205,6 +19131,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18290,6 +19219,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18350,6 +19282,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18410,6 +19345,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.AddressInfo.GetCount-bdaf", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -18505,6 +19444,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-2795", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -18621,6 +19564,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18880,7 +19826,8 @@ "summary": "Get Photo for the navigation property Friends from People", "operationId": "People.GetFriendsPhoto-12fc", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -18929,6 +19876,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -18979,6 +19929,9 @@ ], "summary": "Delete Photo for the navigation property Friends in People", "operationId": "People.DeleteFriendsPhoto-12fc", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19028,6 +19981,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.GetCount-92b9", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -19086,6 +20043,9 @@ "url": "https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0" }, "operationId": "People.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19160,6 +20120,12 @@ "url": "https://learn.microsoft.com/graph/api/person-post-friend?view=graph-rest-1.0" }, "operationId": "People.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19201,6 +20167,9 @@ "url": "https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0" }, "operationId": "People.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19250,6 +20219,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.ListFriends.AsEmployee-11bf", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19339,6 +20311,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.GetCount.AsEmployee-a96c", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -19392,6 +20368,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.ListFriends.AsManager-1cfb", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19481,6 +20460,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.GetCount.AsManager-26b3", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -19594,6 +20577,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19749,6 +20735,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsEmployee.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19826,6 +20815,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19878,6 +20870,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -19930,6 +20925,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.AddressInfo.GetCount-3d43", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -20009,6 +21008,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.AddressInfo.GetCount.AsEventLocation-ac7d", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -20112,6 +21115,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20202,6 +21208,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "People.AsEmployee.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20238,6 +21250,9 @@ ], "summary": "Delete ref of navigation property BestFriend for People", "operationId": "People.AsEmployee.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20280,6 +21295,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsEmployee.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20357,6 +21375,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20409,6 +21430,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20461,6 +21485,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.BestFriend.AddressInfo.GetCount-cb8a", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -20540,6 +21568,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-0343", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -20640,6 +21672,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20784,7 +21819,8 @@ "summary": "Get Photo for the navigation property BestFriend from People", "operationId": "People.GetBestFriendPhoto-a839", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -20825,6 +21861,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20867,6 +21906,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in People", "operationId": "People.DeleteBestFriendPhoto-a839", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -20909,6 +21951,9 @@ "summary": "Get Friends from People", "description": "Friends of person", "operationId": "People.AsEmployee.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21003,6 +22048,9 @@ ], "summary": "Delete ref of navigation property Friends for People", "operationId": "People.AsEmployee.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21053,6 +22101,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsEmployee.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21138,6 +22189,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21198,6 +22252,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21258,6 +22315,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Friends.AddressInfo.GetCount-1e8b", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -21353,6 +22414,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-1f2b", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -21469,6 +22534,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21649,7 +22717,8 @@ "summary": "Get Photo for the navigation property Friends from People", "operationId": "People.GetFriendsPhoto-1a66", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -21698,6 +22767,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21748,6 +22820,9 @@ ], "summary": "Delete Photo for the navigation property Friends in People", "operationId": "People.DeleteFriendsPhoto-1a66", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21797,6 +22872,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Friends.GetCount-4db4", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -21851,6 +22930,9 @@ "summary": "Get ref of Friends from People", "description": "Friends of person", "operationId": "People.AsEmployee.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21920,6 +23002,12 @@ ], "summary": "Create new navigation property ref to Friends for People", "operationId": "People.AsEmployee.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -21956,6 +23044,9 @@ ], "summary": "Delete ref of navigation property Friends for People", "operationId": "People.AsEmployee.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22005,6 +23096,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.ListFriends.AsManager-3e3c", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22094,6 +23188,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.GetCount.AsManager-b145", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -22206,6 +23304,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22290,6 +23391,9 @@ ], "summary": "Get Peers from People", "operationId": "People.AsEmployee.ListPeers", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22368,6 +23472,9 @@ ], "summary": "Delete ref of navigation property Peers for People", "operationId": "People.AsEmployee.peers.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22418,6 +23525,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsEmployee.Peers.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22503,6 +23613,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22563,6 +23676,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22623,6 +23739,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Peers.AddressInfo.GetCount-755d", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -22718,6 +23838,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.Peers.AddressInfo.GetCount.AsEventLocation-ef5e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -22834,6 +23958,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -22935,7 +24062,8 @@ "summary": "Get Photo for the navigation property Peers from People", "operationId": "People.GetPeersPhoto-ecda", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -22984,6 +24112,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23034,6 +24165,9 @@ ], "summary": "Delete Photo for the navigation property Peers in People", "operationId": "People.DeletePeersPhoto-ecda", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23083,6 +24217,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Peers.GetCount-44d2", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -23124,6 +24262,9 @@ ], "summary": "Get ref of Peers from People", "operationId": "People.AsEmployee.ListRefPeers", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23181,6 +24322,12 @@ ], "summary": "Create new navigation property ref to Peers for People", "operationId": "People.AsEmployee.CreateRefPeers", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23217,6 +24364,9 @@ ], "summary": "Delete ref of navigation property Peers for People", "operationId": "People.AsEmployee.DeleteRefPeers", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23271,6 +24421,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "People.AsEmployee.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23502,6 +24655,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23560,6 +24716,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "People.AsEmployee.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23725,6 +24884,9 @@ ], "summary": "Get PlanItems from People", "operationId": "People.AsEmployee.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23818,6 +24980,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.AsEmployee.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -23882,6 +25047,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Trips.PlanItems.GetCount-7df9", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -23934,6 +25103,9 @@ ], "summary": "Get ref of PlanItems from People", "operationId": "People.AsEmployee.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24002,6 +25174,12 @@ ], "summary": "Create new navigation property ref to PlanItems for People", "operationId": "People.AsEmployee.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24049,6 +25227,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.AsEmployee.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24109,6 +25290,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsEmployee.Trips.GetCount-c760", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -24162,6 +25347,9 @@ ], "summary": "Invoke function GetFavoriteAirline", "operationId": "People.Person.GetFavoriteAirline", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24198,6 +25386,9 @@ ], "summary": "Invoke function GetFriendsTrips", "operationId": "People.Person.GetFriendsTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24283,6 +25474,12 @@ ], "summary": "Invoke action GetPeersForTrip", "operationId": "People.Person.GetPeersForTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24393,6 +25590,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsManager.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24470,6 +25670,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24522,6 +25725,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24574,6 +25780,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.AddressInfo.GetCount-f84e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -24653,6 +25863,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.AddressInfo.GetCount.AsEventLocation-3722", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -24756,6 +25970,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24846,6 +26063,12 @@ "summary": "Update the best friend.", "description": "Update an instance of a best friend.", "operationId": "People.AsManager.UpdateRefBestFriend", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24882,6 +26105,9 @@ ], "summary": "Delete ref of navigation property BestFriend for People", "operationId": "People.AsManager.DeleteRefBestFriend", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -24924,6 +26150,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsManager.BestFriend.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25001,6 +26230,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25053,6 +26285,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25105,6 +26340,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.BestFriend.AddressInfo.GetCount-5a39", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -25184,6 +26423,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.BestFriend.AddressInfo.GetCount.AsEventLocation-5af3", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -25284,6 +26527,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25428,7 +26674,8 @@ "summary": "Get Photo for the navigation property BestFriend from People", "operationId": "People.GetBestFriendPhoto-f05d", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -25469,6 +26716,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25511,6 +26761,9 @@ ], "summary": "Delete Photo for the navigation property BestFriend in People", "operationId": "People.DeleteBestFriendPhoto-f05d", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25552,6 +26805,9 @@ ], "summary": "Get DirectReports from People", "operationId": "People.AsManager.ListDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25630,6 +26886,9 @@ ], "summary": "Delete ref of navigation property DirectReports for People", "operationId": "People.AsManager.directReports.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25680,6 +26939,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsManager.DirectReports.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25765,6 +27027,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25825,6 +27090,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -25885,6 +27153,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.DirectReports.AddressInfo.GetCount-f46e", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -25980,6 +27252,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.DirectReports.AddressInfo.GetCount.AsEventLocation-5d49", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -26096,6 +27372,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26197,7 +27476,8 @@ "summary": "Get Photo for the navigation property DirectReports from People", "operationId": "People.GetDirectReportsPhoto-7149", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -26246,6 +27526,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26296,6 +27579,9 @@ ], "summary": "Delete Photo for the navigation property DirectReports in People", "operationId": "People.DeleteDirectReportsPhoto-7149", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26345,6 +27631,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.DirectReports.GetCount-0ec4", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -26386,6 +27676,9 @@ ], "summary": "Get ref of DirectReports from People", "operationId": "People.AsManager.ListRefDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26443,6 +27736,12 @@ ], "summary": "Create new navigation property ref to DirectReports for People", "operationId": "People.AsManager.CreateRefDirectReports", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26479,6 +27778,9 @@ ], "summary": "Delete ref of navigation property DirectReports for People", "operationId": "People.AsManager.DeleteRefDirectReports", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26529,6 +27831,9 @@ "summary": "Get Friends from People", "description": "Friends of person", "operationId": "People.AsManager.ListFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26623,6 +27928,9 @@ ], "summary": "Delete ref of navigation property Friends for People", "operationId": "People.AsManager.friends.DeleteRefPerson", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26673,6 +27981,9 @@ ], "summary": "Get AddressInfo property value", "operationId": "People.AsManager.Friends.ListAddressInfo", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26758,6 +28069,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26818,6 +28132,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -26878,6 +28195,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.Friends.AddressInfo.GetCount-f486", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -26973,6 +28294,10 @@ "get": { "summary": "Get the number of the resource", "operationId": "People.Friends.AddressInfo.GetCount.AsEventLocation-4480", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -27089,6 +28414,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27269,7 +28597,8 @@ "summary": "Get Photo for the navigation property Friends from People", "operationId": "People.GetFriendsPhoto-b97d", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -27318,6 +28647,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27368,6 +28700,9 @@ ], "summary": "Delete Photo for the navigation property Friends in People", "operationId": "People.DeleteFriendsPhoto-b97d", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27417,6 +28752,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.Friends.GetCount-1c0c", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -27471,6 +28810,9 @@ "summary": "Get ref of Friends from People", "description": "Friends of person", "operationId": "People.AsManager.ListRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27540,6 +28882,12 @@ ], "summary": "Create new navigation property ref to Friends for People", "operationId": "People.AsManager.CreateRefFriends", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27576,6 +28924,9 @@ ], "summary": "Delete ref of navigation property Friends for People", "operationId": "People.AsManager.DeleteRefFriends", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27625,6 +28976,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.ListFriends.AsEmployee-161e", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27714,6 +29068,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Friends.GetCount.AsEmployee-f325", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -27826,6 +29184,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27914,6 +29275,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -27969,6 +29333,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "People.AsManager.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28200,6 +29567,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28258,6 +29628,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "People.AsManager.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28423,6 +29796,9 @@ ], "summary": "Get PlanItems from People", "operationId": "People.AsManager.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28516,6 +29892,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.AsManager.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28580,6 +29959,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.Trips.PlanItems.GetCount-fa08", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -28632,6 +30015,9 @@ ], "summary": "Get ref of PlanItems from People", "operationId": "People.AsManager.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28700,6 +30086,12 @@ ], "summary": "Create new navigation property ref to PlanItems for People", "operationId": "People.AsManager.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28747,6 +30139,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.AsManager.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28807,6 +30202,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.AsManager.Trips.GetCount-1f8c", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -28861,6 +30260,12 @@ "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", "operationId": "People.Person.ShareTrip", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28900,6 +30305,9 @@ ], "summary": "Invoke function UpdatePersonLastName", "operationId": "People.Person.UpdatePersonLastName", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -28949,7 +30357,8 @@ }, "operationId": "People.Person.GetPhoto-883f", "produces": [ - "application/octet-stream" + "application/octet-stream", + "application/json" ], "parameters": [ { @@ -28995,6 +30404,9 @@ "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29042,6 +30454,9 @@ "url": "https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0" }, "operationId": "People.Person.DeletePhoto-883f", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29088,6 +30503,9 @@ "url": "https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0" }, "operationId": "People.ListTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29319,6 +30737,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29377,6 +30798,9 @@ "url": "https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0" }, "operationId": "People.DeleteTrips", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29542,6 +30966,9 @@ ], "summary": "Get PlanItems from People", "operationId": "People.Trips.ListPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29635,6 +31062,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.Trips.planItems.DeleteRefPlanItem", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29699,6 +31129,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Trips.PlanItems.GetCount-9a27", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -29751,6 +31185,9 @@ ], "summary": "Get ref of PlanItems from People", "operationId": "People.Trips.ListRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29819,6 +31256,12 @@ ], "summary": "Create new navigation property ref to PlanItems for People", "operationId": "People.Trips.CreateRefPlanItems", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29866,6 +31309,9 @@ ], "summary": "Delete ref of navigation property PlanItems for People", "operationId": "People.Trips.DeleteRefPlanItems", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -29926,6 +31372,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Trips.GetCount-e877", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "path", @@ -29979,6 +31429,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.GetCount-dd8d", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -30024,6 +31478,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.Person.ListPerson.AsEmployee-013a", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -30105,6 +31562,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Person.Person.GetCount.AsEmployee-ef29", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -30150,6 +31611,9 @@ ], "summary": "Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection", "operationId": "People.Person.ListPerson.AsManager-3e14", + "produces": [ + "application/json" + ], "parameters": [ { "in": "header", @@ -30231,6 +31695,10 @@ ], "summary": "Get the number of the resource", "operationId": "People.Person.Person.GetCount.AsManager-2d48", + "produces": [ + "text/plain", + "application/json" + ], "parameters": [ { "in": "header", @@ -30277,6 +31745,9 @@ "summary": "Invoke actionImport ResetDataSource", "description": "Resets the data source to default values.", "operationId": "ActionImport.ResetDataSource", + "produces": [ + "application/json" + ], "responses": { "204": { "description": "Success" 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 0db8df73c..39a8cd5ac 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 @@ -14,6 +14,8 @@ paths: - Airlines.Airline summary: Get entities from Airlines operationId: Airlines.Airline.ListAirline + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -110,6 +112,8 @@ paths: operationId: Airlines.Airline.SetAirline consumes: - application/json + produces: + - application/json parameters: - in: path name: AirlineCode @@ -134,6 +138,8 @@ paths: - Airlines.Airline summary: Delete entity from Airlines operationId: Airlines.Airline.DeleteAirline + produces: + - application/json parameters: - in: path name: AirlineCode @@ -158,6 +164,9 @@ paths: - Airlines.Airline summary: Get the number of the resource operationId: Airlines.GetCount-27a7 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -173,6 +182,8 @@ paths: - Airports.Airport summary: Get entities from Airports operationId: Airports.Airport.ListAirport + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -269,6 +280,8 @@ paths: operationId: Airports.Airport.UpdateAirport consumes: - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -293,6 +306,8 @@ paths: - Airports.Airport summary: Delete entity from Airports operationId: Airports.Airport.DeleteAirport + produces: + - application/json parameters: - in: path name: IcaoCode @@ -352,6 +367,8 @@ paths: operationId: Airports.SetLocation consumes: - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -436,6 +453,10 @@ paths: - Airports.Person summary: Update the ref of navigation property EmergencyAuthority in Airports operationId: Airports.UpdateRefEmergencyAuthority + consumes: + - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -455,6 +476,8 @@ paths: - Airports.Person summary: Delete ref of navigation property EmergencyAuthority for Airports operationId: Airports.DeleteRefEmergencyAuthority + produces: + - application/json parameters: - in: path name: IcaoCode @@ -479,6 +502,8 @@ paths: - Airports.Person.Location summary: Get AddressInfo property value operationId: Airports.EmergencyAuthority.ListAddressInfo + produces: + - application/json parameters: - in: path name: IcaoCode @@ -521,6 +546,8 @@ paths: operationId: Airports.EmergencyAuthority.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -551,6 +578,8 @@ paths: operationId: Airports.EmergencyAuthority.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -581,6 +610,9 @@ paths: - Airports.Person.Location summary: Get the number of the resource operationId: Airports.EmergencyAuthority.AddressInfo.GetCount-2ffe + produces: + - text/plain + - application/json parameters: - in: path name: IcaoCode @@ -623,6 +655,9 @@ paths: get: summary: Get the number of the resource operationId: Airports.EmergencyAuthority.AddressInfo.GetCount.AsEventLocation-e708 + produces: + - text/plain + - application/json parameters: - in: path name: IcaoCode @@ -679,6 +714,8 @@ paths: operationId: Airports.EmergencyAuthority.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: IcaoCode @@ -728,6 +765,7 @@ paths: operationId: Airports.GetEmergencyAuthorityPhoto-13fb produces: - application/octet-stream + - application/json parameters: - in: path name: IcaoCode @@ -750,6 +788,8 @@ paths: operationId: Airports.UpdateEmergencyAuthorityPhoto-13fb consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: IcaoCode @@ -774,6 +814,8 @@ paths: - Airports.Person summary: Delete Photo for the navigation property EmergencyAuthority in Airports operationId: Airports.DeleteEmergencyAuthorityPhoto-13fb + produces: + - application/json parameters: - in: path name: IcaoCode @@ -797,6 +839,9 @@ paths: - Airports.Airport summary: Get the number of the resource operationId: Airports.GetCount-60cc + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -895,6 +940,8 @@ paths: operationId: Me.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -921,6 +968,8 @@ paths: - Me.Location summary: Get AddressInfo property value operationId: Me.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -963,6 +1012,8 @@ paths: operationId: Me.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -993,6 +1044,8 @@ paths: operationId: Me.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -1023,6 +1076,9 @@ paths: - Me.Location summary: Get the number of the resource operationId: Me.AddressInfo.GetCount-38f2 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -1064,6 +1120,9 @@ paths: get: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-5575 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -1123,6 +1182,8 @@ paths: operationId: Me.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -1175,6 +1236,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: Me.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPutBody' responses: @@ -1194,6 +1259,8 @@ paths: - Me.Person summary: Delete ref of navigation property BestFriend for Me operationId: Me.DeleteRefBestFriend + produces: + - application/json parameters: - in: header name: If-Match @@ -1218,6 +1285,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.BestFriend.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -1260,6 +1329,8 @@ paths: operationId: Me.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -1290,6 +1361,8 @@ paths: operationId: Me.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -1320,6 +1393,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount-b695 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -1361,6 +1437,9 @@ paths: get: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-0105 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -1417,6 +1496,8 @@ paths: operationId: Me.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -1535,6 +1616,7 @@ paths: operationId: Me.GetBestFriendPhoto-8333 produces: - application/octet-stream + - application/json responses: '200': description: Retrieved media content @@ -1556,6 +1638,8 @@ paths: operationId: Me.UpdateBestFriendPhoto-8333 consumes: - application/octet-stream + produces: + - application/json parameters: - in: body name: body @@ -1580,6 +1664,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me operationId: Me.DeleteBestFriendPhoto-8333 + produces: + - application/json parameters: - in: header name: If-Match @@ -1604,6 +1690,8 @@ paths: summary: Get Friends from Me description: Friends of person operationId: Me.ListFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -1658,6 +1746,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -1688,6 +1778,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -1736,6 +1828,8 @@ paths: operationId: Me.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -1772,6 +1866,8 @@ paths: operationId: Me.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -1808,6 +1904,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.Friends.AddressInfo.GetCount-246e + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -1862,6 +1961,9 @@ paths: get: summary: Get the number of the resource operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-42c7 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -1930,6 +2032,8 @@ paths: operationId: Me.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -2089,6 +2193,7 @@ paths: operationId: Me.GetFriendsPhoto-287d produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -2117,6 +2222,8 @@ paths: operationId: Me.UpdateFriendsPhoto-287d consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -2147,6 +2254,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property Friends in Me operationId: Me.DeleteFriendsPhoto-287d + produces: + - application/json parameters: - in: path name: UserName @@ -2176,6 +2285,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.Friends.GetCount-182b + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -2206,6 +2318,8 @@ paths: summary: Get ref of Friends from Me description: Friends of person operationId: Me.ListRefFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -2243,6 +2357,10 @@ paths: - Me.Person summary: Create new navigation property ref to Friends for Me operationId: Me.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPostBody' responses: @@ -2262,6 +2380,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.DeleteRefFriends + produces: + - application/json parameters: - in: header name: If-Match @@ -2291,6 +2411,8 @@ paths: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: Me.ListFriends.AsEmployee-f4a5 + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -2341,6 +2463,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.Friends.GetCount.AsEmployee-884b + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -2370,6 +2495,8 @@ paths: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: Me.ListFriends.AsManager-98ae + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -2420,6 +2547,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.Friends.GetCount.AsManager-9376 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -2484,6 +2614,8 @@ paths: operationId: Me.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -2565,6 +2697,8 @@ paths: - Me.Location summary: Get AddressInfo property value operationId: Me.AsEmployee.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -2607,6 +2741,8 @@ paths: operationId: Me.AsEmployee.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -2637,6 +2773,8 @@ paths: operationId: Me.AsEmployee.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -2667,6 +2805,9 @@ paths: - Me.Location summary: Get the number of the resource operationId: Me.AsEmployee.AddressInfo.GetCount-8488 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -2708,6 +2849,9 @@ paths: get: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-9375 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -2767,6 +2911,8 @@ paths: operationId: Me.AsEmployee.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -2819,6 +2965,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: Me.AsEmployee.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPutBody' responses: @@ -2838,6 +2988,8 @@ paths: - Me.Person summary: Delete ref of navigation property BestFriend for Me operationId: Me.AsEmployee.DeleteRefBestFriend + produces: + - application/json parameters: - in: header name: If-Match @@ -2862,6 +3014,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsEmployee.BestFriend.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -2904,6 +3058,8 @@ paths: operationId: Me.AsEmployee.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -2934,6 +3090,8 @@ paths: operationId: Me.AsEmployee.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -2964,6 +3122,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsEmployee.BestFriend.AddressInfo.GetCount-81de + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -3005,6 +3166,9 @@ paths: get: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-842c + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -3061,6 +3225,8 @@ paths: operationId: Me.AsEmployee.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -3144,6 +3310,7 @@ paths: operationId: Me.GetBestFriendPhoto-4dc7 produces: - application/octet-stream + - application/json responses: '200': description: Retrieved media content @@ -3165,6 +3332,8 @@ paths: operationId: Me.UpdateBestFriendPhoto-4dc7 consumes: - application/octet-stream + produces: + - application/json parameters: - in: body name: body @@ -3189,6 +3358,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me operationId: Me.DeleteBestFriendPhoto-4dc7 + produces: + - application/json parameters: - in: header name: If-Match @@ -3213,6 +3384,8 @@ paths: summary: Get Friends from Me description: Friends of person operationId: Me.AsEmployee.ListFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -3267,6 +3440,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.AsEmployee.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -3297,6 +3472,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsEmployee.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -3345,6 +3522,8 @@ paths: operationId: Me.AsEmployee.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -3381,6 +3560,8 @@ paths: operationId: Me.AsEmployee.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -3417,6 +3598,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsEmployee.Friends.AddressInfo.GetCount-660e + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -3471,6 +3655,9 @@ paths: get: summary: Get the number of the resource operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-feb8 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -3539,6 +3726,8 @@ paths: operationId: Me.AsEmployee.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -3649,6 +3838,7 @@ paths: operationId: Me.GetFriendsPhoto-6e41 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -3677,6 +3867,8 @@ paths: operationId: Me.UpdateFriendsPhoto-6e41 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -3707,6 +3899,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property Friends in Me operationId: Me.DeleteFriendsPhoto-6e41 + produces: + - application/json parameters: - in: path name: UserName @@ -3736,6 +3930,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.AsEmployee.Friends.GetCount-0cb7 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -3766,6 +3963,8 @@ paths: summary: Get ref of Friends from Me description: Friends of person operationId: Me.AsEmployee.ListRefFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -3803,6 +4002,10 @@ paths: - Me.Person summary: Create new navigation property ref to Friends for Me operationId: Me.AsEmployee.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPostBody' responses: @@ -3822,6 +4025,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.AsEmployee.DeleteRefFriends + produces: + - application/json parameters: - in: header name: If-Match @@ -3851,6 +4056,8 @@ paths: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: Me.ListFriends.AsManager-f993 + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -3901,6 +4108,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.Friends.GetCount.AsManager-85ff + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -3965,6 +4175,8 @@ paths: operationId: Me.AsEmployee.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -4011,6 +4223,8 @@ paths: - Me.Person summary: Get Peers from Me operationId: Me.AsEmployee.ListPeers + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -4054,6 +4268,8 @@ paths: - Me.Person summary: Delete ref of navigation property Peers for Me operationId: Me.AsEmployee.peers.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -4084,6 +4300,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsEmployee.Peers.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -4132,6 +4350,8 @@ paths: operationId: Me.AsEmployee.Peers.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -4168,6 +4388,8 @@ paths: operationId: Me.AsEmployee.Peers.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -4204,6 +4426,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsEmployee.Peers.AddressInfo.GetCount-3e91 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -4258,6 +4483,9 @@ paths: get: summary: Get the number of the resource operationId: Me.Peers.AddressInfo.GetCount.AsEventLocation-be1d + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -4326,6 +4554,8 @@ paths: operationId: Me.AsEmployee.Peers.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -4387,6 +4617,7 @@ paths: operationId: Me.GetPeersPhoto-4c48 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -4415,6 +4646,8 @@ paths: operationId: Me.UpdatePeersPhoto-4c48 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -4445,6 +4678,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property Peers in Me operationId: Me.DeletePeersPhoto-4c48 + produces: + - application/json parameters: - in: path name: UserName @@ -4474,6 +4709,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.AsEmployee.Peers.GetCount-9fc2 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -4495,6 +4733,8 @@ paths: - Me.Person summary: Get ref of Peers from Me operationId: Me.AsEmployee.ListRefPeers + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -4524,6 +4764,10 @@ paths: - Me.Person summary: Create new navigation property ref to Peers for Me operationId: Me.AsEmployee.CreateRefPeers + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPostBody' responses: @@ -4543,6 +4787,8 @@ paths: - Me.Person summary: Delete ref of navigation property Peers for Me operationId: Me.AsEmployee.DeleteRefPeers + produces: + - application/json parameters: - in: header name: If-Match @@ -4576,6 +4822,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: Me.AsEmployee.ListTrips + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -4717,6 +4965,8 @@ paths: operationId: Me.AsEmployee.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -4754,6 +5004,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: Me.AsEmployee.DeleteTrips + produces: + - application/json parameters: - in: path name: TripId @@ -4855,6 +5107,8 @@ paths: - Me.Trips.PlanItem summary: Get PlanItems from Me operationId: Me.AsEmployee.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -4910,6 +5164,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.AsEmployee.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: TripId @@ -4952,6 +5208,9 @@ paths: - Me.Trips.PlanItem summary: Get the number of the resource operationId: Me.AsEmployee.Trips.PlanItems.GetCount-a822 + produces: + - text/plain + - application/json parameters: - in: path name: TripId @@ -4982,6 +5241,8 @@ paths: - Me.Trips.PlanItem summary: Get ref of PlanItems from Me operationId: Me.AsEmployee.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -5020,6 +5281,10 @@ paths: - Me.Trips.PlanItem summary: Create new navigation property ref to PlanItems for Me operationId: Me.AsEmployee.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -5048,6 +5313,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.AsEmployee.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -5086,6 +5353,9 @@ paths: - Me.Trip summary: Get the number of the resource operationId: Me.AsEmployee.Trips.GetCount-5aa2 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -5115,6 +5385,8 @@ paths: - Me.Person.Functions summary: Invoke function GetFavoriteAirline operationId: Me.GetFavoriteAirline + produces: + - application/json responses: '200': $ref: '#/responses/GetFavoriteAirlineResponse' @@ -5134,6 +5406,8 @@ paths: - Me.Person.Functions summary: Invoke function GetFriendsTrips operationId: Me.GetFriendsTrips + produces: + - application/json parameters: - in: path name: userName @@ -5182,6 +5456,10 @@ paths: - Me.Person.Actions summary: Invoke action GetPeersForTrip operationId: Me.GetPeersForTrip + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/GetPeersForTripRequestBody' responses: @@ -5238,6 +5516,8 @@ paths: - Me.Location summary: Get AddressInfo property value operationId: Me.AsManager.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -5280,6 +5560,8 @@ paths: operationId: Me.AsManager.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -5310,6 +5592,8 @@ paths: operationId: Me.AsManager.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -5340,6 +5624,9 @@ paths: - Me.Location summary: Get the number of the resource operationId: Me.AsManager.AddressInfo.GetCount-75da + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -5381,6 +5668,9 @@ paths: get: summary: Get the number of the resource operationId: Me.AddressInfo.GetCount.AsEventLocation-f67e + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -5440,6 +5730,8 @@ paths: operationId: Me.AsManager.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -5492,6 +5784,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: Me.AsManager.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPutBody' responses: @@ -5511,6 +5807,8 @@ paths: - Me.Person summary: Delete ref of navigation property BestFriend for Me operationId: Me.AsManager.DeleteRefBestFriend + produces: + - application/json parameters: - in: header name: If-Match @@ -5535,6 +5833,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsManager.BestFriend.ListAddressInfo + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -5577,6 +5877,8 @@ paths: operationId: Me.AsManager.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -5607,6 +5909,8 @@ paths: operationId: Me.AsManager.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: header name: If-Match @@ -5637,6 +5941,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsManager.BestFriend.AddressInfo.GetCount-6ea6 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -5678,6 +5985,9 @@ paths: get: summary: Get the number of the resource operationId: Me.BestFriend.AddressInfo.GetCount.AsEventLocation-692e + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -5734,6 +6044,8 @@ paths: operationId: Me.AsManager.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -5817,6 +6129,7 @@ paths: operationId: Me.GetBestFriendPhoto-bac8 produces: - application/octet-stream + - application/json responses: '200': description: Retrieved media content @@ -5838,6 +6151,8 @@ paths: operationId: Me.UpdateBestFriendPhoto-bac8 consumes: - application/octet-stream + produces: + - application/json parameters: - in: body name: body @@ -5862,6 +6177,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property BestFriend in Me operationId: Me.DeleteBestFriendPhoto-bac8 + produces: + - application/json parameters: - in: header name: If-Match @@ -5885,6 +6202,8 @@ paths: - Me.Person summary: Get DirectReports from Me operationId: Me.AsManager.ListDirectReports + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -5928,6 +6247,8 @@ paths: - Me.Person summary: Delete ref of navigation property DirectReports for Me operationId: Me.AsManager.directReports.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -5958,6 +6279,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsManager.DirectReports.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -6006,6 +6329,8 @@ paths: operationId: Me.AsManager.DirectReports.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6042,6 +6367,8 @@ paths: operationId: Me.AsManager.DirectReports.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6078,6 +6405,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsManager.DirectReports.AddressInfo.GetCount-f650 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -6132,6 +6462,9 @@ paths: get: summary: Get the number of the resource operationId: Me.DirectReports.AddressInfo.GetCount.AsEventLocation-a070 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -6200,6 +6533,8 @@ paths: operationId: Me.AsManager.DirectReports.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6261,6 +6596,7 @@ paths: operationId: Me.GetDirectReportsPhoto-e60c produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -6289,6 +6625,8 @@ paths: operationId: Me.UpdateDirectReportsPhoto-e60c consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -6319,6 +6657,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property DirectReports in Me operationId: Me.DeleteDirectReportsPhoto-e60c + produces: + - application/json parameters: - in: path name: UserName @@ -6348,6 +6688,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.AsManager.DirectReports.GetCount-8b92 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -6369,6 +6712,8 @@ paths: - Me.Person summary: Get ref of DirectReports from Me operationId: Me.AsManager.ListRefDirectReports + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -6398,6 +6743,10 @@ paths: - Me.Person summary: Create new navigation property ref to DirectReports for Me operationId: Me.AsManager.CreateRefDirectReports + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPostBody' responses: @@ -6417,6 +6766,8 @@ paths: - Me.Person summary: Delete ref of navigation property DirectReports for Me operationId: Me.AsManager.DeleteRefDirectReports + produces: + - application/json parameters: - in: header name: If-Match @@ -6447,6 +6798,8 @@ paths: summary: Get Friends from Me description: Friends of person operationId: Me.AsManager.ListFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -6501,6 +6854,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.AsManager.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -6531,6 +6886,8 @@ paths: - Me.Person.Location summary: Get AddressInfo property value operationId: Me.AsManager.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -6579,6 +6936,8 @@ paths: operationId: Me.AsManager.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6615,6 +6974,8 @@ paths: operationId: Me.AsManager.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6651,6 +7012,9 @@ paths: - Me.Person.Location summary: Get the number of the resource operationId: Me.AsManager.Friends.AddressInfo.GetCount-b7db + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -6705,6 +7069,9 @@ paths: get: summary: Get the number of the resource operationId: Me.Friends.AddressInfo.GetCount.AsEventLocation-4d69 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -6773,6 +7140,8 @@ paths: operationId: Me.AsManager.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -6883,6 +7252,7 @@ paths: operationId: Me.GetFriendsPhoto-64bd produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -6911,6 +7281,8 @@ paths: operationId: Me.UpdateFriendsPhoto-64bd consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -6941,6 +7313,8 @@ paths: - Me.Person summary: Delete Photo for the navigation property Friends in Me operationId: Me.DeleteFriendsPhoto-64bd + produces: + - application/json parameters: - in: path name: UserName @@ -6970,6 +7344,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.AsManager.Friends.GetCount-60a7 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -7000,6 +7377,8 @@ paths: summary: Get ref of Friends from Me description: Friends of person operationId: Me.AsManager.ListRefFriends + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -7037,6 +7416,10 @@ paths: - Me.Person summary: Create new navigation property ref to Friends for Me operationId: Me.AsManager.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/refPostBody' responses: @@ -7056,6 +7439,8 @@ paths: - Me.Person summary: Delete ref of navigation property Friends for Me operationId: Me.AsManager.DeleteRefFriends + produces: + - application/json parameters: - in: header name: If-Match @@ -7085,6 +7470,8 @@ paths: - Me.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: Me.ListFriends.AsEmployee-fe32 + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -7135,6 +7522,9 @@ paths: - Me.Person summary: Get the number of the resource operationId: Me.Friends.GetCount.AsEmployee-6a35 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -7199,6 +7589,8 @@ paths: operationId: Me.AsManager.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -7248,6 +7640,8 @@ paths: operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -7281,6 +7675,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: Me.AsManager.ListTrips + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -7422,6 +7818,8 @@ paths: operationId: Me.AsManager.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -7459,6 +7857,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: Me.AsManager.DeleteTrips + produces: + - application/json parameters: - in: path name: TripId @@ -7560,6 +7960,8 @@ paths: - Me.Trips.PlanItem summary: Get PlanItems from Me operationId: Me.AsManager.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -7615,6 +8017,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.AsManager.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: TripId @@ -7657,6 +8061,9 @@ paths: - Me.Trips.PlanItem summary: Get the number of the resource operationId: Me.AsManager.Trips.PlanItems.GetCount-5ad2 + produces: + - text/plain + - application/json parameters: - in: path name: TripId @@ -7687,6 +8094,8 @@ paths: - Me.Trips.PlanItem summary: Get ref of PlanItems from Me operationId: Me.AsManager.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -7725,6 +8134,10 @@ paths: - Me.Trips.PlanItem summary: Create new navigation property ref to PlanItems for Me operationId: Me.AsManager.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -7753,6 +8166,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.AsManager.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -7791,6 +8206,9 @@ paths: - Me.Trip summary: Get the number of the resource operationId: Me.AsManager.Trips.GetCount-f3f4 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -7821,6 +8239,10 @@ paths: summary: Invoke action ShareTrip description: Details of the shared trip. operationId: Me.ShareTrip + consumes: + - application/json + produces: + - application/json parameters: - $ref: '#/parameters/ShareTripRequestBody' responses: @@ -7842,6 +8264,8 @@ paths: - Me.Person.Functions summary: Invoke function UpdatePersonLastName operationId: Me.UpdatePersonLastName + produces: + - application/json parameters: - in: path name: lastName @@ -7869,6 +8293,7 @@ paths: operationId: Me.Person.GetPhoto-ab7e produces: - application/octet-stream + - application/json responses: '200': description: Retrieved media content @@ -7890,6 +8315,8 @@ paths: operationId: Me.Person.UpdatePhoto-ab7e consumes: - application/octet-stream + produces: + - application/json parameters: - in: body name: body @@ -7914,6 +8341,8 @@ paths: - Me.Person summary: Delete Photo for Person in Me operationId: Me.Person.DeletePhoto-ab7e + produces: + - application/json parameters: - in: header name: If-Match @@ -7941,6 +8370,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: Me.ListTrips + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -8082,6 +8513,8 @@ paths: operationId: Me.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -8119,6 +8552,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: Me.DeleteTrips + produces: + - application/json parameters: - in: path name: TripId @@ -8220,6 +8655,8 @@ paths: - Me.Trips.PlanItem summary: Get PlanItems from Me operationId: Me.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -8275,6 +8712,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: TripId @@ -8317,6 +8756,9 @@ paths: - Me.Trips.PlanItem summary: Get the number of the resource operationId: Me.Trips.PlanItems.GetCount-c250 + produces: + - text/plain + - application/json parameters: - in: path name: TripId @@ -8347,6 +8789,8 @@ paths: - Me.Trips.PlanItem summary: Get ref of PlanItems from Me operationId: Me.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -8385,6 +8829,10 @@ paths: - Me.Trips.PlanItem summary: Create new navigation property ref to PlanItems for Me operationId: Me.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: TripId @@ -8413,6 +8861,8 @@ paths: - Me.Trips.PlanItem summary: Delete ref of navigation property PlanItems for Me operationId: Me.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: TripId @@ -8451,6 +8901,9 @@ paths: - Me.Trip summary: Get the number of the resource operationId: Me.Trips.GetCount-7b69 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -8480,6 +8933,8 @@ paths: - NewComePeople.Person summary: Get entities from NewComePeople operationId: NewComePeople.Person.ListPerson + produces: + - application/json parameters: - $ref: '#/parameters/top' - $ref: '#/parameters/skip' @@ -8576,6 +9031,8 @@ paths: operationId: NewComePeople.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -8600,6 +9057,8 @@ paths: - NewComePeople.Person summary: Delete entity from NewComePeople operationId: NewComePeople.Person.DeletePerson + produces: + - application/json parameters: - in: path name: UserName @@ -8624,6 +9083,8 @@ paths: - NewComePeople.Location summary: Get AddressInfo property value operationId: NewComePeople.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -8666,6 +9127,8 @@ paths: operationId: NewComePeople.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -8696,6 +9159,8 @@ paths: operationId: NewComePeople.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -8726,6 +9191,9 @@ paths: - NewComePeople.Location summary: Get the number of the resource operationId: NewComePeople.AddressInfo.GetCount-29d6 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -8768,6 +9236,9 @@ paths: get: summary: Get the number of the resource operationId: NewComePeople.AddressInfo.GetCount.AsEventLocation-29d3 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -8833,6 +9304,8 @@ paths: operationId: NewComePeople.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -8895,6 +9368,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: NewComePeople.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -8920,6 +9397,8 @@ paths: - NewComePeople.Person summary: Delete ref of navigation property BestFriend for NewComePeople operationId: NewComePeople.DeleteRefBestFriend + produces: + - application/json parameters: - in: path name: UserName @@ -8950,6 +9429,8 @@ paths: - NewComePeople.Person.Location summary: Get AddressInfo property value operationId: NewComePeople.BestFriend.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -8998,6 +9479,8 @@ paths: operationId: NewComePeople.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9034,6 +9517,8 @@ paths: operationId: NewComePeople.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9070,6 +9555,9 @@ paths: - NewComePeople.Person.Location summary: Get the number of the resource operationId: NewComePeople.BestFriend.AddressInfo.GetCount-513c + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -9124,6 +9612,9 @@ paths: get: summary: Get the number of the resource operationId: NewComePeople.BestFriend.AddressInfo.GetCount.AsEventLocation-ba36 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -9192,6 +9683,8 @@ paths: operationId: NewComePeople.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9335,6 +9828,7 @@ paths: operationId: NewComePeople.GetBestFriendPhoto-4f67 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -9363,6 +9857,8 @@ paths: operationId: NewComePeople.UpdateBestFriendPhoto-4f67 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -9393,6 +9889,8 @@ paths: - NewComePeople.Person summary: Delete Photo for the navigation property BestFriend in NewComePeople operationId: NewComePeople.DeleteBestFriendPhoto-4f67 + produces: + - application/json parameters: - in: path name: UserName @@ -9423,6 +9921,8 @@ paths: summary: Get Friends from NewComePeople description: Friends of person operationId: NewComePeople.ListFriends + produces: + - application/json parameters: - in: path name: UserName @@ -9474,6 +9974,8 @@ paths: - NewComePeople.Person summary: Delete ref of navigation property Friends for NewComePeople operationId: NewComePeople.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -9504,6 +10006,8 @@ paths: - NewComePeople.Person.Location summary: Get AddressInfo property value operationId: NewComePeople.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -9552,6 +10056,8 @@ paths: operationId: NewComePeople.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9588,6 +10094,8 @@ paths: operationId: NewComePeople.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9624,6 +10132,9 @@ paths: - NewComePeople.Person.Location summary: Get the number of the resource operationId: NewComePeople.Friends.AddressInfo.GetCount-9334 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -9678,6 +10189,9 @@ paths: get: summary: Get the number of the resource operationId: NewComePeople.Friends.AddressInfo.GetCount.AsEventLocation-be92 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -9746,6 +10260,8 @@ paths: operationId: NewComePeople.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -9905,6 +10421,7 @@ paths: operationId: NewComePeople.GetFriendsPhoto-e9fc produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -9933,6 +10450,8 @@ paths: operationId: NewComePeople.UpdateFriendsPhoto-e9fc consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -9963,6 +10482,8 @@ paths: - NewComePeople.Person summary: Delete Photo for the navigation property Friends in NewComePeople operationId: NewComePeople.DeleteFriendsPhoto-e9fc + produces: + - application/json parameters: - in: path name: UserName @@ -9992,6 +10513,9 @@ paths: - NewComePeople.Person summary: Get the number of the resource operationId: NewComePeople.Friends.GetCount-2ec1 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -10022,6 +10546,8 @@ paths: summary: Get ref of Friends from NewComePeople description: Friends of person operationId: NewComePeople.ListRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -10059,6 +10585,10 @@ paths: - NewComePeople.Person summary: Create new navigation property ref to Friends for NewComePeople operationId: NewComePeople.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10078,6 +10608,8 @@ paths: - NewComePeople.Person summary: Delete ref of navigation property Friends for NewComePeople operationId: NewComePeople.DeleteRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -10107,6 +10639,8 @@ paths: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: NewComePeople.ListFriends.AsEmployee-2969 + produces: + - application/json parameters: - in: path name: UserName @@ -10157,6 +10691,9 @@ paths: - NewComePeople.Person summary: Get the number of the resource operationId: NewComePeople.Friends.GetCount.AsEmployee-4069 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -10186,6 +10723,8 @@ paths: - NewComePeople.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: NewComePeople.ListFriends.AsManager-708f + produces: + - application/json parameters: - in: path name: UserName @@ -10236,6 +10775,9 @@ paths: - NewComePeople.Person summary: Get the number of the resource operationId: NewComePeople.Friends.GetCount.AsManager-d1d3 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -10300,6 +10842,8 @@ paths: operationId: NewComePeople.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10347,6 +10891,8 @@ paths: - NewComePeople.Person.Functions summary: Invoke function GetFavoriteAirline operationId: NewComePeople.Person.GetFavoriteAirline + produces: + - application/json parameters: - in: path name: UserName @@ -10367,6 +10913,8 @@ paths: - NewComePeople.Person.Functions summary: Invoke function GetFriendsTrips operationId: NewComePeople.Person.GetFriendsTrips + produces: + - application/json parameters: - in: path name: UserName @@ -10421,6 +10969,10 @@ paths: - NewComePeople.Person.Actions summary: Invoke action GetPeersForTrip operationId: NewComePeople.Person.GetPeersForTrip + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10445,6 +10997,8 @@ paths: operationId: NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10475,6 +11029,10 @@ paths: summary: Invoke action ShareTrip description: Details of the shared trip. operationId: NewComePeople.Person.ShareTrip + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10496,6 +11054,8 @@ paths: - NewComePeople.Person.Functions summary: Invoke function UpdatePersonLastName operationId: NewComePeople.Person.UpdatePersonLastName + produces: + - application/json parameters: - in: path name: UserName @@ -10523,6 +11083,7 @@ paths: operationId: NewComePeople.Person.GetPhoto-74be produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -10545,6 +11106,8 @@ paths: operationId: NewComePeople.Person.UpdatePhoto-74be consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -10569,6 +11132,8 @@ paths: - NewComePeople.Person summary: Delete Photo for Person in NewComePeople operationId: NewComePeople.Person.DeletePhoto-74be + produces: + - application/json parameters: - in: path name: UserName @@ -10596,6 +11161,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: NewComePeople.ListTrips + produces: + - application/json parameters: - in: path name: UserName @@ -10734,6 +11301,8 @@ paths: operationId: NewComePeople.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -10771,6 +11340,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: NewComePeople.DeleteTrips + produces: + - application/json parameters: - in: path name: UserName @@ -10866,6 +11437,8 @@ paths: - NewComePeople.Trips.PlanItem summary: Get PlanItems from NewComePeople operationId: NewComePeople.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -10918,6 +11491,8 @@ paths: - NewComePeople.Trips.PlanItem summary: Delete ref of navigation property PlanItems for NewComePeople operationId: NewComePeople.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: UserName @@ -10960,6 +11535,9 @@ paths: - NewComePeople.Trips.PlanItem summary: Get the number of the resource operationId: NewComePeople.Trips.PlanItems.GetCount-841f + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -10990,6 +11568,8 @@ paths: - NewComePeople.Trips.PlanItem summary: Get ref of PlanItems from NewComePeople operationId: NewComePeople.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -11028,6 +11608,10 @@ paths: - NewComePeople.Trips.PlanItem summary: Create new navigation property ref to PlanItems for NewComePeople operationId: NewComePeople.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11056,6 +11640,8 @@ paths: - NewComePeople.Trips.PlanItem summary: Delete ref of navigation property PlanItems for NewComePeople operationId: NewComePeople.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -11094,6 +11680,9 @@ paths: - NewComePeople.Trip summary: Get the number of the resource operationId: NewComePeople.Trips.GetCount-d155 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -11123,6 +11712,9 @@ paths: - NewComePeople.Person summary: Get the number of the resource operationId: NewComePeople.GetCount-55d5 + produces: + - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -11138,6 +11730,8 @@ paths: - People.Person summary: Get entities from People operationId: People.Person.ListPerson + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -11268,6 +11862,8 @@ paths: operationId: People.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11298,6 +11894,8 @@ paths: - People.Person summary: Delete entity from People operationId: People.Person.DeletePerson + produces: + - application/json parameters: - in: path name: UserName @@ -11328,6 +11926,8 @@ paths: - People.Location summary: Get AddressInfo property value operationId: People.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -11376,6 +11976,8 @@ paths: operationId: People.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11412,6 +12014,8 @@ paths: operationId: People.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11448,6 +12052,9 @@ paths: - People.Location summary: Get the number of the resource operationId: People.AddressInfo.GetCount-ed5a + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -11502,6 +12109,9 @@ paths: get: summary: Get the number of the resource operationId: People.AddressInfo.GetCount.AsEventLocation-4abd + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -11573,6 +12183,8 @@ paths: operationId: People.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11638,6 +12250,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: People.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11663,6 +12279,8 @@ paths: - People.Person summary: Delete ref of navigation property BestFriend for People operationId: People.DeleteRefBestFriend + produces: + - application/json parameters: - in: path name: UserName @@ -11693,6 +12311,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.BestFriend.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -11741,6 +12361,8 @@ paths: operationId: People.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11777,6 +12399,8 @@ paths: operationId: People.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -11813,6 +12437,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.BestFriend.AddressInfo.GetCount-16df + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -11867,6 +12494,9 @@ paths: get: summary: Get the number of the resource operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-fe88 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -11935,6 +12565,8 @@ paths: operationId: People.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -12082,6 +12714,7 @@ paths: operationId: People.GetBestFriendPhoto-c3ac produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -12110,6 +12743,8 @@ paths: operationId: People.UpdateBestFriendPhoto-c3ac consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -12140,6 +12775,8 @@ paths: - People.Person summary: Delete Photo for the navigation property BestFriend in People operationId: People.DeleteBestFriendPhoto-c3ac + produces: + - application/json parameters: - in: path name: UserName @@ -12173,6 +12810,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0 operationId: People.ListFriends + produces: + - application/json parameters: - in: path name: UserName @@ -12237,6 +12876,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0 operationId: People.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -12273,6 +12914,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -12327,6 +12970,8 @@ paths: operationId: People.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -12369,6 +13014,8 @@ paths: operationId: People.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -12411,6 +13058,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.Friends.AddressInfo.GetCount-bdaf + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -12477,6 +13127,9 @@ paths: get: summary: Get the number of the resource operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-2795 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -12557,6 +13210,8 @@ paths: operationId: People.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -12740,6 +13395,7 @@ paths: operationId: People.GetFriendsPhoto-12fc produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -12774,6 +13430,8 @@ paths: operationId: People.UpdateFriendsPhoto-12fc consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -12810,6 +13468,8 @@ paths: - People.Person summary: Delete Photo for the navigation property Friends in People operationId: People.DeleteFriendsPhoto-12fc + produces: + - application/json parameters: - in: path name: UserName @@ -12845,6 +13505,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Friends.GetCount-92b9 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -12884,6 +13547,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-list-friends?view=graph-rest-1.0 operationId: People.ListRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -12931,6 +13596,10 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-post-friend?view=graph-rest-1.0 operationId: People.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -12960,6 +13629,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-delete-friend?view=graph-rest-1.0 operationId: People.DeleteRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -12995,6 +13666,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.ListFriends.AsEmployee-11bf + produces: + - application/json parameters: - in: path name: UserName @@ -13051,6 +13724,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Friends.GetCount.AsEmployee-a96c + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13086,6 +13762,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.ListFriends.AsManager-1cfb + produces: + - application/json parameters: - in: path name: UserName @@ -13142,6 +13820,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Friends.GetCount.AsManager-26b3 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13219,6 +13900,8 @@ paths: operationId: People.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13327,6 +14010,8 @@ paths: - People.Location summary: Get AddressInfo property value operationId: People.AsEmployee.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -13375,6 +14060,8 @@ paths: operationId: People.AsEmployee.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13411,6 +14098,8 @@ paths: operationId: People.AsEmployee.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13447,6 +14136,9 @@ paths: - People.Location summary: Get the number of the resource operationId: People.AsEmployee.AddressInfo.GetCount-3d43 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13501,6 +14193,9 @@ paths: get: summary: Get the number of the resource operationId: People.AddressInfo.GetCount.AsEventLocation-ac7d + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13572,6 +14267,8 @@ paths: operationId: People.AsEmployee.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13637,6 +14334,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: People.AsEmployee.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13662,6 +14363,8 @@ paths: - People.Person summary: Delete ref of navigation property BestFriend for People operationId: People.AsEmployee.DeleteRefBestFriend + produces: + - application/json parameters: - in: path name: UserName @@ -13692,6 +14395,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsEmployee.BestFriend.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -13740,6 +14445,8 @@ paths: operationId: People.AsEmployee.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13776,6 +14483,8 @@ paths: operationId: People.AsEmployee.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -13812,6 +14521,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsEmployee.BestFriend.AddressInfo.GetCount-cb8a + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13866,6 +14578,9 @@ paths: get: summary: Get the number of the resource operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-0343 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -13934,6 +14649,8 @@ paths: operationId: People.AsEmployee.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -14036,6 +14753,7 @@ paths: operationId: People.GetBestFriendPhoto-a839 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -14064,6 +14782,8 @@ paths: operationId: People.UpdateBestFriendPhoto-a839 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -14094,6 +14814,8 @@ paths: - People.Person summary: Delete Photo for the navigation property BestFriend in People operationId: People.DeleteBestFriendPhoto-a839 + produces: + - application/json parameters: - in: path name: UserName @@ -14124,6 +14846,8 @@ paths: summary: Get Friends from People description: Friends of person operationId: People.AsEmployee.ListFriends + produces: + - application/json parameters: - in: path name: UserName @@ -14184,6 +14908,8 @@ paths: - People.Person summary: Delete ref of navigation property Friends for People operationId: People.AsEmployee.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -14220,6 +14946,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsEmployee.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -14274,6 +15002,8 @@ paths: operationId: People.AsEmployee.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -14316,6 +15046,8 @@ paths: operationId: People.AsEmployee.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -14358,6 +15090,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsEmployee.Friends.AddressInfo.GetCount-1e8b + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -14424,6 +15159,9 @@ paths: get: summary: Get the number of the resource operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-1f2b + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -14504,6 +15242,8 @@ paths: operationId: People.AsEmployee.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -14632,6 +15372,7 @@ paths: operationId: People.GetFriendsPhoto-1a66 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -14666,6 +15407,8 @@ paths: operationId: People.UpdateFriendsPhoto-1a66 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -14702,6 +15445,8 @@ paths: - People.Person summary: Delete Photo for the navigation property Friends in People operationId: People.DeleteFriendsPhoto-1a66 + produces: + - application/json parameters: - in: path name: UserName @@ -14737,6 +15482,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.AsEmployee.Friends.GetCount-4db4 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -14773,6 +15521,8 @@ paths: summary: Get ref of Friends from People description: Friends of person operationId: People.AsEmployee.ListRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -14816,6 +15566,10 @@ paths: - People.Person summary: Create new navigation property ref to Friends for People operationId: People.AsEmployee.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -14841,6 +15595,8 @@ paths: - People.Person summary: Delete ref of navigation property Friends for People operationId: People.AsEmployee.DeleteRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -14876,6 +15632,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.ListFriends.AsManager-3e3c + produces: + - application/json parameters: - in: path name: UserName @@ -14932,6 +15690,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Friends.GetCount.AsManager-b145 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -15008,6 +15769,8 @@ paths: operationId: People.AsEmployee.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15067,6 +15830,8 @@ paths: - People.Person summary: Get Peers from People operationId: People.AsEmployee.ListPeers + produces: + - application/json parameters: - in: path name: UserName @@ -15116,6 +15881,8 @@ paths: - People.Person summary: Delete ref of navigation property Peers for People operationId: People.AsEmployee.peers.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -15152,6 +15919,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsEmployee.Peers.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -15206,6 +15975,8 @@ paths: operationId: People.AsEmployee.Peers.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15248,6 +16019,8 @@ paths: operationId: People.AsEmployee.Peers.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15290,6 +16063,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsEmployee.Peers.AddressInfo.GetCount-755d + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -15356,6 +16132,9 @@ paths: get: summary: Get the number of the resource operationId: People.Peers.AddressInfo.GetCount.AsEventLocation-ef5e + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -15436,6 +16215,8 @@ paths: operationId: People.AsEmployee.Peers.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15509,6 +16290,7 @@ paths: operationId: People.GetPeersPhoto-ecda produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -15543,6 +16325,8 @@ paths: operationId: People.UpdatePeersPhoto-ecda consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -15579,6 +16363,8 @@ paths: - People.Person summary: Delete Photo for the navigation property Peers in People operationId: People.DeletePeersPhoto-ecda + produces: + - application/json parameters: - in: path name: UserName @@ -15614,6 +16400,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.AsEmployee.Peers.GetCount-44d2 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -15641,6 +16430,8 @@ paths: - People.Person summary: Get ref of Peers from People operationId: People.AsEmployee.ListRefPeers + produces: + - application/json parameters: - in: path name: UserName @@ -15676,6 +16467,10 @@ paths: - People.Person summary: Create new navigation property ref to Peers for People operationId: People.AsEmployee.CreateRefPeers + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15701,6 +16496,8 @@ paths: - People.Person summary: Delete ref of navigation property Peers for People operationId: People.AsEmployee.DeleteRefPeers + produces: + - application/json parameters: - in: path name: UserName @@ -15740,6 +16537,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: People.AsEmployee.ListTrips + produces: + - application/json parameters: - in: path name: UserName @@ -15899,6 +16698,8 @@ paths: operationId: People.AsEmployee.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -15942,6 +16743,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: People.AsEmployee.DeleteTrips + produces: + - application/json parameters: - in: path name: UserName @@ -16055,6 +16858,8 @@ paths: - People.Trips.PlanItem summary: Get PlanItems from People operationId: People.AsEmployee.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -16116,6 +16921,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.AsEmployee.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: UserName @@ -16164,6 +16971,9 @@ paths: - People.Trips.PlanItem summary: Get the number of the resource operationId: People.AsEmployee.Trips.PlanItems.GetCount-7df9 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -16200,6 +17010,8 @@ paths: - People.Trips.PlanItem summary: Get ref of PlanItems from People operationId: People.AsEmployee.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -16244,6 +17056,10 @@ paths: - People.Trips.PlanItem summary: Create new navigation property ref to PlanItems for People operationId: People.AsEmployee.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16278,6 +17094,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.AsEmployee.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -16322,6 +17140,9 @@ paths: - People.Trip summary: Get the number of the resource operationId: People.AsEmployee.Trips.GetCount-c760 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -16357,6 +17178,8 @@ paths: - People.Person.Functions summary: Invoke function GetFavoriteAirline operationId: People.Person.GetFavoriteAirline + produces: + - application/json parameters: - in: path name: UserName @@ -16383,6 +17206,8 @@ paths: - People.Person.Functions summary: Invoke function GetFriendsTrips operationId: People.Person.GetFriendsTrips + produces: + - application/json parameters: - in: path name: UserName @@ -16437,6 +17262,10 @@ paths: - People.Person.Actions summary: Invoke action GetPeersForTrip operationId: People.Person.GetPeersForTrip + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16513,6 +17342,8 @@ paths: - People.Location summary: Get AddressInfo property value operationId: People.AsManager.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -16561,6 +17392,8 @@ paths: operationId: People.AsManager.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16597,6 +17430,8 @@ paths: operationId: People.AsManager.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16633,6 +17468,9 @@ paths: - People.Location summary: Get the number of the resource operationId: People.AsManager.AddressInfo.GetCount-f84e + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -16687,6 +17525,9 @@ paths: get: summary: Get the number of the resource operationId: People.AddressInfo.GetCount.AsEventLocation-3722 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -16758,6 +17599,8 @@ paths: operationId: People.AsManager.UpdateBestFriend consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16823,6 +17666,10 @@ paths: summary: Update the best friend. description: Update an instance of a best friend. operationId: People.AsManager.UpdateRefBestFriend + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16848,6 +17695,8 @@ paths: - People.Person summary: Delete ref of navigation property BestFriend for People operationId: People.AsManager.DeleteRefBestFriend + produces: + - application/json parameters: - in: path name: UserName @@ -16878,6 +17727,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsManager.BestFriend.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -16926,6 +17777,8 @@ paths: operationId: People.AsManager.BestFriend.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16962,6 +17815,8 @@ paths: operationId: People.AsManager.BestFriend.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -16998,6 +17853,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsManager.BestFriend.AddressInfo.GetCount-5a39 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -17052,6 +17910,9 @@ paths: get: summary: Get the number of the resource operationId: People.BestFriend.AddressInfo.GetCount.AsEventLocation-5af3 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -17120,6 +17981,8 @@ paths: operationId: People.AsManager.BestFriend.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -17222,6 +18085,7 @@ paths: operationId: People.GetBestFriendPhoto-f05d produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -17250,6 +18114,8 @@ paths: operationId: People.UpdateBestFriendPhoto-f05d consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -17280,6 +18146,8 @@ paths: - People.Person summary: Delete Photo for the navigation property BestFriend in People operationId: People.DeleteBestFriendPhoto-f05d + produces: + - application/json parameters: - in: path name: UserName @@ -17309,6 +18177,8 @@ paths: - People.Person summary: Get DirectReports from People operationId: People.AsManager.ListDirectReports + produces: + - application/json parameters: - in: path name: UserName @@ -17358,6 +18228,8 @@ paths: - People.Person summary: Delete ref of navigation property DirectReports for People operationId: People.AsManager.directReports.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -17394,6 +18266,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsManager.DirectReports.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -17448,6 +18322,8 @@ paths: operationId: People.AsManager.DirectReports.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -17490,6 +18366,8 @@ paths: operationId: People.AsManager.DirectReports.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -17532,6 +18410,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsManager.DirectReports.AddressInfo.GetCount-f46e + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -17598,6 +18479,9 @@ paths: get: summary: Get the number of the resource operationId: People.DirectReports.AddressInfo.GetCount.AsEventLocation-5d49 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -17678,6 +18562,8 @@ paths: operationId: People.AsManager.DirectReports.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -17751,6 +18637,7 @@ paths: operationId: People.GetDirectReportsPhoto-7149 produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -17785,6 +18672,8 @@ paths: operationId: People.UpdateDirectReportsPhoto-7149 consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -17821,6 +18710,8 @@ paths: - People.Person summary: Delete Photo for the navigation property DirectReports in People operationId: People.DeleteDirectReportsPhoto-7149 + produces: + - application/json parameters: - in: path name: UserName @@ -17856,6 +18747,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.AsManager.DirectReports.GetCount-0ec4 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -17883,6 +18777,8 @@ paths: - People.Person summary: Get ref of DirectReports from People operationId: People.AsManager.ListRefDirectReports + produces: + - application/json parameters: - in: path name: UserName @@ -17918,6 +18814,10 @@ paths: - People.Person summary: Create new navigation property ref to DirectReports for People operationId: People.AsManager.CreateRefDirectReports + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -17943,6 +18843,8 @@ paths: - People.Person summary: Delete ref of navigation property DirectReports for People operationId: People.AsManager.DeleteRefDirectReports + produces: + - application/json parameters: - in: path name: UserName @@ -17979,6 +18881,8 @@ paths: summary: Get Friends from People description: Friends of person operationId: People.AsManager.ListFriends + produces: + - application/json parameters: - in: path name: UserName @@ -18039,6 +18943,8 @@ paths: - People.Person summary: Delete ref of navigation property Friends for People operationId: People.AsManager.friends.DeleteRefPerson + produces: + - application/json parameters: - in: path name: UserName @@ -18075,6 +18981,8 @@ paths: - People.Person.Location summary: Get AddressInfo property value operationId: People.AsManager.Friends.ListAddressInfo + produces: + - application/json parameters: - in: path name: UserName @@ -18129,6 +19037,8 @@ paths: operationId: People.AsManager.Friends.UpdateAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18171,6 +19081,8 @@ paths: operationId: People.AsManager.Friends.SetAddressInfo consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18213,6 +19125,9 @@ paths: - People.Person.Location summary: Get the number of the resource operationId: People.AsManager.Friends.AddressInfo.GetCount-f486 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -18279,6 +19194,9 @@ paths: get: summary: Get the number of the resource operationId: People.Friends.AddressInfo.GetCount.AsEventLocation-4480 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -18359,6 +19277,8 @@ paths: operationId: People.AsManager.Friends.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18487,6 +19407,7 @@ paths: operationId: People.GetFriendsPhoto-b97d produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -18521,6 +19442,8 @@ paths: operationId: People.UpdateFriendsPhoto-b97d consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -18557,6 +19480,8 @@ paths: - People.Person summary: Delete Photo for the navigation property Friends in People operationId: People.DeleteFriendsPhoto-b97d + produces: + - application/json parameters: - in: path name: UserName @@ -18592,6 +19517,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.AsManager.Friends.GetCount-1c0c + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -18628,6 +19556,8 @@ paths: summary: Get ref of Friends from People description: Friends of person operationId: People.AsManager.ListRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -18671,6 +19601,10 @@ paths: - People.Person summary: Create new navigation property ref to Friends for People operationId: People.AsManager.CreateRefFriends + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18696,6 +19630,8 @@ paths: - People.Person summary: Delete ref of navigation property Friends for People operationId: People.AsManager.DeleteRefFriends + produces: + - application/json parameters: - in: path name: UserName @@ -18731,6 +19667,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.ListFriends.AsEmployee-161e + produces: + - application/json parameters: - in: path name: UserName @@ -18787,6 +19725,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Friends.GetCount.AsEmployee-f325 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -18863,6 +19804,8 @@ paths: operationId: People.AsManager.UpdateHomeAddress consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18925,6 +19868,8 @@ paths: operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -18964,6 +19909,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: People.AsManager.ListTrips + produces: + - application/json parameters: - in: path name: UserName @@ -19123,6 +20070,8 @@ paths: operationId: People.AsManager.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -19166,6 +20115,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: People.AsManager.DeleteTrips + produces: + - application/json parameters: - in: path name: UserName @@ -19279,6 +20230,8 @@ paths: - People.Trips.PlanItem summary: Get PlanItems from People operationId: People.AsManager.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -19340,6 +20293,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.AsManager.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: UserName @@ -19388,6 +20343,9 @@ paths: - People.Trips.PlanItem summary: Get the number of the resource operationId: People.AsManager.Trips.PlanItems.GetCount-fa08 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -19424,6 +20382,8 @@ paths: - People.Trips.PlanItem summary: Get ref of PlanItems from People operationId: People.AsManager.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -19468,6 +20428,10 @@ paths: - People.Trips.PlanItem summary: Create new navigation property ref to PlanItems for People operationId: People.AsManager.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -19502,6 +20466,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.AsManager.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -19546,6 +20512,9 @@ paths: - People.Trip summary: Get the number of the resource operationId: People.AsManager.Trips.GetCount-1f8c + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -19582,6 +20551,10 @@ paths: summary: Invoke action ShareTrip description: Details of the shared trip. operationId: People.Person.ShareTrip + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -19609,6 +20582,8 @@ paths: - People.Person.Functions summary: Invoke function UpdatePersonLastName operationId: People.Person.UpdatePersonLastName + produces: + - application/json parameters: - in: path name: UserName @@ -19646,6 +20621,7 @@ paths: operationId: People.Person.GetPhoto-883f produces: - application/octet-stream + - application/json parameters: - in: path name: UserName @@ -19678,6 +20654,8 @@ paths: operationId: People.Person.UpdatePhoto-883f consumes: - application/octet-stream + produces: + - application/json parameters: - in: path name: UserName @@ -19712,6 +20690,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/person-delete-photo?view=graph-rest-1.0 operationId: People.Person.DeletePhoto-883f + produces: + - application/json parameters: - in: path name: UserName @@ -19745,6 +20725,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-list-trips?view=graph-rest-1.0 operationId: People.ListTrips + produces: + - application/json parameters: - in: path name: UserName @@ -19904,6 +20886,8 @@ paths: operationId: People.UpdateTrips consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -19947,6 +20931,8 @@ paths: description: Find more info here url: https://learn.microsoft.com/graph/api/user-delete-trips?view=graph-rest-1.0 operationId: People.DeleteTrips + produces: + - application/json parameters: - in: path name: UserName @@ -20060,6 +21046,8 @@ paths: - People.Trips.PlanItem summary: Get PlanItems from People operationId: People.Trips.ListPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -20121,6 +21109,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.Trips.planItems.DeleteRefPlanItem + produces: + - application/json parameters: - in: path name: UserName @@ -20169,6 +21159,9 @@ paths: - People.Trips.PlanItem summary: Get the number of the resource operationId: People.Trips.PlanItems.GetCount-9a27 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -20205,6 +21198,8 @@ paths: - People.Trips.PlanItem summary: Get ref of PlanItems from People operationId: People.Trips.ListRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -20249,6 +21244,10 @@ paths: - People.Trips.PlanItem summary: Create new navigation property ref to PlanItems for People operationId: People.Trips.CreateRefPlanItems + consumes: + - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -20283,6 +21282,8 @@ paths: - People.Trips.PlanItem summary: Delete ref of navigation property PlanItems for People operationId: People.Trips.DeleteRefPlanItems + produces: + - application/json parameters: - in: path name: UserName @@ -20327,6 +21328,9 @@ paths: - People.Trip summary: Get the number of the resource operationId: People.Trips.GetCount-e877 + produces: + - text/plain + - application/json parameters: - in: path name: UserName @@ -20362,6 +21366,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.GetCount-dd8d + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -20391,6 +21398,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.Person.ListPerson.AsEmployee-013a + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -20441,6 +21450,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Person.Person.GetCount.AsEmployee-ef29 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -20470,6 +21482,8 @@ paths: - People.Person summary: Get the items of type Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager in the Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person collection operationId: People.Person.ListPerson.AsManager-3e14 + produces: + - application/json parameters: - in: header name: ConsistencyLevel @@ -20520,6 +21534,9 @@ paths: - People.Person summary: Get the number of the resource operationId: People.Person.Person.GetCount.AsManager-2d48 + produces: + - text/plain + - application/json parameters: - in: header name: ConsistencyLevel @@ -20550,6 +21567,8 @@ paths: summary: Invoke actionImport ResetDataSource description: Resets the data source to default values. operationId: ActionImport.ResetDataSource + produces: + - application/json responses: '204': description: Success From 8b442d27abad2d01e03880f7007a1477f1509660 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 22 Jan 2025 10:02:49 -0500 Subject: [PATCH 089/103] chore: linting Signed-off-by: Vincent Biret --- .../Common/EdmModelHelper.cs | 86 +++++++------------ 1 file changed, 30 insertions(+), 56 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/EdmModelHelper.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/EdmModelHelper.cs index b142a3b31..a7d5841c3 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/EdmModelHelper.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/EdmModelHelper.cs @@ -13,7 +13,6 @@ using System.IO; using System.Xml; using System.Collections.Generic; -using System.Net; using System.Text; using Microsoft.OData.Edm.Validation; using Xunit.Abstractions; @@ -23,40 +22,27 @@ namespace Microsoft.OpenApi.OData.Tests /// /// Edm model helpers /// - public class EdmModelHelper + public class EdmModelHelper(ITestOutputHelper output) { public static IEdmModel EmptyModel { get; } = new EdmModel(); - public static IEdmModel MultipleInheritanceEdmModel { get; } + public static IEdmModel MultipleInheritanceEdmModel { get; } = CreateMultipleInheritanceEdmModel(); - public static IEdmModel InheritanceEdmModelAcrossReferences { get; } + public static IEdmModel InheritanceEdmModelAcrossReferences { get; } = CreateInheritanceEdmModelAcrossReferences(); - public static IEdmModel BasicEdmModel { get; } + public static IEdmModel BasicEdmModel { get; } = CreateEdmModel(); - public static IEdmModel MultipleSchemasEdmModel { get; } + public static IEdmModel MultipleSchemasEdmModel { get; } = LoadEdmModel("Multiple.Schema.OData.xml"); - public static IEdmModel CompositeKeyModel { get; } + public static IEdmModel CompositeKeyModel { get; } = CreateCompositeKeyModel(); - public static IEdmModel TripServiceModel { get; } + public static IEdmModel TripServiceModel { get; } = LoadEdmModel("TripService.OData.xml"); - public static IEdmModel ContractServiceModel { get; } + public static IEdmModel ContractServiceModel { get; } = LoadEdmModel("Contract.OData.xml"); - public static IEdmModel GraphBetaModel { get; } + public static IEdmModel GraphBetaModel { get; } = LoadEdmModel("Graph.Beta.OData.xml"); - public static IEdmModel ComposableFunctionsModel { get; } - - static EdmModelHelper() - { - MultipleInheritanceEdmModel = CreateMultipleInheritanceEdmModel(); - BasicEdmModel = CreateEdmModel(); - CompositeKeyModel = CreateCompositeKeyModel(); - TripServiceModel = LoadEdmModel("TripService.OData.xml"); - ContractServiceModel = LoadEdmModel("Contract.OData.xml"); - GraphBetaModel = LoadEdmModel("Graph.Beta.OData.xml"); - MultipleSchemasEdmModel = LoadEdmModel("Multiple.Schema.OData.xml"); - InheritanceEdmModelAcrossReferences = CreateInheritanceEdmModelAcrossReferences(); - ComposableFunctionsModel = LoadEdmModel("ComposableFunctions.OData.xml"); - } + public static IEdmModel ComposableFunctionsModel { get; } = LoadEdmModel("ComposableFunctions.OData.xml"); private static IEdmModel LoadEdmModel(string source) { @@ -64,7 +50,7 @@ private static IEdmModel LoadEdmModel(string source) return CsdlReader.Parse(XElement.Parse(csdl).CreateReader()); } - private static IEdmModel CreateMultipleInheritanceEdmModel() + private static EdmModel CreateMultipleInheritanceEdmModel() { var model = new EdmModel(); @@ -112,7 +98,7 @@ private static IEdmModel CreateMultipleInheritanceEdmModel() horse.AddStructuralProperty("Height", EdmCoreModel.Instance.GetDecimal(false)); model.AddElement(horse); - EdmNavigationPropertyInfo navInfo = new EdmNavigationPropertyInfo + EdmNavigationPropertyInfo navInfo = new() { Name = "Creatures", Target = creature, @@ -202,19 +188,17 @@ public static IEdmModel CreateInheritanceEdmModelAcrossReferences() "; - IEdmModel model; - IEnumerable errors; XElement parsed = XElement.Parse(modelText); bool result = CsdlReader.TryParse(parsed.CreateReader(), uri => XElement.Parse(subModelText).CreateReader(), - out model, - out errors); + out var model, + out var _); Assert.True(result); return model; } - private static IEdmModel CreateEdmModel() + private static EdmModel CreateEdmModel() { var model = new EdmModel(); @@ -272,10 +256,10 @@ private static IEdmModel CreateEdmModel() var entityContainer = new EdmEntityContainer("DefaultNs", "Container"); model.AddElement(entityContainer); - EdmSingleton me = new EdmSingleton(entityContainer, "Me", person); - EdmEntitySet people = new EdmEntitySet(entityContainer, "People", person); - EdmEntitySet cities = new EdmEntitySet(entityContainer, "City", city); - EdmEntitySet countriesOrRegions = new EdmEntitySet(entityContainer, "CountryOrRegion", countryOrRegion); + EdmSingleton me = new(entityContainer, "Me", person); + EdmEntitySet people = new(entityContainer, "People", person); + EdmEntitySet cities = new(entityContainer, "City", city); + EdmEntitySet countriesOrRegions = new(entityContainer, "CountryOrRegion", countryOrRegion); people.AddNavigationTarget(navP, cities, new EdmPathExpression("HomeAddress/City")); people.AddNavigationTarget(navP, cities, new EdmPathExpression("Addresses/City")); people.AddNavigationTarget(navP2, countriesOrRegions, @@ -295,7 +279,7 @@ private static IEdmModel CreateEdmModel() return model; } - private static IEdmModel CreateCompositeKeyModel() + private static EdmModel CreateCompositeKeyModel() { var model = new EdmModel(); @@ -311,11 +295,7 @@ private static IEdmModel CreateCompositeKeyModel() return model; } - private ITestOutputHelper _output; - public EdmModelHelper(ITestOutputHelper output) - { - _output = output; - } + private readonly ITestOutputHelper _output = output; [Fact] public void MultipleInheritanceEdmModelMetadataDocumentTest() @@ -413,24 +393,18 @@ public void MultipleInheritanceEdmModelMetadataDocumentTest() public static string GetCsdl(IEdmModel model) { - string edmx = String.Empty; - - using (StringWriter sw = new StringWriter()) + using StringWriter sw = new(); + XmlWriterSettings settings = new() { - XmlWriterSettings settings = new XmlWriterSettings(); - settings.Encoding = Encoding.UTF8; - settings.Indent = true; - - using (XmlWriter xw = XmlWriter.Create(sw, settings)) - { - IEnumerable errors; - CsdlWriter.TryWriteCsdl(model, xw, CsdlTarget.OData, out errors); - xw.Flush(); - } + Encoding = Encoding.UTF8, + Indent = true + }; - edmx = sw.ToString(); - } + using XmlWriter xw = XmlWriter.Create(sw, settings); + CsdlWriter.TryWriteCsdl(model, xw, CsdlTarget.OData, out var _); + xw.Flush(); + string edmx = sw.ToString(); return edmx; } } From 10a39ab0d9c9ef0b8440c2bab682b9c9c34527cf Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 30 Jan 2025 14:27:21 -0500 Subject: [PATCH 090/103] fix: draft porting to newer proxy implementation design --- .../Common/EdmModelHelper.cs | 7 +- .../Common/OpenApiOperationExtensions.cs | 3 +- .../Common/Utils.cs | 3 +- .../OpenApiEdmTypeSchemaGenerator.cs | 173 +++++++----------- .../Generator/OpenApiErrorSchemaGenerator.cs | 13 +- .../Generator/OpenApiLinkGenerator.cs | 7 +- .../Generator/OpenApiParameterGenerator.cs | 42 +++-- .../Generator/OpenApiPathItemGenerator.cs | 5 +- .../Generator/OpenApiRequestBodyGenerator.cs | 7 +- .../Generator/OpenApiResponseGenerator.cs | 36 ++-- .../Generator/OpenApiSchemaGenerator.cs | 105 ++++++----- .../OpenApiSpatialTypeSchemaGenerator.cs | 35 ++-- .../OData/ODataConstants.cs | 7 +- .../ComplexPropertyGetOperationHandler.cs | 5 +- .../ComplexPropertyUpdateOperationHandler.cs | 5 +- .../DollarCountGetOperationHandler.cs | 3 +- .../Operation/EntityGetOperationHandler.cs | 5 +- .../Operation/EntitySetGetOperationHandler.cs | 2 +- .../EntitySetPostOperationHandler.cs | 18 +- .../Operation/EntityUpdateOperationHandler.cs | 5 +- .../MediaEntityPutOperationHandler.cs | 2 +- .../NavigationPropertyGetOperationHandler.cs | 10 +- .../NavigationPropertyOperationHandler.cs | 5 +- .../ODataTypeCastGetOperationHandler.cs | 13 +- .../Operation/OperationHandler.cs | 7 +- .../Operation/RefGetOperationHandler.cs | 5 +- .../Operation/SingletonGetOperationHandler.cs | 5 +- .../SingletonPatchOperationHandler.cs | 12 +- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 38 ++-- .../Generator/OpenApiLinkGeneratorTests.cs | 11 +- .../OpenApiParameterGeneratorTests.cs | 6 +- .../OpenApiRequestBodyGeneratorTests.cs | 6 +- .../OpenApiResponseGeneratorTests.cs | 20 +- .../Generator/OpenApiSchemaGeneratorTests.cs | 22 ++- .../DollarCountGetOperationHandlerTests.cs | 28 ++- .../EdmActionOperationHandlerTests.cs | 9 +- .../EntitySetGetOperationHandlerTests.cs | 5 +- .../MediaEntityPutOperationHandlerTests.cs | 7 +- .../Operation/RefPostOperationHandlerTests.cs | 6 +- .../Operation/RefPutOperationHandlerTests.cs | 6 +- 40 files changed, 366 insertions(+), 343 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs index 44b7d2ac9..b3cdf8ed4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs @@ -10,6 +10,7 @@ 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; @@ -37,15 +38,15 @@ internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType OpenApiSchema schema = new() { - OneOf = new List() + OneOf = new List() }; - OpenApiSchema baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), document); + var baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), document); schema.OneOf.Add(baseTypeSchema); foreach (IEdmSchemaElement derivedType in derivedTypes) { - OpenApiSchema derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), document); + var derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), document); schema.OneOf.Add(derivedTypeSchema); }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs index dd337a016..5d5e6ca7e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Generator; using System.Collections.Generic; @@ -23,7 +24,7 @@ internal static class OpenApiOperationExtensions /// Optional: Whether to add a 204 no content response. /// Optional: The OpenAPI schema of the response. /// The OpenAPI document to lookup references. - public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, OpenApiDocument document, bool addNoContent = false, OpenApiSchema schema = null) + public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, OpenApiDocument document, bool addNoContent = false, IOpenApiSchema schema = null) { Utils.CheckArgumentNull(operation, nameof(operation)); Utils.CheckArgumentNull(settings, nameof(settings)); diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs index 67ffd92bf..bbd253a0b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs @@ -12,6 +12,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Vocabulary; @@ -307,7 +308,7 @@ private static IEdmEntityType EntityTypeFromOperationSegment(this ODataSegment s /// The value to be added. /// true when the key and/or value are successfully added/updated to the dictionary; /// false when the dictionary already contains the specified key, and nothing gets added. - internal static bool TryAddPath(this IDictionary pathItems, + internal static bool TryAddPath(this IDictionary pathItems, ODataContext context, ODataPath path, OpenApiPathItem pathItem) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 3f20af009..540dbcfc6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -14,6 +14,7 @@ using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models.References; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -29,7 +30,7 @@ internal static class OpenApiEdmTypeSchemaGenerator /// The Edm type reference. /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + public static IOpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) => CreateEdmTypeSchema(context, edmTypeReference, document, true); /// /// Create a for a . @@ -39,7 +40,7 @@ public static OpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext co /// The Open API document to lookup references. /// Whether the schema is for a parameter. /// The created . - public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document, bool schemaForParameter = false) + public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(edmTypeReference, nameof(edmTypeReference)); @@ -52,8 +53,7 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT case EdmTypeKind.Collection: IEdmTypeReference typeRef = edmTypeReference.AsCollection().ElementType(); - OpenApiSchema schema; - schema = typeRef.TypeKind() == EdmTypeKind.Complex || typeRef.TypeKind() == EdmTypeKind.Entity + var schema = typeRef.TypeKind() == EdmTypeKind.Complex || typeRef.TypeKind() == EdmTypeKind.Entity ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), document, true) : context.CreateEdmTypeSchema(typeRef, document, schemaForParameter); @@ -95,27 +95,27 @@ public static OpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmT } /// - /// Create a for a . + /// Create a for a . /// /// The OData context. /// The Edm primitive reference. /// The Open API document to lookup references. /// Whether the schema is for a parameter. - /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document, bool schemaForParameter = false) + /// The created . + public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); Utils.CheckArgumentNull(document, nameof(document)); - OpenApiSchema schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document, schemaForParameter); - if (schema != null) + var schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document, schemaForParameter); + if (schema is OpenApiSchema openApiSchema) { switch(primitiveType.PrimitiveKind()) { case EdmPrimitiveTypeKind.Binary: // binary IEdmBinaryTypeReference binaryTypeReference = (IEdmBinaryTypeReference)primitiveType; - schema.MaxLength = binaryTypeReference.MaxLength; + openApiSchema.MaxLength = binaryTypeReference.MaxLength; break; case EdmPrimitiveTypeKind.Decimal: // decimal @@ -127,30 +127,30 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv // The precision is represented with the maximum and minimum keywords and a value of ±(10^ (precision - scale) - 10^ scale). double tmp = Math.Pow(10, decimalTypeReference.Precision.Value - decimalTypeReference.Scale.Value) - Math.Pow(10, -decimalTypeReference.Scale.Value); - schema.Minimum = (decimal?)(tmp * -1.0); - schema.Maximum = (decimal?)(tmp); + openApiSchema.Minimum = (decimal?)(tmp * -1.0); + openApiSchema.Maximum = (decimal?)(tmp); } else { // If the scale facet has a numeric value, and ±(10^precision - 1) if the scale is variable double tmp = Math.Pow(10, decimalTypeReference.Precision.Value) - 1; - schema.Minimum = (decimal?)(tmp * -1.0); - schema.Maximum = (decimal?)(tmp); + openApiSchema.Minimum = (decimal?)(tmp * -1.0); + openApiSchema.Maximum = (decimal?)(tmp); } } // The scale of properties of type Edm.Decimal are represented with the OpenAPI Specification keyword multipleOf and a value of 10 ^ -scale - schema.MultipleOf = decimalTypeReference.Scale == null ? null : (decimal?)(Math.Pow(10, decimalTypeReference.Scale.Value * -1)); + openApiSchema.MultipleOf = decimalTypeReference.Scale == null ? null : (decimal?)(Math.Pow(10, decimalTypeReference.Scale.Value * -1)); break; case EdmPrimitiveTypeKind.String: // string IEdmStringTypeReference stringTypeReference = (IEdmStringTypeReference)primitiveType; - schema.MaxLength = stringTypeReference.MaxLength; + openApiSchema.MaxLength = stringTypeReference.MaxLength; break; } // Nullable properties are marked with the keyword nullable and a value of true. // nullable cannot be true when type is empty, often common in anyof/allOf since individual entries are nullable - schema.Nullable = !string.IsNullOrEmpty(schema.Type.ToIdentifier()) && primitiveType.IsNullable; + openApiSchema.Nullable = !string.IsNullOrEmpty(schema.Type.ToIdentifier()) && primitiveType.IsNullable; } return schema; @@ -164,7 +164,7 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv /// The Open API document to lookup references. /// Whether the schema is for a parameter. /// The created . - public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document, bool schemaForParameter = false) + public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); @@ -295,53 +295,37 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv break; case EdmPrimitiveTypeKind.Geography: - schema = new OpenApiSchemaReference("Edm.Geography", document); - break; + return new OpenApiSchemaReference("Edm.Geography", document); case EdmPrimitiveTypeKind.GeographyPoint: - schema = new OpenApiSchemaReference("Edm.GeographyPoint", document); - break; + return new OpenApiSchemaReference("Edm.GeographyPoint", document); case EdmPrimitiveTypeKind.GeographyLineString: - schema = new OpenApiSchemaReference("Edm.GeographyLineString", document); - break; + return new OpenApiSchemaReference("Edm.GeographyLineString", document); case EdmPrimitiveTypeKind.GeographyPolygon: - schema = new OpenApiSchemaReference("Edm.GeographyPolygon", document); - break; + return new OpenApiSchemaReference("Edm.GeographyPolygon", document); case EdmPrimitiveTypeKind.GeographyCollection: - schema = new OpenApiSchemaReference("Edm.GeographyCollection", document); - break; + return new OpenApiSchemaReference("Edm.GeographyCollection", document); case EdmPrimitiveTypeKind.GeographyMultiPolygon: - schema = new OpenApiSchemaReference("Edm.GeographyMultiPolygon", document); - break; + return new OpenApiSchemaReference("Edm.GeographyMultiPolygon", document); case EdmPrimitiveTypeKind.GeographyMultiLineString: - schema = new OpenApiSchemaReference("Edm.GeographyMultiLineString", document); - break; + return new OpenApiSchemaReference("Edm.GeographyMultiLineString", document); case EdmPrimitiveTypeKind.GeographyMultiPoint: - schema = new OpenApiSchemaReference("Edm.GeographyMultiPoint", document); - break; + return new OpenApiSchemaReference("Edm.GeographyMultiPoint", document); case EdmPrimitiveTypeKind.Geometry: // Geometry - schema = new OpenApiSchemaReference("Edm.Geometry", document); - break; + return new OpenApiSchemaReference("Edm.Geometry", document); case EdmPrimitiveTypeKind.GeometryPoint: - schema = new OpenApiSchemaReference("Edm.GeometryPoint", document); - break; + return new OpenApiSchemaReference("Edm.GeometryPoint", document); case EdmPrimitiveTypeKind.GeometryLineString: - schema = new OpenApiSchemaReference("Edm.GeometryLineString", document); - break; + return new OpenApiSchemaReference("Edm.GeometryLineString", document); case EdmPrimitiveTypeKind.GeometryPolygon: - schema = new OpenApiSchemaReference("Edm.GeometryPolygon", document); - break; + return new OpenApiSchemaReference("Edm.GeometryPolygon", document); case EdmPrimitiveTypeKind.GeometryCollection: - schema = new OpenApiSchemaReference("Edm.GeometryCollection", document); - break; + return new OpenApiSchemaReference("Edm.GeometryCollection", document); case EdmPrimitiveTypeKind.GeometryMultiPolygon: - schema = new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); - break; + return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); case EdmPrimitiveTypeKind.GeometryMultiLineString: - schema = new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); - break; + return new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); case EdmPrimitiveTypeKind.GeometryMultiPoint: - schema = new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); - break; + return new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); case EdmPrimitiveTypeKind.None: default: @@ -351,45 +335,38 @@ public static OpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiv return schema; } - private static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference, OpenApiDocument document) + private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(typeReference != null); - OpenApiSchema schema = new OpenApiSchema(); - schema.Reference = null; if (typeReference.IsNullable && context.Settings.OpenApiSpecVersion >= OpenApiSpecVersion.OpenApi3_0) { - schema.AnyOf = new List - { - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), - new OpenApiSchema - { - Type = JsonSchemaType.Object, - Nullable = true - } + return new OpenApiSchema { + AnyOf = + [ + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), + new OpenApiSchema + { + Type = JsonSchemaType.Object, + Nullable = true + } + ] }; } else { - schema.Type = null; - schema.AnyOf = null; - schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); - schema.Nullable = typeReference.IsNullable; + return new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); } - - return schema; } - private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, OpenApiDocument document, bool isTypeCollection = false) + private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, OpenApiDocument document, bool isTypeCollection = false) { Debug.Assert(context != null); Debug.Assert(typeReference != null); Debug.Assert(document != null); - OpenApiSchema schema = new OpenApiSchema(); - // AnyOf will only be valid openApi for version 3 // otherwise the reference should be set directly // as per OASIS documentation for openApi version 2 @@ -397,58 +374,48 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex if (typeReference.IsNullable && !isTypeCollection && (context.Settings.OpenApiSpecVersion >= OpenApiSpecVersion.OpenApi3_0)) { - schema.Reference = null; - schema.AnyOf = new List - { - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), - new OpenApiSchema - { - Type = JsonSchemaType.Object, - Nullable = true - } + return new OpenApiSchema { + AnyOf = + [ + new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), + new OpenApiSchema + { + Type = JsonSchemaType.Object, + Nullable = true + } + ] }; } else { - schema.Type = null; - schema.AnyOf = null; - schema = new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); - schema.Nullable = typeReference.IsNullable; + return new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); } - - return schema; } - private static OpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference, OpenApiDocument document) + private static IOpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(reference != null); Debug.Assert(document != null); - OpenApiSchema schema = new OpenApiSchema(); - schema.Reference = null; - if (reference.IsNullable && context.Settings.OpenApiSpecVersion >= OpenApiSpecVersion.OpenApi3_0) { - schema.AnyOf = new List - { - new OpenApiSchemaReference(reference.Definition.FullTypeName(), document), - new OpenApiSchema - { - Type = JsonSchemaType.Object, - Nullable = true - } + return new OpenApiSchema { + AnyOf = + [ + new OpenApiSchemaReference(reference.Definition.FullTypeName(), document), + new OpenApiSchema + { + Type = JsonSchemaType.Object, + Nullable = true + } + ] }; } else { - schema.Type = null; - schema.AnyOf = null; - schema = new OpenApiSchemaReference(reference.Definition.FullTypeName(), document); - schema.Nullable = reference.IsNullable; + return new OpenApiSchemaReference(reference.Definition.FullTypeName(), document); } - - return schema; } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index 94393a7d8..56e8e2fb7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -12,6 +12,7 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.MicrosoftExtensions; using Microsoft.OpenApi.Models.References; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -33,12 +34,12 @@ internal static class OpenApiErrorSchemaGenerator /// The OData to Open API context. /// The Open API document to lookup references. /// The string/schema dictionary. - public static IDictionary CreateODataErrorSchemas(this ODataContext context, OpenApiDocument document) + public static IDictionary CreateODataErrorSchemas(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); var rootNamespaceName = context.GetErrorNamespaceName(); - return new Dictionary() + return new Dictionary() { { $"{rootNamespaceName}{ODataErrorClassName}", CreateErrorSchema(rootNamespaceName, document) }, { $"{rootNamespaceName}{MainErrorClassName}", CreateErrorMainSchema(rootNamespaceName, document) }, @@ -75,7 +76,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiD { "error" }, - Properties = new Dictionary + Properties = new Dictionary { { "error", @@ -92,7 +93,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiD /// The OData to Open API context. /// The Open API document to lookup references. /// The inner error schema definition. - public static OpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenApiDocument document) + public static IOpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); @@ -126,7 +127,7 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName, Open { "code", "message" }, - Properties = new Dictionary + Properties = new Dictionary { { "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false } @@ -167,7 +168,7 @@ public static OpenApiSchema CreateErrorDetailSchema() { "code", "message" }, - Properties = new Dictionary + Properties = new Dictionary { { "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs index 9da525a7d..5fb7804ea 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiLinkGenerator.cs @@ -9,6 +9,7 @@ using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; using System.Linq; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -28,9 +29,9 @@ internal static class OpenApiLinkGenerator /// "Optional: The list of parameters of the incoming operation. /// Optional: The operation id of the source of the NavigationProperty object. /// The created dictionary of object. - public static IDictionary CreateLinks(this ODataContext context, + public static IDictionary CreateLinks(this ODataContext context, IEdmEntityType entityType, string entityName, string entityKind, ODataPath path, - IList parameters = null, string navPropOperationId = null) + IList parameters = null, string navPropOperationId = null) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(entityType, nameof(entityType)); @@ -53,7 +54,7 @@ public static IDictionary CreateLinks(this ODataContext con } } - Dictionary links = new(); + Dictionary links = new(); bool lastSegmentIsColNavProp = (path.LastSegment as ODataNavigationPropertySegment)?.NavigationProperty.TargetMultiplicity() == EdmMultiplicity.Many; // Valid only for non collection-valued navigation properties diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index 57c899bc3..df2bdedef 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -16,6 +16,7 @@ using System.Text.Json.Nodes; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models.References; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -51,7 +52,7 @@ public static void AddParametersToDocument(this ODataContext context, OpenApiDoc /// The Edm function import. /// The Open API document to lookup references. /// The created list of . - public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport, OpenApiDocument document) + public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(functionImport, nameof(functionImport)); @@ -68,7 +69,7 @@ public static IList CreateParameters(this ODataContext context /// The Open API document to lookup references. /// The parameter name mapping. /// The created list of . - public static IList CreateParameters(this ODataContext context, IEdmFunction function, + public static IList CreateParameters(this ODataContext context, IEdmFunction function, OpenApiDocument document, IDictionary parameterNameMapping = null) { @@ -76,7 +77,7 @@ public static IList CreateParameters(this ODataContext context Utils.CheckArgumentNull(function, nameof(function)); Utils.CheckArgumentNull(document, nameof(document)); - IList parameters = new List(); + var parameters = new List(); int skip = function.IsBound ? 1 : 0; foreach (IEdmOperationParameter edmParameter in function.Parameters.Skip(skip)) { @@ -288,9 +289,9 @@ private static IList CreateAlternateKeyParameters(ODataContext /// The OData context. /// The Open API document to lookup references. /// The created list of - public static List CreatePathParameters(this ODataPath path, ODataContext context, OpenApiDocument document) + public static List CreatePathParameters(this ODataPath path, ODataContext context, OpenApiDocument document) { - List pathParameters = []; + List pathParameters = []; var parameterMappings = path.CalculateParameterMapping(context.Settings); foreach (ODataKeySegment keySegment in path.OfType()) @@ -308,7 +309,7 @@ public static List CreatePathParameters(this ODataPath path, O if (operationSegment.ParameterMappings != null) { - IList parameters = context.CreateParameters(function, document, operationSegment.ParameterMappings); + var parameters = context.CreateParameters(function, document, operationSegment.ParameterMappings); foreach (var parameter in parameters) { pathParameters.AppendParameter(parameter); @@ -317,7 +318,7 @@ public static List CreatePathParameters(this ODataPath path, O else { IDictionary mappings = parameterMappings[operationSegment]; - IList parameters = context.CreateParameters(function, document, mappings); + var parameters = context.CreateParameters(function, document, mappings); pathParameters.AddRange(parameters); } } @@ -338,7 +339,7 @@ public static List CreatePathParameters(this ODataPath path, O /// /// The list of OpenApiParameters to be appended to /// The new OpenApiParameter to be appended - public static void AppendParameter(this IList parameters, OpenApiParameter parameter) + public static void AppendParameter(this IList parameters, IOpenApiParameter parameter) { HashSet parametersSet = new(parameters.Select(p => p.Name)); @@ -350,7 +351,10 @@ public static void AppendParameter(this IList parameters, Open index++; } - parameter.Name = parameterName; + if (parameter is OpenApiParameter openApiParameter) + { + openApiParameter.Name = parameterName; + } parametersSet.Add(parameterName); parameters.Add(parameter); } @@ -362,7 +366,7 @@ public static void AppendParameter(this IList parameters, Open /// The Edm annotation target. /// The Open API document. /// The created or null. - public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); @@ -384,7 +388,7 @@ public static OpenApiParameter CreateTop(this ODataContext context, IEdmVocabula /// The string representation of the Edm target path. /// The Open API document to use to build references. /// - public static OpenApiParameter CreateTop(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateTop(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -404,7 +408,7 @@ public static OpenApiParameter CreateTop(this ODataContext context, string targe /// The Edm annotation target. /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); @@ -426,7 +430,7 @@ public static OpenApiParameter CreateSkip(this ODataContext context, IEdmVocabul /// The string representation of the Edm target path. /// The Open API document to use to build references. /// - public static OpenApiParameter CreateSkip(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateSkip(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -446,7 +450,7 @@ public static OpenApiParameter CreateSkip(this ODataContext context, string targ /// The Edm annotation target. /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); @@ -467,7 +471,7 @@ public static OpenApiParameter CreateSearch(this ODataContext context, IEdmVocab /// The string representation of the Edm target path. /// The Open API document to use to build references. /// - public static OpenApiParameter CreateSearch(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateSearch(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -487,7 +491,7 @@ public static OpenApiParameter CreateSearch(this ODataContext context, string ta /// The Edm annotation target. /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); @@ -509,7 +513,7 @@ public static OpenApiParameter CreateCount(this ODataContext context, IEdmVocabu /// The string representation of the Edm target path. /// The Open API document to use to build references. /// - public static OpenApiParameter CreateCount(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateCount(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -529,7 +533,7 @@ public static OpenApiParameter CreateCount(this ODataContext context, string tar /// The Edm annotation target. /// The Open API document to use to build references. /// The created or null. - public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); @@ -551,7 +555,7 @@ public static OpenApiParameter CreateFilter(this ODataContext context, IEdmVocab /// The string representation of the Edm target path. /// The Open API document to use to build references. /// - public static OpenApiParameter CreateFilter(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateFilter(this ODataContext context, string targetPath, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index cff731a4d..f0b09000d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -77,9 +78,9 @@ public static void AddPathItemsToDocument(this ODataContext context, OpenApiDocu } } - private static IDictionary CreateRootLinks(IEdmEntityContainer entityContainer) + private static IDictionary CreateRootLinks(IEdmEntityContainer entityContainer) { - var links = new Dictionary(); + var links = new Dictionary(); foreach (var element in entityContainer.Elements) { links.Add(element.Name, new OpenApiLink()); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index 9ec4cad33..ffb8f0c10 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -10,6 +10,7 @@ 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 { @@ -68,7 +69,7 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE OpenApiSchema parametersSchema = new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary() + Properties = new Dictionary() }; foreach (var parameter in action.Parameters.Skip(skip)) @@ -120,7 +121,7 @@ public static void AddRequestBodiesToDocument(this ODataContext context, OpenApi /// The OpenApi document to lookup references. private static OpenApiRequestBody CreateRefPostRequestBody(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, document); return new OpenApiRequestBody { Required = true, @@ -144,7 +145,7 @@ private static OpenApiRequestBody CreateRefPostRequestBody(OpenApiDocument docum /// The OpenApi document to lookup references. private static OpenApiRequestBody CreateRefPutRequestBody(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, document); return new OpenApiRequestBody { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 63597fe5c..292d7e874 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -8,6 +8,7 @@ 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; @@ -20,9 +21,9 @@ namespace Microsoft.OpenApi.OData.Generator /// internal static class OpenApiResponseGenerator { - private static Dictionary _responses; + private static Dictionary _responses; - private static Dictionary GetResponses(OpenApiDocument openApiDocument) + private static Dictionary GetResponses(OpenApiDocument openApiDocument) { _responses ??= new() { @@ -40,14 +41,14 @@ private static Dictionary GetResponses(OpenApiDocument } /// - /// Get the for the build-in statusCode. + /// Get the for the build-in statusCode. /// /// The status code. /// The OpenApi document to lookup references. - /// The created . - public static OpenApiResponse GetResponse(this string statusCode, OpenApiDocument document) + /// The created . + public static IOpenApiResponse GetResponse(this string statusCode, OpenApiDocument document) { - if (GetResponses(document).TryGetValue(statusCode, out OpenApiResponse response)) + if (GetResponses(document).TryGetValue(statusCode, out var response)) { return response; } @@ -172,13 +173,13 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, if (operation.ReturnType == null) return null; - OpenApiSchema schema; + IOpenApiSchema schema; if (operation.ReturnType.IsCollection()) { OpenApiSchema baseSchema = new() { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "value", context.CreateEdmTypeSchema(operation.ReturnType, document) @@ -191,13 +192,13 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, { schema = new OpenApiSchema { - AllOf = new List - { + AllOf = + [ new OpenApiSchemaReference(operation.IsDeltaFunction() ? Constants.BaseDeltaFunctionResponse // @odata.nextLink + @odata.deltaLink : Constants.BaseCollectionPaginationCountResponse // @odata.nextLink + @odata.count) ,document), baseSchema - } + ] }; } else if (operation.IsDeltaFunction()) @@ -219,9 +220,12 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, schema = baseSchema; } - schema.Title = operation.ReturnType.Definition.AsElementType() is not IEdmEntityType entityType - ? null : $"Collection of {entityType.Name}"; - schema.Type = JsonSchemaType.Object; + if (schema is OpenApiSchema openApiSchema) + { + openApiSchema.Title = operation.ReturnType.Definition.AsElementType() is not IEdmEntityType entityType + ? null : $"Collection of {entityType.Name}"; + openApiSchema.Type = JsonSchemaType.Object; + } } else if (operation.ReturnType.IsPrimitive()) { @@ -230,7 +234,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, schema = new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "value", context.CreateEdmTypeSchema(operation.ReturnType, document) @@ -298,7 +302,7 @@ private static OpenApiResponse CreateCollectionResponse(string typeName, OpenApi private static OpenApiResponse CreateCountResponse(OpenApiDocument document) { - OpenApiSchema schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, document); return new OpenApiResponse { Description = "The count of the resource", diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 0d3ccf112..a3c67f313 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -21,6 +21,7 @@ using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models.References; using System.Globalization; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Generator { @@ -65,7 +66,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume document.AddComponent(Constants.ReferenceUpdateSchemaName, new OpenApiSchema() { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }}, {Constants.OdataType, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }}, @@ -75,7 +76,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume document.AddComponent(Constants.ReferenceCreateSchemaName, new OpenApiSchema() { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }} }, @@ -119,7 +120,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume { Title = "Base delta function response", Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { {ODataConstants.OdataNextLink.Key, ODataConstants.OdataNextLink.Value}, {ODataConstants.OdataDeltaLink.Key, ODataConstants.OdataDeltaLink.Value} @@ -210,7 +211,7 @@ internal static IEnumerable GetAllCollectionEntityTypes(this private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { - OpenApiSchema schema = null; + IOpenApiSchema schema = null; var entityType = structuredType as IEdmEntityType; if (context.Settings.EnableDerivedTypesReferencesForResponses && entityType != null) @@ -224,9 +225,9 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmSt } return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName(), document); } - private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenApiSchema schema, string typeName, OpenApiDocument document) + private static OpenApiSchema CreateCollectionSchema(ODataContext context, IOpenApiSchema schema, string typeName, OpenApiDocument document) { - var properties = new Dictionary + var properties = new Dictionary { { "value", @@ -250,15 +251,15 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, OpenAp if (context.Settings.EnableODataAnnotationReferencesForResponses) { // @odata.nextLink + @odata.count - OpenApiSchema paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, document); + var paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, document); collectionSchema = new OpenApiSchema { - AllOf = new List - { + AllOf = + [ paginationCountSchema, baseSchema - } + ] }; } else @@ -379,29 +380,31 @@ public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context /// The OData context. /// The Edm property. /// The Open API document to lookup references. - /// The created . - public static OpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property, OpenApiDocument document) + /// The created . + public static IOpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(property, nameof(property)); Utils.CheckArgumentNull(document, nameof(document)); - OpenApiSchema schema = context.CreateEdmTypeSchema(property.Type, document); + var schema = context.CreateEdmTypeSchema(property.Type, document); - switch (property.PropertyKind) + + if (schema is OpenApiSchema openApiSchema) { - case EdmPropertyKind.Structural: - IEdmStructuralProperty structuralProperty = (IEdmStructuralProperty)property; - schema.Default = CreateDefault(structuralProperty); - break; - } + if (property.PropertyKind is EdmPropertyKind.Structural && + property is IEdmStructuralProperty structuralProperty) + { + openApiSchema.Default = CreateDefault(structuralProperty); + } - // The Schema Object for a property optionally can contain the field description, - // whose value is the value of the unqualified annotation Core.Description of the property. - schema.Description = context.Model.GetDescriptionAnnotation(property); + // The Schema Object for a property optionally can contain the field description, + // whose value is the value of the unqualified annotation Core.Description of the property. + openApiSchema.Description = context.Model.GetDescriptionAnnotation(property); - // Set property with Computed Annotation in CSDL to readonly - schema.ReadOnly = context.Model.GetBoolean(property, CoreConstants.Computed) ?? false; + // Set property with Computed Annotation in CSDL to readonly + openApiSchema.ReadOnly = context.Model.GetBoolean(property, CoreConstants.Computed) ?? false; + } return schema; } @@ -413,46 +416,52 @@ public static OpenApiSchema CreatePropertySchema(this ODataContext context, IEdm /// The Edm structured type. /// The Open API document to lookup references. /// The created map of . - public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(structuredType, nameof(structuredType)); // The name is the property name, the value is a Schema Object describing the allowed values of the property. - IDictionary properties = new Dictionary(); + var properties = new Dictionary(); // structure properties foreach (var property in structuredType.DeclaredStructuralProperties()) { - OpenApiSchema propertySchema = context.CreatePropertySchema(property, document); - propertySchema.Description = context.Model.GetDescriptionAnnotation(property); - // we always want a new copy because it's a reference - propertySchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); - propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); + var propertySchema = context.CreatePropertySchema(property, document); + if (propertySchema is OpenApiSchema openApiSchema) + { + openApiSchema.Description = context.Model.GetDescriptionAnnotation(property); + // we always want a new copy because it's a reference + openApiSchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); + openApiSchema.Extensions.AddCustomAttributesToExtensions(context, property); + } properties.Add(property.Name, propertySchema); } // navigation properties foreach (var property in structuredType.DeclaredNavigationProperties()) { - OpenApiSchema propertySchema = context.CreateEdmTypeSchema(property.Type, document); - propertySchema.Description = context.Model.GetDescriptionAnnotation(property); - // we always want a new copy because it's a reference - propertySchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); - propertySchema.Extensions.AddCustomAttributesToExtensions(context, property); - propertySchema.Extensions.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); + var propertySchema = context.CreateEdmTypeSchema(property.Type, document); + if (propertySchema is OpenApiSchema openApiSchema) + { + openApiSchema.Description = context.Model.GetDescriptionAnnotation(property); + // we always want a new copy because it's a reference + openApiSchema.Extensions = propertySchema.Extensions is null ? [] : new Dictionary(propertySchema.Extensions); + openApiSchema.Extensions.AddCustomAttributesToExtensions(context, property); + openApiSchema.Extensions.Add(Constants.xMsNavigationProperty, new OpenApiAny(true)); + } properties.Add(property.Name, propertySchema); } return properties; } - public static OpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition, OpenApiDocument document) + public static IOpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition, OpenApiDocument document) { return context.CreateSchema(typeDefinition.UnderlyingType, document); } - internal static OpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType, OpenApiDocument document) + internal static IOpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType, OpenApiDocument document) { Debug.Assert(context != null); Debug.Assert(edmType != null); @@ -511,14 +520,14 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex { Extensions = extension, - AllOf = new List - { + AllOf = + [ // 1. a JSON Reference to the Schema Object of the base type new OpenApiSchemaReference(structuredType.BaseType.FullTypeName(), document), // 2. a Schema Object describing the derived type context.CreateStructuredTypeSchema(structuredType, false, false, document, derivedTypes) - }, + ], AnyOf = null, OneOf = null, @@ -637,7 +646,7 @@ structuredType is IEdmEntityType entityType && private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) { IEdmPrimitiveType primitiveType = edmTypeReference.AsPrimitive().PrimitiveDefinition(); - OpenApiSchema schema = context.CreateSchema(primitiveType, document); + IOpenApiSchema schema = context.CreateSchema(primitiveType, document); if (edmTypeReference.IsBoolean()) { @@ -645,16 +654,16 @@ private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeRe } else { - if (schema.Reference != null) + if (schema is OpenApiSchemaReference { Reference.Id: not null } reference && !string.IsNullOrEmpty(reference.Reference.Id)) { - return schema.Reference.Id; + return reference.Reference.Id; } else { return schema.Type.ToIdentifier() ?? - (schema.AnyOf ?? Enumerable.Empty()) - .Union(schema.AllOf ?? Enumerable.Empty()) - .Union(schema.OneOf ?? Enumerable.Empty()) + (schema.AnyOf ?? Enumerable.Empty()) + .Union(schema.AllOf ?? Enumerable.Empty()) + .Union(schema.OneOf ?? Enumerable.Empty()) .FirstOrDefault(static x => !string.IsNullOrEmpty(x.Format))?.Format ?? schema.Format; } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs index a3daca486..74a70bf06 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs @@ -6,6 +6,7 @@ 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; @@ -25,11 +26,11 @@ internal static class OpenApiSpatialTypeSchemaGenerator /// The OData to Open API context. /// The document to use to lookup references. /// The string/schema dictionary. - public static IDictionary CreateSpatialSchemas(this ODataContext context, OpenApiDocument document) + public static IDictionary CreateSpatialSchemas(this ODataContext context, OpenApiDocument document) { Utils.CheckArgumentNull(context, nameof(context)); - IDictionary schemas = new Dictionary(); + var schemas = new Dictionary(); if (context.IsSpatialTypeUsed) { @@ -76,7 +77,7 @@ public static IDictionary CreateSpatialSchemas(this OData /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographySchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographySchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.Geometry", document); } @@ -86,7 +87,7 @@ public static OpenApiSchema CreateEdmGeographySchema(OpenApiDocument document) /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyPointSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyPointSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryPoint", document); } @@ -96,7 +97,7 @@ public static OpenApiSchema CreateEdmGeographyPointSchema(OpenApiDocument docume /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyLineStringSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyLineStringSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryLineString", document); } @@ -106,7 +107,7 @@ public static OpenApiSchema CreateEdmGeographyLineStringSchema(OpenApiDocument d /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyPolygonSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyPolygonSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryPolygon", document); } @@ -116,7 +117,7 @@ public static OpenApiSchema CreateEdmGeographyPolygonSchema(OpenApiDocument docu /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyMultiPointSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiPointSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); } @@ -126,7 +127,7 @@ public static OpenApiSchema CreateEdmGeographyMultiPointSchema(OpenApiDocument d /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiLineStringSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); } @@ -136,7 +137,7 @@ public static OpenApiSchema CreateEdmGeographyMultiLineStringSchema(OpenApiDocum /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiPolygonSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); } @@ -146,7 +147,7 @@ public static OpenApiSchema CreateEdmGeographyMultiPolygonSchema(OpenApiDocument /// /// The created . /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeographyCollectionSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyCollectionSchema(OpenApiDocument document) { return new OpenApiSchemaReference("Edm.GeometryCollection", document); } @@ -184,7 +185,7 @@ public static OpenApiSchema CreateEdmGeometryPointSchema(OpenApiDocument documen return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -216,7 +217,7 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema(OpenApiDocument do return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -252,7 +253,7 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema(OpenApiDocument docum return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -292,7 +293,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema(OpenApiDocument do return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -327,7 +328,7 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema(OpenApiDocume return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -367,7 +368,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema(OpenApiDocument return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { @@ -411,7 +412,7 @@ public static OpenApiSchema CreateEdmGeometryCollectionSchema(OpenApiDocument do return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "type", new OpenApiSchema { diff --git a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs index 9426c5e3e..c4916af76 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs @@ -4,6 +4,7 @@ // ------------------------------------------------------------ using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using System.Collections.Generic; namespace Microsoft.OpenApi.OData @@ -23,16 +24,16 @@ internal static class ODataConstants /// /// @odata.nextLink KeyValue pair /// - public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); + public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); /// /// @odata.count KeyValue pair /// - public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64", Nullable = true }); + public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64", Nullable = true }); /// /// @odata.deltaLink KeyValue pair /// - public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); + public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index 7341bbfe9..b8e01cccd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -8,6 +8,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -63,7 +64,7 @@ protected override void SetParameters(OpenApiOperation operation) { base.SetParameters(operation); - OpenApiParameter parameter; + IOpenApiParameter parameter; if(ComplexPropertySegment.Property.Type.IsCollection()) { // The parameters array contains Parameter Objects for all system query options allowed for this collection, @@ -158,7 +159,7 @@ protected override void SetResponses(OpenApiOperation operation) } else { - OpenApiSchema schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); SetSingleResponse(operation, schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index 3de188752..c05aa00d3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -7,6 +7,7 @@ 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; @@ -109,7 +110,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) } } - private OpenApiSchema GetOpenApiSchema() + private IOpenApiSchema GetOpenApiSchema() { var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); @@ -118,7 +119,7 @@ private OpenApiSchema GetOpenApiSchema() return new OpenApiSchema { Type = JsonSchemaType.Object, - Properties = new Dictionary + Properties = new Dictionary { { "value", diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 80ed1d477..226f45015 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -10,6 +10,7 @@ using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -183,7 +184,7 @@ protected override void SetParameters(OpenApiOperation operation) { base.SetParameters(operation); - OpenApiParameter parameter; + IOpenApiParameter parameter; parameter = Context.CreateSearch(TargetPath, _document) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateSearch(x, _document)).FirstOrDefault(static x => x is not null)); if (parameter != null) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index 336a9c8ca..eca54745d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -12,6 +12,7 @@ using Microsoft.OpenApi.OData.Vocabulary.Capabilities; using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.Models.References; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.OData.Operation { @@ -97,8 +98,8 @@ protected override void SetParameters(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - OpenApiSchema schema = null; - IDictionary links = null; + IOpenApiSchema schema = null; + IDictionary links = null; if (Context.Settings.EnableDerivedTypesReferencesForResponses) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index 254f6f486..e4d4067c4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -88,7 +88,7 @@ protected override void SetParameters(OpenApiOperation operation) // Capabilities.TopSupported, Capabilities.SkipSupported, Capabilities.SearchRestrictions, // Capabilities.FilterRestrictions, and Capabilities.CountRestrictions // $top - OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(EntitySet, _document); + var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(EntitySet, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 68fd4d230..4167d7d3b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -7,6 +7,7 @@ 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; @@ -131,7 +132,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) /// The entity content description. private IDictionary GetContentDescription() { - OpenApiSchema schema = GetEntitySchema(); + var schema = GetEntitySchema(); var content = new Dictionary(); if (EntitySet.EntityType.HasStream) @@ -190,18 +191,11 @@ private IDictionary GetContentDescription() /// Get the entity schema. /// /// The entity schema. - private OpenApiSchema GetEntitySchema() + private IOpenApiSchema GetEntitySchema() { - OpenApiSchema schema = null; - - if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) - { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); - } - - schema ??= new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); - - return schema; + return Context.Settings.EnableDerivedTypesReferencesForRequestBody ? + EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document) : + new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index ca3b5fc75..01568a1b0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -7,6 +7,7 @@ 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; @@ -85,7 +86,7 @@ protected override void SetRequestBody(OpenApiOperation operation) protected IDictionary GetContent() { - OpenApiSchema schema = GetOpenApiSchema(); + var schema = GetOpenApiSchema(); var content = new Dictionary(); IEnumerable mediaTypes = _updateRestrictions?.RequestContentTypes; @@ -147,7 +148,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) } } - private OpenApiSchema GetOpenApiSchema() + private IOpenApiSchema GetOpenApiSchema() { if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index 664285b92..a1b9649ab 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -99,7 +99,7 @@ protected override void SetResponses(OpenApiOperation operation) // Get the entity type declaring this stream property. (var entityType, _) = GetStreamElements(); - OpenApiSchema schema = new OpenApiSchemaReference(entityType.FullName(), _document); + var schema = new OpenApiSchemaReference(entityType.FullName(), _document); operation.AddErrorResponses(Context.Settings, _document, addNoContent: true, schema: schema); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index bf8a76d01..6ca66c765 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -9,6 +9,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -90,7 +91,7 @@ protected override void SetExtensions(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - IDictionary links = null; + IDictionary links = null; if (Context.Settings.ShowLinks) { string operationId = GetOperationId(); @@ -107,15 +108,12 @@ protected override void SetResponses(OpenApiOperation operation) { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}", _document) - { - Links = links - } } }; } else { - OpenApiSchema schema = null; + IOpenApiSchema schema = null; var entityType = NavigationProperty.ToEntityType(); if (Context.Settings.EnableDerivedTypesReferencesForResponses) @@ -168,7 +166,7 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. - OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); + var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index ccf42c336..240a6e2bd 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -6,6 +6,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -191,7 +192,7 @@ protected IRecord GetRestrictionAnnotation(string annotationTerm) } } - protected IDictionary GetContent(OpenApiSchema schema = null, IEnumerable mediaTypes = null) + protected IDictionary GetContent(IOpenApiSchema schema = null, IEnumerable mediaTypes = null) { schema ??= GetOpenApiSchema(); var content = new Dictionary(); @@ -218,7 +219,7 @@ protected IDictionary GetContent(OpenApiSchema schema return content; } - protected OpenApiSchema GetOpenApiSchema() + protected IOpenApiSchema GetOpenApiSchema() { return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), _document); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index 22f9cd0a5..c51adf320 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -11,6 +11,7 @@ using Microsoft.OData.Edm.Vocabularies; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -208,7 +209,7 @@ protected override void SetResponses(OpenApiOperation operation) { if (IsSingleElement) { - OpenApiSchema schema = null; + IOpenApiSchema schema = null; if (Context.Settings.EnableDerivedTypesReferencesForResponses) { @@ -303,23 +304,23 @@ protected override void SetParameters(OpenApiOperation operation) { if(IsSingleElement) { - new OpenApiParameter[] { + new IOpenApiParameter[] { Context.CreateSelect(TargetPath, entitySet.EntityType) ?? Context.CreateSelect(entitySet), Context.CreateExpand(TargetPath, entitySet.EntityType) ?? Context.CreateExpand(entitySet), } .Where(x => x != null) .ToList() - .ForEach(p => operation.Parameters.Add(p)); + .ForEach(operation.Parameters.Add); } else { GetParametersForAnnotableOfMany(entitySet) .Union( - new OpenApiParameter[] { + [ Context.CreateOrderBy(TargetPath, entitySet.EntityType) ?? Context.CreateOrderBy(entitySet), Context.CreateSelect(TargetPath, entitySet.EntityType) ?? Context.CreateSelect(entitySet), Context.CreateExpand(TargetPath, entitySet.EntityType) ?? Context.CreateExpand(entitySet), - }) + ]) .Where(x => x != null) .ToList() .ForEach(p => operation.Parameters.Add(p)); @@ -336,7 +337,7 @@ protected override void SetParameters(OpenApiOperation operation) .ForEach(p => operation.Parameters.Add(p)); } } - private IEnumerable GetParametersForAnnotableOfMany(IEdmVocabularyAnnotatable annotable) + private IEnumerable GetParametersForAnnotableOfMany(IEdmVocabularyAnnotatable annotable) { // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index aa68a2b40..5d934cb4e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -7,6 +7,7 @@ using System.Linq; 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; @@ -40,7 +41,7 @@ protected OperationHandler(OpenApiDocument document) /// /// The path parameters in the path /// - protected IList PathParameters; + protected IList PathParameters; /// /// The string representation of the Edm target path for annotations. @@ -261,7 +262,7 @@ protected static void AppendCustomParameters(OpenApiOperation operation, IList(); + parameter.Examples = new Dictionary(); int index = 1; foreach (var example in param.ExampleValues) { @@ -320,7 +321,7 @@ internal void SetCollectionResponse(OpenApiOperation operation, string targetEle }; } - internal void SetSingleResponse(OpenApiOperation operation, OpenApiSchema schema) + internal void SetSingleResponse(OpenApiOperation operation, IOpenApiSchema schema) { Utils.CheckArgumentNull(operation, nameof(operation)); Utils.CheckArgumentNull(schema, nameof(schema)); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index 2e1c8aa70..1dc242b5d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -9,6 +9,7 @@ using Microsoft.OData.Edm; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.OData.Common; using Microsoft.OpenApi.OData.Edm; @@ -102,7 +103,7 @@ protected override void SetResponses(OpenApiOperation operation) // $ref returns string for the Uri? Type = JsonSchemaType.String }; - IDictionary links = null; + IDictionary links = null; if (Context.Settings.ShowLinks) { string operationId = GetOperationId(); @@ -149,7 +150,7 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigaiton source. // So, how about for the navigation property. - OpenApiParameter parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); + var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 93dd3f969..9b8b55a92 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -7,6 +7,7 @@ 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; @@ -84,8 +85,8 @@ protected override void SetParameters(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - OpenApiSchema schema = null; - IDictionary links = null; + IOpenApiSchema schema = null; + IDictionary links = null; if (Context.Settings.EnableDerivedTypesReferencesForResponses) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index 7fa7aceb4..e8cb4b945 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -7,6 +7,7 @@ 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; @@ -119,14 +120,11 @@ protected override void AppendCustomParameters(OpenApiOperation operation) } } - private OpenApiSchema GetOpenApiSchema() + private IOpenApiSchema GetOpenApiSchema() { - if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) - { - return EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document); - } - - return new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); + return Context.Settings.EnableDerivedTypesReferencesForRequestBody ? + EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document) : + new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); } } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index e162652a6..5eb3e520d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -10,6 +10,7 @@ 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; @@ -185,10 +186,10 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS if (specVersion == OpenApiSpecVersion.OpenApi2_0) { - Assert.NotNull(schema.Reference); + var schemaReference = Assert.IsType(schema); Assert.Null(schema.AnyOf); - Assert.Equal(ReferenceType.Schema, schema.Reference.Type); - Assert.Equal(enumType.FullTypeName(), schema.Reference.Id); + Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); + Assert.Equal(enumType.FullTypeName(), schemaReference.Reference.Id); Assert.Equal(isNullable, schema.Nullable); } else @@ -198,9 +199,9 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS { Assert.NotNull(schema.AnyOf); Assert.NotEmpty(schema.AnyOf); - Assert.Null(schema.Reference); + Assert.IsNotType(schema); Assert.Equal(2, schema.AnyOf.Count); - var anyOfRef = schema.AnyOf.FirstOrDefault(); + var anyOfRef = Assert.IsType(schema.AnyOf.FirstOrDefault()); Assert.NotNull(anyOfRef.Reference); Assert.Equal(ReferenceType.Schema, anyOfRef.Reference.Type); Assert.Equal(enumType.FullTypeName(), anyOfRef.Reference.Id); @@ -212,9 +213,9 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS else { Assert.Null(schema.AnyOf); - Assert.NotNull(schema.Reference); - Assert.Equal(ReferenceType.Schema, schema.Reference.Type); - Assert.Equal(enumType.FullTypeName(), schema.Reference.Id); + var schemaReference = Assert.IsType(schema); + Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); + Assert.Equal(enumType.FullTypeName(), schemaReference.Reference.Id); } } } @@ -244,17 +245,17 @@ public void CreateEdmTypeSchemaReturnSchemaForComplexType(bool isNullable, OpenA if (specVersion == OpenApiSpecVersion.OpenApi2_0 || isNullable == false) { Assert.Null(schema.AnyOf); - Assert.NotNull(schema.Reference); - Assert.Equal(ReferenceType.Schema, schema.Reference.Type); - Assert.Equal(complex.FullTypeName(), schema.Reference.Id); + var schemaReference = Assert.IsType(schema); + Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); + Assert.Equal(complex.FullTypeName(), schemaReference.Reference.Id); } else { - Assert.Null(schema.Reference); + Assert.IsNotType(schema); Assert.NotNull(schema.AnyOf); Assert.NotEmpty(schema.AnyOf); Assert.Equal(2, schema.AnyOf.Count); - var anyOf = schema.AnyOf.FirstOrDefault(); + var anyOf = Assert.IsType(schema.AnyOf.FirstOrDefault()); Assert.NotNull(anyOf.Reference); Assert.Equal(ReferenceType.Schema, anyOf.Reference.Type); Assert.Equal(complex.FullTypeName(), anyOf.Reference.Id); @@ -286,16 +287,17 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp if (specVersion == OpenApiSpecVersion.OpenApi2_0 || isNullable == false) { Assert.Null(schema.AnyOf); - Assert.NotNull(schema.Reference); - Assert.Equal(ReferenceType.Schema, schema.Reference.Type); - Assert.Equal(entity.FullTypeName(), schema.Reference.Id); + var schemaReference = Assert.IsType(schema); + Assert.NotNull(schemaReference.Reference); + Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); + Assert.Equal(entity.FullTypeName(), schemaReference.Reference.Id); } else { - Assert.Null(schema.Reference); + Assert.IsNotType(schema); Assert.NotNull(schema.AnyOf); Assert.NotEmpty(schema.AnyOf); - var anyOfRef = schema.AnyOf.FirstOrDefault(); + var anyOfRef = Assert.IsType(schema.AnyOf.FirstOrDefault()); Assert.NotNull(anyOfRef.Reference); Assert.Equal(ReferenceType.Schema, anyOfRef.Reference.Type); Assert.Equal(entity.FullTypeName(), anyOfRef.Reference.Id); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs index 92e8f0d4e..3d630d7c8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiLinkGeneratorTests.cs @@ -7,6 +7,7 @@ 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; @@ -36,7 +37,7 @@ public void CreateLinksForSingleValuedNavigationProperties() new ODataNavigationPropertySegment(navProperty)); // Act - IDictionary links = context.CreateLinks( + var links = context.CreateLinks( entityType: navProperty.ToEntityType(), entityName: adminEntityType.Name, entityKind: navProperty.PropertyKind.ToString(), @@ -87,7 +88,7 @@ public void CreateLinksForCollectionValuedNavigationProperties() new ODataNavigationPropertySegment(navProperty2)); // Act - IDictionary links = context.CreateLinks( + var links = context.CreateLinks( entityType: navProperty2.ToEntityType(), entityName: singletonEntityType.Name, entityKind: navProperty2.PropertyKind.ToString(), @@ -150,7 +151,7 @@ public void CreateLinksForSingletons() new ODataNavigationSourceSegment(singleton)); // Act - IDictionary links = context.CreateLinks( + var links = context.CreateLinks( entityType: singleton.EntityType, entityName: singleton.Name, entityKind: singleton.ContainerElementKind.ToString(), @@ -205,7 +206,7 @@ public void CreateLinksForEntities() new ODataNavigationSourceSegment(entityset), new ODataKeySegment(entityset.EntityType)); - var parameters = new List() + var parameters = new List() { new OpenApiParameter() { @@ -221,7 +222,7 @@ public void CreateLinksForEntities() }; // Act - IDictionary links = context.CreateLinks( + var links = context.CreateLinks( entityType: entityset.EntityType, entityName: entityset.Name, entityKind: entityset.ContainerElementKind.ToString(), diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index ce24539c7..1560d69fc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -585,9 +585,9 @@ public async Task CreateParametersWorks() Assert.NotNull(function3); // Act - IList parameters1 = context.CreateParameters(function1, new()); - IList parameters2 = context.CreateParameters(function2, new()); - IList parameters3 = context.CreateParameters(function3, new()); + var parameters1 = context.CreateParameters(function1, new()); + var parameters2 = context.CreateParameters(function2, new()); + var parameters3 = context.CreateParameters(function3, new()); // Assert Assert.NotNull(parameters1); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index 57742f7f2..49aad3ba3 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -10,6 +10,7 @@ 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; @@ -168,12 +169,13 @@ public void CreateRefRequestBodies() // Act context.AddRequestBodiesToDocument(openApiDocument); var requestBodies = openApiDocument.Components.RequestBodies; - requestBodies.TryGetValue(Common.Constants.ReferencePostRequestBodyName, out Models.OpenApiRequestBody refPostBody); + requestBodies.TryGetValue(Common.Constants.ReferencePostRequestBodyName, out var refPostBody); // Assert Assert.NotNull(refPostBody); Assert.Equal("New navigation property ref value", refPostBody.Description); - Assert.Equal(Common.Constants.ReferenceCreateSchemaName, refPostBody.Content.First().Value.Schema.Reference.Id); + var schemaReference = Assert.IsType(refPostBody.Content.First().Value.Schema); + Assert.Equal(Common.Constants.ReferenceCreateSchemaName, schemaReference.Reference.Id); } } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 39428ddaa..4151f3058 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -14,6 +14,7 @@ using System.Text.Json.Nodes; using System.Threading.Tasks; using Moq; +using Microsoft.OpenApi.Models.References; namespace Microsoft.OpenApi.OData.Generator.Tests { @@ -76,8 +77,10 @@ public void CreatesCollectionResponses() var flightCollectionResponse = responses["Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse"]; var stringCollectionResponse = responses["StringCollectionResponse"]; - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse", flightCollectionResponse.Content["application/json"].Schema.Reference.Id); - Assert.Equal("StringCollectionResponse", stringCollectionResponse.Content["application/json"].Schema.Reference.Id); + var flightCollectionResponseSchemaReference = Assert.IsType(flightCollectionResponse.Content["application/json"].Schema); + Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.FlightCollectionResponse", flightCollectionResponseSchemaReference.Reference.Id); + var stringCollectionResponseSchemaReference = Assert.IsType(stringCollectionResponse.Content["application/json"].Schema); + Assert.Equal("StringCollectionResponse", stringCollectionResponseSchemaReference.Reference.Id); } [Fact] @@ -211,7 +214,7 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm Assert.Equal(2, responses.Count); Assert.Equal(new string[] { "200", "default" }, responses.Select(r => r.Key)); - OpenApiResponse response = responses["200"]; + var response = responses["200"]; Assert.NotNull(response.Content); OpenApiMediaType mediaType = response.Content["application/json"]; @@ -220,17 +223,18 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm { Assert.NotNull(mediaType.Schema); Assert.Null(mediaType.Schema.AnyOf); - Assert.NotNull(mediaType.Schema.Reference); - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", mediaType.Schema.Reference.Id); + var mediaTypeSchemaReference = Assert.IsType(mediaType.Schema); + Assert.NotNull(mediaTypeSchemaReference.Reference); + Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", mediaTypeSchemaReference.Reference.Id); Assert.True(mediaType.Schema.Nullable); } else { Assert.NotNull(mediaType.Schema); - Assert.Null(mediaType.Schema.Reference); + Assert.IsNotType(mediaType.Schema); Assert.NotNull(mediaType.Schema.AnyOf); Assert.Equal(2, mediaType.Schema.AnyOf.Count); - var anyOfRef = mediaType.Schema.AnyOf.FirstOrDefault(); + var anyOfRef = Assert.IsType(mediaType.Schema.AnyOf.FirstOrDefault()); Assert.NotNull(anyOfRef); Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", anyOfRef.Reference.Id); var anyOfNull = mediaType.Schema.AnyOf.Skip(1).FirstOrDefault(); @@ -265,7 +269,7 @@ public void CreateResponseForEdmFunctionOfStreamReturnTypeReturnsCorrectResponse Assert.Equal(2, responses1.Count); Assert.Equal(new string[] { "200", "default" }, responses1.Select(r => r.Key)); - OpenApiResponse response = responses1["200"]; + var response = responses1["200"]; Assert.NotNull(response.Content); Assert.Equal("application/octet-stream", response.Content.First().Key); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index fbf6ed49b..b008f65a6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -10,6 +10,7 @@ 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; @@ -66,7 +67,8 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo Assert.Collection(stringCollectionResponse.AllOf, item => { - Assert.Equal(referenceId, item.Reference.Id); + var itemReference = Assert.IsType(item); + Assert.Equal(referenceId, itemReference.Reference.Id); }, item => { @@ -75,13 +77,15 @@ public void CreatesCollectionResponseSchema(bool enablePagination, bool enableCo Assert.Single(flightCollectionResponse.AllOf?.Where(x => x.Properties.TryGetValue("value", out var valueProp) && (valueProp.Type & JsonSchemaType.Array) is JsonSchemaType.Array && - "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight".Equals(valueProp.Items.Reference.Id))); + valueProp.Items is OpenApiSchemaReference openApiSchemaReference && + "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight".Equals(openApiSchemaReference.Reference.Id))); } else { Assert.Equal(JsonSchemaType.Array, stringCollectionResponse.Properties["value"].Type); Assert.Equal(JsonSchemaType.Array, flightCollectionResponse.Properties["value"].Type); - Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight", flightCollectionResponse.Properties["value"].Items.Reference.Id); + var itemsReference = Assert.IsType(flightCollectionResponse.Properties["value"].Items); + Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight", itemsReference.Reference.Id); } } @@ -101,7 +105,7 @@ public void CreatesRefRequestBodySchema() // Act & Assert context.AddSchemasToDocument(openApiDocument); - openApiDocument.Components.Schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out OpenApiSchema refRequestBody); + openApiDocument.Components.Schemas.TryGetValue(Constants.ReferenceCreateSchemaName, out var refRequestBody); Assert.NotNull(refRequestBody); Assert.Equal(JsonSchemaType.Object, refRequestBody.Type); @@ -133,8 +137,8 @@ public void CreatesRefOdataAnnotationResponseSchemas(bool enableOdataAnnotationR // Assert Assert.NotNull(openApiDocument.Components.Schemas); Assert.NotEmpty(openApiDocument.Components.Schemas); - openApiDocument.Components.Schemas.TryGetValue(Constants.BaseCollectionPaginationCountResponse, out OpenApiSchema refPaginationCount); - openApiDocument.Components.Schemas.TryGetValue(Constants.BaseDeltaFunctionResponse, out OpenApiSchema refDeltaFunc); + openApiDocument.Components.Schemas.TryGetValue(Constants.BaseCollectionPaginationCountResponse, out var refPaginationCount); + openApiDocument.Components.Schemas.TryGetValue(Constants.BaseDeltaFunctionResponse, out var refDeltaFunc); if (enableOdataAnnotationRef) { Assert.NotNull(refPaginationCount); @@ -516,7 +520,7 @@ public async Task CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.Null(schema.Properties); Assert.Equal(2, schema.AllOf.Count); - var baseSchema = schema.AllOf.First(); + var baseSchema = Assert.IsType(schema.AllOf.First()); Assert.NotNull(baseSchema.Reference); Assert.Equal(ReferenceType.Schema, baseSchema.Reference.Type); Assert.Equal("NS.LandPlant", baseSchema.Reference.Id); @@ -668,7 +672,7 @@ public async Task CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.Null(schema.Properties); Assert.Equal(2, schema.AllOf.Count); - var baseSchema = schema.AllOf.First(); + var baseSchema = Assert.IsType(schema.AllOf.First()); Assert.NotNull(baseSchema.Reference); Assert.Equal(ReferenceType.Schema, baseSchema.Reference.Type); Assert.Equal("NS.Animal", baseSchema.Reference.Id); @@ -743,7 +747,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() Assert.Null(schema.Properties); Assert.Equal(2, schema.AllOf.Count); - var baseSchema = schema.AllOf.First(); + var baseSchema = Assert.IsType(schema.AllOf.First()); Assert.NotNull(baseSchema.Reference); Assert.Equal(ReferenceType.Schema, baseSchema.Reference.Type); Assert.Equal("SubNS.CustomerBase", baseSchema.Reference.Id); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs index 7f093ddbd..d2d8fc307 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs @@ -8,13 +8,23 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; +using Microsoft.OpenApi.Models.References; +using System.Collections.Generic; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation.Tests { public class DollarCountGetOperationHandlerTests { - private readonly DollarCountGetOperationHandler _operationHandler = new(new()); + private readonly OpenApiDocument openApiDocument = new(); + private DollarCountGetOperationHandler _operationHandler => new(openApiDocument); + public DollarCountGetOperationHandlerTests() + { + openApiDocument.AddComponent("search", new OpenApiParameter {Name = "search", In = ParameterLocation.Query, Schema = new OpenApiSchema {Type = JsonSchemaType.String}}); + openApiDocument.AddComponent("filter", new OpenApiParameter {Name = "filter", In = ParameterLocation.Query, Schema = new OpenApiSchema {Type = JsonSchemaType.String}}); + openApiDocument.AddComponent("ConsistencyLevel", new OpenApiParameter {Name = "ConsistencyLevel", In = ParameterLocation.Query, Schema = new OpenApiSchema {Type = JsonSchemaType.String}}); + } [Theory] [InlineData(true, true)] @@ -50,8 +60,8 @@ public void CreateDollarCountGetOperationForNavigationPropertyReturnsCorrectOper Assert.NotNull(operation.Parameters); Assert.Equal(4, operation.Parameters.Count); - Assert.Equal(new[] { "UserName", "ConsistencyLevel", "search", "filter"}, - operation.Parameters.Select(x => x.Name ?? x.Reference.Id).ToList()); + Assert.Equivalent(new[] { "UserName", "ConsistencyLevel", "search", "filter"}, + operation.Parameters.Select(x => x.Name).ToList()); Assert.Null(operation.RequestBody); @@ -91,8 +101,8 @@ public void CreateDollarCountGetOperationForNavigationPropertyWithTargetPathAnno // Assert Assert.NotNull(operation.Parameters); Assert.Equal(4, operation.Parameters.Count); - Assert.Equal(new[] { "id", "ConsistencyLevel", "search", "filter" }, - operation.Parameters.Select(x => x.Name ?? x.Reference.Id).ToList()); + Assert.Equivalent(new[] { "id", "ConsistencyLevel", "search", "filter" }, + operation.Parameters.Select(x => x.Name).ToList()); Assert.Equal("Get the number of the resource", operation.Summary); @@ -130,8 +140,8 @@ public void CreateDollarCountGetOperationForNavigationSourceReturnsCorrectOperat Assert.Equal("Get the number of the resource", operation.Summary); Assert.NotNull(operation.Parameters); Assert.Equal(3, operation.Parameters.Count); - Assert.Equal(new[] { "ConsistencyLevel", "search", "filter" }, - operation.Parameters.Select(x => x.Name ?? x.Reference.Id).ToList()); + Assert.Equivalent(new[] { "ConsistencyLevel", "search", "filter" }, + operation.Parameters.Select(x => x.Name).ToList()); Assert.Null(operation.RequestBody); Assert.Equal(2, operation.Responses.Count); @@ -168,8 +178,8 @@ public void CreateDollarCountGetOperationForNavigationSourceWithTargetPathAnnota Assert.Equal("Get the number of the resource", operation.Summary); Assert.NotNull(operation.Parameters); Assert.Equal(3, operation.Parameters.Count); - Assert.Equal(new[] { "ConsistencyLevel", "search", "filter" }, - operation.Parameters.Select(x => x.Name ?? x.Reference.Id).ToList()); + Assert.Equivalent(new[] { "ConsistencyLevel", "search", "filter" }, + operation.Parameters.Select(x => x.Name).ToList()); Assert.Null(operation.RequestBody); Assert.Equal(2, operation.Responses.Count); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index f00d98c05..a7017e0dc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -11,6 +11,7 @@ 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; @@ -57,8 +58,8 @@ public void CreateOperationForEdmActionReturnsCorrectOperation() Assert.Equal(new string[] { "UserName" }, operation.Parameters.Select(p => p.Name)); Assert.NotNull(operation.RequestBody); - if (operation.RequestBody.Reference != null) - Assert.Equal("ShareTripRequestBody", operation.RequestBody.Reference.Id); + if (operation.RequestBody is OpenApiSchemaReference openApiSchemaReference) + Assert.Equal("ShareTripRequestBody", openApiSchemaReference.Reference.Id); else Assert.Equal("Action parameters", operation.RequestBody.Description); @@ -383,8 +384,8 @@ public void CreateOperationForEdmActionWithCollectionReturnTypeHasResponseWithNe // Assert if (enablePagination && enableOdataAnnotationRef) { - var reference = operation.Responses.First().Value.Content.First().Value.Schema.AllOf.First().Reference.Id; - Assert.Equal(Common.Constants.BaseCollectionPaginationCountResponse, reference); + var schemaReference = Assert.IsType(operation.Responses.First().Value.Content.First().Value.Schema.AllOf[0]); + Assert.Equal(Common.Constants.BaseCollectionPaginationCountResponse, schemaReference.Reference.Id); } else if (enablePagination) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index c0ba82a34..19c49bb33 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -11,6 +11,7 @@ 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; @@ -445,7 +446,7 @@ private void VerifyParameter(string annotation, bool hasRestriction, bool suppor Assert.Equal(8, get.Parameters.Count); if (isReference) { - Assert.Contains(queryOption, get.Parameters.Select(p => p.Reference?.Id)); + Assert.Contains(queryOption, get.Parameters.OfType().Select(p => p.Reference?.Id)); } else { @@ -457,7 +458,7 @@ private void VerifyParameter(string annotation, bool hasRestriction, bool suppor Assert.Equal(7, get.Parameters.Count); if (isReference) { - Assert.DoesNotContain(queryOption, get.Parameters.Select(p => p.Reference?.Id)); + Assert.DoesNotContain(queryOption, get.Parameters.OfType().Select(p => p.Reference?.Id)); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index 9341b1694..77f45cf7c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -5,6 +5,7 @@ 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; @@ -126,9 +127,9 @@ private void VerifyMediaEntityPutOperation(string annotation, bool enableOperati // Test only for stream properties of identifier 'content' if (useSuccessStatusCodeRange) { - var referenceId = putOperation3.Responses[statusCode]?.Content[Constants.ApplicationJsonMediaType]?.Schema?.Reference.Id; - Assert.NotNull(referenceId); - Assert.Equal("microsoft.graph.Todo", referenceId); + var schemaReference = Assert.IsType(putOperation3.Responses[statusCode]?.Content[Constants.ApplicationJsonMediaType]?.Schema); + Assert.NotNull(schemaReference.Reference.Id); + Assert.Equal("microsoft.graph.Todo", schemaReference.Reference.Id); } else { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs index 9f3c8546d..d6c617d9f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs @@ -5,6 +5,7 @@ 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; @@ -63,8 +64,9 @@ public void CreateNavigationRefPostOperationReturnsCorrectOperation(bool enableO Assert.NotEmpty(operation.Parameters); Assert.NotNull(operation.RequestBody); - Assert.Equal(Models.ReferenceType.RequestBody, operation.RequestBody.Reference.Type); - Assert.Equal(Common.Constants.ReferencePostRequestBodyName, operation.RequestBody.Reference.Id); + var requestBodyReference = Assert.IsType(operation.RequestBody); + Assert.Equal(Models.ReferenceType.RequestBody, requestBodyReference.Reference.Type); + Assert.Equal(Common.Constants.ReferencePostRequestBodyName, requestBodyReference.Reference.Id); Assert.Equal(2, operation.Responses.Count); Assert.Equal(new string[] { "204", "default" }, operation.Responses.Select(e => e.Key)); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs index 9ffa04083..e565ca0b0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs @@ -5,6 +5,7 @@ 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; @@ -62,8 +63,9 @@ public void CreateNavigationRefPutOperationReturnsCorrectOperation(bool enableOp Assert.NotNull(operation.Parameters); Assert.Single(operation.Parameters); - Assert.Equal(Models.ReferenceType.RequestBody, operation.RequestBody.Reference.Type); - Assert.Equal(Common.Constants.ReferencePutRequestBodyName, operation.RequestBody.Reference.Id); + var requestBodyReference = Assert.IsType(operation.RequestBody); + Assert.Equal(Models.ReferenceType.RequestBody, requestBodyReference.Reference.Type); + Assert.Equal(Common.Constants.ReferencePutRequestBodyName, requestBodyReference.Reference.Id); Assert.Equal(2, operation.Responses.Count); Assert.Equal(new string[] { "204", "default" }, operation.Responses.Select(e => e.Key)); From 0bd8415826e5f0b5b2a51365c1f918faeac8be67 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 09:31:05 -0500 Subject: [PATCH 091/103] chore: removes the style from integration test documents --- docs/oas3_0_0/TripService.json | 52 --- .../Resources/Basic.OpenApi.V2.yaml | 17 - .../Resources/Basic.OpenApi.V3.1.json | 22 - .../Resources/Basic.OpenApi.V3.1.yaml | 22 - .../Resources/Basic.OpenApi.json | 22 - .../Resources/Basic.OpenApi.yaml | 22 - .../Resources/Empty.OpenApi.V3.1.json | 5 - .../Resources/Empty.OpenApi.V3.1.yaml | 5 - .../Resources/Empty.OpenApi.json | 5 - .../Resources/Empty.OpenApi.yaml | 5 - .../Multiple.Schema.OpenApi.V3.1.json | 59 --- .../Multiple.Schema.OpenApi.V3.1.yaml | 59 --- .../Resources/Multiple.Schema.OpenApi.json | 59 --- .../Resources/Multiple.Schema.OpenApi.yaml | 59 --- .../Resources/TripService.OpenApi.V3.1.json | 396 ------------------ .../Resources/TripService.OpenApi.V3.1.yaml | 396 ------------------ .../Resources/TripService.OpenApi.json | 396 ------------------ .../Resources/TripService.OpenApi.yaml | 396 ------------------ 18 files changed, 1997 deletions(-) diff --git a/docs/oas3_0_0/TripService.json b/docs/oas3_0_0/TripService.json index c9f2082a3..5e9134b98 100644 --- a/docs/oas3_0_0/TripService.json +++ b/docs/oas3_0_0/TripService.json @@ -38,7 +38,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -58,7 +57,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -76,7 +74,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -172,7 +169,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -190,7 +186,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -324,7 +319,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -348,7 +342,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -368,7 +361,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -464,7 +456,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -484,7 +475,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -711,7 +701,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -741,7 +730,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -815,7 +803,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -845,7 +832,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -988,7 +974,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1026,7 +1011,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1056,7 +1040,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1127,7 +1110,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1404,7 +1386,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1436,7 +1417,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1461,7 +1441,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1530,7 +1509,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1650,7 +1628,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1688,7 +1665,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1718,7 +1694,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1817,7 +1792,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1847,7 +1821,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1979,7 +1952,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2009,7 +1981,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2196,7 +2167,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2234,7 +2204,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2264,7 +2233,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2345,7 +2313,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2688,7 +2655,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2720,7 +2686,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2745,7 +2710,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2824,7 +2788,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2956,7 +2919,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2994,7 +2956,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3024,7 +2985,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3123,7 +3083,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3153,7 +3112,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3285,7 +3243,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3315,7 +3272,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3502,7 +3458,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3540,7 +3495,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3570,7 +3524,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3651,7 +3604,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3994,7 +3946,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4026,7 +3977,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4051,7 +4001,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4130,7 +4079,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, 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 f4087138d..4b0cbd4b4 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 @@ -122,8 +122,6 @@ paths: operationId: City.City.UpdateCity consumes: - application/json - produces: - - application/json parameters: - in: path name: Name @@ -148,8 +146,6 @@ paths: - City.City summary: Delete entity from City operationId: City.City.DeleteCity - produces: - - application/json parameters: - in: path name: Name @@ -176,7 +172,6 @@ paths: operationId: City.GetCount-8728 produces: - text/plain - - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -301,8 +296,6 @@ paths: operationId: CountryOrRegion.CountryOrRegion.UpdateCountryOrRegion consumes: - application/json - produces: - - application/json parameters: - in: path name: Name @@ -327,8 +320,6 @@ paths: - CountryOrRegion.CountryOrRegion summary: Delete entity from CountryOrRegion operationId: CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion - produces: - - application/json parameters: - in: path name: Name @@ -355,7 +346,6 @@ paths: operationId: CountryOrRegion.GetCount-daf5 produces: - text/plain - - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -408,8 +398,6 @@ paths: operationId: Me.Person.UpdatePerson consumes: - application/json - produces: - - application/json parameters: - in: body name: body @@ -552,8 +540,6 @@ paths: operationId: People.Person.UpdatePerson consumes: - application/json - produces: - - application/json parameters: - in: path name: UserName @@ -578,8 +564,6 @@ paths: - People.Person summary: Delete entity from People operationId: People.Person.DeletePerson - produces: - - application/json parameters: - in: path name: UserName @@ -606,7 +590,6 @@ paths: operationId: People.GetCount-dd8d produces: - text/plain - - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json index ce14d122f..fdb7e7be6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.json @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -57,7 +56,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -74,7 +72,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -155,7 +152,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -172,7 +168,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -333,7 +328,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -351,7 +345,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -368,7 +361,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -449,7 +441,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -466,7 +457,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -612,7 +602,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -632,7 +621,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -720,7 +708,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -744,7 +731,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -764,7 +750,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -845,7 +830,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -865,7 +849,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1338,7 +1321,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -1351,7 +1333,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -1363,7 +1344,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -1373,7 +1353,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -1383,7 +1362,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml index 6cbed0ed7..c0c611654 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V3.1.yaml @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -35,7 +34,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -47,7 +45,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -101,7 +98,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -113,7 +109,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -213,7 +208,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -226,7 +220,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -238,7 +231,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -292,7 +284,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -304,7 +295,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -399,7 +389,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -414,7 +403,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -468,7 +456,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -487,7 +474,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -502,7 +488,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -556,7 +541,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -571,7 +555,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -877,7 +860,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -888,7 +870,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -898,7 +879,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -906,7 +886,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -914,7 +893,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json index 2668552e7..b7a79edc0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.json @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -57,7 +56,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -74,7 +72,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -155,7 +152,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -172,7 +168,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -333,7 +328,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -351,7 +345,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -368,7 +361,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -449,7 +441,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -466,7 +457,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -612,7 +602,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -632,7 +621,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -720,7 +708,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -744,7 +731,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -764,7 +750,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -845,7 +830,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -865,7 +849,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1330,7 +1313,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -1343,7 +1325,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -1355,7 +1336,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -1365,7 +1345,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -1375,7 +1354,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml index 20c86ff7f..7f9acd1c8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -35,7 +34,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -47,7 +45,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -101,7 +98,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -113,7 +109,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -213,7 +208,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -226,7 +220,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -238,7 +231,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -292,7 +284,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -304,7 +295,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -399,7 +389,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -414,7 +403,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -468,7 +456,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -487,7 +474,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -502,7 +488,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -556,7 +541,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -571,7 +555,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -873,7 +856,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -884,7 +866,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -894,7 +875,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -902,7 +882,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -910,7 +889,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json index 15c539844..2fd7686d9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.json @@ -148,7 +148,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -161,7 +160,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -173,7 +171,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -183,7 +180,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -193,7 +189,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml index 97a23175d..3c6fb003d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V3.1.yaml @@ -98,7 +98,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -109,7 +108,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -119,7 +117,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -127,7 +124,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -135,7 +131,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json index 776a715d5..892884da2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.json @@ -140,7 +140,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -153,7 +152,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -165,7 +163,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -175,7 +172,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -185,7 +181,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml index ba806b589..6c097575d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml @@ -94,7 +94,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -105,7 +104,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -115,7 +113,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -123,7 +120,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -131,7 +127,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json index 06b33b220..80faf4a09 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -67,7 +66,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -89,7 +87,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -173,7 +170,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -195,7 +191,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -362,7 +357,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -398,7 +392,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -425,7 +418,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -510,7 +502,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -537,7 +528,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -734,7 +724,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -784,7 +773,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -818,7 +806,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -979,7 +966,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1159,7 +1145,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1177,7 +1162,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1194,7 +1178,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1412,7 +1395,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1458,7 +1440,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1490,7 +1471,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1575,7 +1555,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1607,7 +1586,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1767,7 +1745,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1803,7 +1780,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1830,7 +1806,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1964,7 +1939,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1982,7 +1956,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1999,7 +1972,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2282,7 +2254,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2462,7 +2433,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2512,7 +2482,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2546,7 +2515,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2631,7 +2599,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2665,7 +2632,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2810,7 +2776,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2877,7 +2842,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3102,7 +3066,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3134,7 +3097,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3159,7 +3121,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3364,7 +3325,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3394,7 +3354,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3419,7 +3378,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3639,7 +3597,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3675,7 +3632,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3702,7 +3658,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3787,7 +3742,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3814,7 +3768,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4011,7 +3964,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4061,7 +4013,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4095,7 +4046,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4256,7 +4206,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4436,7 +4385,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4454,7 +4402,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4471,7 +4418,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7253,7 +7199,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -7266,7 +7211,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -7278,7 +7222,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -7288,7 +7231,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -7298,7 +7240,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml index 627c61ea0..5377c55cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -45,7 +44,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -62,7 +60,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -119,7 +116,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -136,7 +132,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -242,7 +237,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -273,7 +267,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -295,7 +288,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -353,7 +345,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -375,7 +366,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -506,7 +496,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -551,7 +540,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -580,7 +568,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -686,7 +673,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -816,7 +802,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -829,7 +814,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -841,7 +825,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -979,7 +962,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1020,7 +1002,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1047,7 +1028,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1105,7 +1085,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1132,7 +1111,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1237,7 +1215,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1268,7 +1245,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1290,7 +1266,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1380,7 +1355,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1393,7 +1367,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1405,7 +1378,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1593,7 +1565,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1715,7 +1686,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1760,7 +1730,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1789,7 +1758,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1847,7 +1815,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1876,7 +1843,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1976,7 +1942,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2038,7 +2003,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2188,7 +2152,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2215,7 +2178,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2235,7 +2197,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2368,7 +2329,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2393,7 +2353,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2413,7 +2372,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2553,7 +2511,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2584,7 +2541,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2606,7 +2562,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2664,7 +2619,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2686,7 +2640,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2817,7 +2770,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2862,7 +2814,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2891,7 +2842,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2997,7 +2947,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3127,7 +3076,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3140,7 +3088,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3152,7 +3099,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5147,7 +5093,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -5158,7 +5103,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -5168,7 +5112,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -5176,7 +5119,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -5184,7 +5126,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string 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 5561dc670..7b0a4a467 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 @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -67,7 +66,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -89,7 +87,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -173,7 +170,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -195,7 +191,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -362,7 +357,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -398,7 +392,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -425,7 +418,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -510,7 +502,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -537,7 +528,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -734,7 +724,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -784,7 +773,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -818,7 +806,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -979,7 +966,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1159,7 +1145,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1177,7 +1162,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1194,7 +1178,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1412,7 +1395,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1458,7 +1440,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1490,7 +1471,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1575,7 +1555,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1607,7 +1586,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1767,7 +1745,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1803,7 +1780,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1830,7 +1806,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1964,7 +1939,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1982,7 +1956,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1999,7 +1972,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2282,7 +2254,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2462,7 +2433,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2512,7 +2482,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2546,7 +2515,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2631,7 +2599,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2665,7 +2632,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2810,7 +2776,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2877,7 +2842,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3102,7 +3066,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3134,7 +3097,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3159,7 +3121,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3364,7 +3325,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3394,7 +3354,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3419,7 +3378,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3639,7 +3597,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3675,7 +3632,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3702,7 +3658,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3787,7 +3742,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3814,7 +3768,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4011,7 +3964,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4061,7 +4013,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4095,7 +4046,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4256,7 +4206,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4436,7 +4385,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4454,7 +4402,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4471,7 +4418,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6997,7 +6943,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -7010,7 +6955,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -7022,7 +6966,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -7032,7 +6975,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -7042,7 +6984,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" 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 4bd5dfa59..3f1326206 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 @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -45,7 +44,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -62,7 +60,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -119,7 +116,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -136,7 +132,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -242,7 +237,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -273,7 +267,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -295,7 +288,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -353,7 +345,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -375,7 +366,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -506,7 +496,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -551,7 +540,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -580,7 +568,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -686,7 +673,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -816,7 +802,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -829,7 +814,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -841,7 +825,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -979,7 +962,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1020,7 +1002,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1047,7 +1028,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1105,7 +1085,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1132,7 +1111,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1237,7 +1215,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1268,7 +1245,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1290,7 +1266,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1380,7 +1355,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1393,7 +1367,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1405,7 +1378,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1593,7 +1565,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1715,7 +1686,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1760,7 +1730,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1789,7 +1758,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1847,7 +1815,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1876,7 +1843,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1976,7 +1942,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2038,7 +2003,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2188,7 +2152,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2215,7 +2178,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2235,7 +2197,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2368,7 +2329,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2393,7 +2353,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2413,7 +2372,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2553,7 +2511,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2584,7 +2541,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2606,7 +2562,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2664,7 +2619,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2686,7 +2640,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2817,7 +2770,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2862,7 +2814,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2891,7 +2842,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2997,7 +2947,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3127,7 +3076,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3140,7 +3088,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3152,7 +3099,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5019,7 +4965,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -5030,7 +4975,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -5040,7 +4984,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -5048,7 +4991,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -5056,7 +4998,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json index ba34c5169..08687f1cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -53,7 +52,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -67,7 +65,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -145,7 +142,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -159,7 +155,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -317,7 +312,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -331,7 +325,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -345,7 +338,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -423,7 +415,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -437,7 +428,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -563,7 +553,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -577,7 +566,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -667,7 +655,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -681,7 +668,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -853,7 +839,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -867,7 +852,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -881,7 +865,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1125,7 +1108,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1139,7 +1121,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1519,7 +1500,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1533,7 +1513,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1630,7 +1609,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1644,7 +1622,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1658,7 +1635,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1882,7 +1858,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1896,7 +1871,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2092,7 +2066,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2106,7 +2079,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2120,7 +2092,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2342,7 +2313,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2356,7 +2326,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2469,7 +2438,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2483,7 +2451,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2531,7 +2498,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2545,7 +2511,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2722,7 +2687,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2736,7 +2700,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2750,7 +2713,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2866,7 +2828,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2880,7 +2841,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2894,7 +2854,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3180,7 +3139,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3194,7 +3152,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3355,7 +3312,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3369,7 +3325,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3441,7 +3396,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3455,7 +3409,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3713,7 +3666,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3852,7 +3804,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3866,7 +3817,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3880,7 +3830,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3997,7 +3946,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4011,7 +3959,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4025,7 +3972,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4112,7 +4058,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4126,7 +4071,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4239,7 +4183,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4253,7 +4196,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4315,7 +4257,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4329,7 +4270,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4343,7 +4283,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4567,7 +4506,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4581,7 +4519,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4777,7 +4714,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4791,7 +4727,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4805,7 +4740,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5027,7 +4961,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5041,7 +4974,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5154,7 +5086,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5168,7 +5099,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5345,7 +5275,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5359,7 +5288,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5373,7 +5301,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5489,7 +5416,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5503,7 +5429,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5517,7 +5442,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5803,7 +5727,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5817,7 +5740,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5978,7 +5900,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5992,7 +5913,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6250,7 +6170,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6389,7 +6308,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6403,7 +6321,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6417,7 +6334,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6504,7 +6420,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6518,7 +6433,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6646,7 +6560,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6660,7 +6573,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6674,7 +6586,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6786,7 +6697,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6800,7 +6710,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6814,7 +6723,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7100,7 +7008,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7114,7 +7021,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7432,7 +7338,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7576,7 +7481,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7590,7 +7494,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7604,7 +7507,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7714,7 +7616,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7728,7 +7629,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7914,7 +7814,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7928,7 +7827,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7942,7 +7840,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8032,7 +7929,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8046,7 +7942,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8060,7 +7955,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8242,7 +8136,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8477,7 +8370,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8491,7 +8383,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8505,7 +8396,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8576,7 +8466,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8590,7 +8479,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8652,7 +8540,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8666,7 +8553,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8680,7 +8566,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8904,7 +8789,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8918,7 +8802,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9114,7 +8997,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9128,7 +9010,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9142,7 +9023,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9364,7 +9244,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9378,7 +9257,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9491,7 +9369,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9505,7 +9382,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9667,7 +9543,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9681,7 +9556,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9695,7 +9569,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9807,7 +9680,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9821,7 +9693,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9835,7 +9706,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10121,7 +9991,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10135,7 +10004,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10453,7 +10321,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10593,7 +10460,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10607,7 +10473,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10621,7 +10486,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10737,7 +10601,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10751,7 +10614,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10765,7 +10627,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11051,7 +10912,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11065,7 +10925,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11226,7 +11085,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11240,7 +11098,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11498,7 +11355,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11637,7 +11493,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11651,7 +11506,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11665,7 +11519,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11752,7 +11605,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11766,7 +11618,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11966,7 +11817,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11980,7 +11830,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11994,7 +11843,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12104,7 +11952,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12118,7 +11965,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12304,7 +12150,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12318,7 +12163,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12332,7 +12176,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12422,7 +12265,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12436,7 +12278,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12450,7 +12291,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12632,7 +12472,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13017,7 +12856,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13031,7 +12869,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13045,7 +12882,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13155,7 +12991,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13169,7 +13004,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13355,7 +13189,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13369,7 +13202,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13383,7 +13215,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13473,7 +13304,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13487,7 +13317,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13501,7 +13330,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13683,7 +13511,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13883,7 +13710,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13897,7 +13723,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13911,7 +13736,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13989,7 +13813,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14003,7 +13826,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14144,7 +13966,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14158,7 +13979,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14172,7 +13992,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14418,7 +14237,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14432,7 +14250,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14680,7 +14497,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14694,7 +14510,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14708,7 +14523,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14994,7 +14808,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15008,7 +14821,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15155,7 +14967,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15169,7 +14980,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15227,7 +15037,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15241,7 +15050,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15462,7 +15270,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15476,7 +15283,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15490,7 +15296,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15608,7 +15413,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15622,7 +15426,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15636,7 +15439,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15940,7 +15742,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15954,7 +15755,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16124,7 +15924,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16138,7 +15937,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16213,7 +16011,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16227,7 +16024,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16500,7 +16296,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16650,7 +16445,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16664,7 +16458,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16678,7 +16471,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16801,7 +16593,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16815,7 +16606,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16829,7 +16619,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16922,7 +16711,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16936,7 +16724,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17117,7 +16904,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17131,7 +16917,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17145,7 +16930,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17510,7 +17294,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17524,7 +17307,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17538,7 +17320,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17652,7 +17433,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17666,7 +17446,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17857,7 +17636,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17871,7 +17649,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17885,7 +17662,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17974,7 +17750,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17988,7 +17763,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18002,7 +17776,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18189,7 +17962,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18431,7 +18203,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18445,7 +18216,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18459,7 +18229,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18565,7 +18334,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18579,7 +18347,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18741,7 +18508,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18755,7 +18521,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18769,7 +18534,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19057,7 +18821,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19071,7 +18834,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19323,7 +19085,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19337,7 +19098,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19351,7 +19111,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19637,7 +19396,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19651,7 +19409,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19798,7 +19555,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19812,7 +19568,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19875,7 +19630,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19889,7 +19643,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20114,7 +19867,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20128,7 +19880,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20142,7 +19893,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20283,7 +20033,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20297,7 +20046,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20311,7 +20059,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20657,7 +20404,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20671,7 +20417,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20862,7 +20607,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20876,7 +20620,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20958,7 +20701,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20972,7 +20714,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21284,7 +21025,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21465,7 +21205,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21479,7 +21218,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21493,7 +21231,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21630,7 +21367,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21644,7 +21380,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21658,7 +21393,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21766,7 +21500,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21780,7 +21513,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21941,7 +21673,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21955,7 +21686,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22027,7 +21757,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22041,7 +21770,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22055,7 +21783,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22343,7 +22070,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22357,7 +22083,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22609,7 +22334,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22623,7 +22347,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22637,7 +22360,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22923,7 +22645,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22937,7 +22658,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23084,7 +22804,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23098,7 +22817,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23319,7 +23037,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23333,7 +23050,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23347,7 +23063,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23483,7 +23198,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23497,7 +23211,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23511,7 +23224,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23857,7 +23569,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23871,7 +23582,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24062,7 +23772,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24076,7 +23785,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24384,7 +24092,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24555,7 +24262,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24569,7 +24275,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24583,7 +24288,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24690,7 +24394,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24704,7 +24407,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24866,7 +24568,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24880,7 +24581,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24894,7 +24594,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25026,7 +24725,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25040,7 +24738,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25054,7 +24751,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25400,7 +25096,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25414,7 +25109,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25802,7 +25496,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25978,7 +25671,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25992,7 +25684,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26006,7 +25697,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26138,7 +25828,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26152,7 +25841,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26368,7 +26056,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26382,7 +26069,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26396,7 +26082,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26496,7 +26181,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26510,7 +26194,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26524,7 +26207,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26736,7 +26418,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27023,7 +26704,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27037,7 +26717,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27051,7 +26730,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27158,7 +26836,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27172,7 +26849,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27244,7 +26920,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27258,7 +26933,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27272,7 +26946,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27560,7 +27233,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27574,7 +27246,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27826,7 +27497,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27840,7 +27510,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27854,7 +27523,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28140,7 +27808,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28154,7 +27821,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28301,7 +27967,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28315,7 +27980,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28521,7 +28185,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28535,7 +28198,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28549,7 +28211,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28681,7 +28342,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28695,7 +28355,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28709,7 +28368,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29055,7 +28713,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29069,7 +28726,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29457,7 +29113,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29629,7 +29284,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29643,7 +29297,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29657,7 +29310,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29793,7 +29445,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29807,7 +29458,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29821,7 +29471,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30167,7 +29816,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30181,7 +29829,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30372,7 +30019,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30386,7 +30032,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30694,7 +30339,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30865,7 +30509,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30879,7 +30522,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30893,7 +30535,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31000,7 +30641,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31014,7 +30654,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31260,7 +30899,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31274,7 +30912,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31288,7 +30925,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31420,7 +31056,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31434,7 +31069,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31650,7 +31284,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31664,7 +31297,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31678,7 +31310,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31778,7 +31409,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31792,7 +31422,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31806,7 +31435,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32018,7 +31646,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32514,7 +32141,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32528,7 +32154,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32542,7 +32167,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32674,7 +32298,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32688,7 +32311,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32904,7 +32526,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32918,7 +32539,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32932,7 +32552,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33032,7 +32651,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33046,7 +32664,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33060,7 +32677,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33272,7 +32888,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33563,7 +33178,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33577,7 +33191,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33591,7 +33204,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33708,7 +33320,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33722,7 +33333,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33736,7 +33346,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -35158,7 +34767,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -35171,7 +34779,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -35183,7 +34790,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -35193,7 +34799,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -35203,7 +34808,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml index 185ff5d35..fa86360ac 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -32,7 +31,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -42,7 +40,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -94,7 +91,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -104,7 +100,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -202,7 +197,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -212,7 +206,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -222,7 +215,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -274,7 +266,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -284,7 +275,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -368,7 +358,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -378,7 +367,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -438,7 +426,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -448,7 +435,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -558,7 +544,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -568,7 +553,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -578,7 +562,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -735,7 +718,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -745,7 +727,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -981,7 +962,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -991,7 +971,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1053,7 +1032,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1063,7 +1041,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1073,7 +1050,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1224,7 +1200,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1234,7 +1209,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1367,7 +1341,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1377,7 +1350,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1387,7 +1359,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1536,7 +1507,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1546,7 +1516,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1624,7 +1593,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1634,7 +1602,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1667,7 +1634,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1677,7 +1643,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1794,7 +1759,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1804,7 +1768,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1814,7 +1777,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1890,7 +1852,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1900,7 +1861,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1910,7 +1870,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2103,7 +2062,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2113,7 +2071,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2223,7 +2180,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2233,7 +2189,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2282,7 +2237,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2292,7 +2246,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2462,7 +2415,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2554,7 +2506,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2564,7 +2515,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2574,7 +2524,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2647,7 +2596,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2657,7 +2605,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2667,7 +2614,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2725,7 +2671,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2735,7 +2680,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2813,7 +2757,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2823,7 +2766,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2860,7 +2802,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2870,7 +2811,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2880,7 +2820,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3031,7 +2970,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3041,7 +2979,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3174,7 +3111,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3184,7 +3120,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3194,7 +3129,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3343,7 +3277,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3353,7 +3286,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3431,7 +3363,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3441,7 +3372,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3558,7 +3488,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3568,7 +3497,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3578,7 +3506,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3654,7 +3581,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3664,7 +3590,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3674,7 +3599,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3867,7 +3791,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3877,7 +3800,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3987,7 +3909,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3997,7 +3918,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4167,7 +4087,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4259,7 +4178,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4269,7 +4187,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4279,7 +4196,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4337,7 +4253,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4347,7 +4262,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4430,7 +4344,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4440,7 +4353,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4450,7 +4362,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4523,7 +4434,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4533,7 +4443,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4543,7 +4452,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4736,7 +4644,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4746,7 +4653,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4958,7 +4864,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5054,7 +4959,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5064,7 +4968,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5074,7 +4977,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5153,7 +5055,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5163,7 +5064,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5291,7 +5191,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5301,7 +5200,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5311,7 +5209,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5369,7 +5266,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5379,7 +5275,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5389,7 +5284,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5513,7 +5407,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5672,7 +5565,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5682,7 +5574,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5692,7 +5583,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5743,7 +5633,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5753,7 +5642,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5790,7 +5678,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5800,7 +5687,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5810,7 +5696,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5961,7 +5846,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5971,7 +5855,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6104,7 +5987,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6114,7 +5996,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6124,7 +6005,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6273,7 +6153,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6283,7 +6162,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6361,7 +6239,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6371,7 +6248,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6478,7 +6354,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6488,7 +6363,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6498,7 +6372,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6571,7 +6444,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6581,7 +6453,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6591,7 +6462,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6784,7 +6654,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6794,7 +6663,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7006,7 +6874,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7099,7 +6966,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7109,7 +6975,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7119,7 +6984,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7195,7 +7059,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7205,7 +7068,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7215,7 +7077,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7408,7 +7269,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7418,7 +7278,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7528,7 +7387,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7538,7 +7396,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7708,7 +7565,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7800,7 +7656,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7810,7 +7665,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7820,7 +7674,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7878,7 +7731,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7888,7 +7740,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8018,7 +7869,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8028,7 +7878,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8038,7 +7887,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8117,7 +7965,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8127,7 +7974,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8255,7 +8101,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8265,7 +8110,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8275,7 +8119,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8333,7 +8176,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8343,7 +8185,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8353,7 +8194,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8477,7 +8317,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8741,7 +8580,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8751,7 +8589,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8761,7 +8598,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8840,7 +8676,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8850,7 +8685,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8978,7 +8812,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8988,7 +8821,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8998,7 +8830,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9056,7 +8887,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9066,7 +8896,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9076,7 +8905,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9200,7 +9028,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9334,7 +9161,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9344,7 +9170,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9354,7 +9179,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9406,7 +9230,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9416,7 +9239,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9505,7 +9327,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9515,7 +9336,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9525,7 +9345,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9684,7 +9503,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9694,7 +9512,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9862,7 +9679,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9872,7 +9688,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9882,7 +9697,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10075,7 +9889,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10085,7 +9898,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10186,7 +9998,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10196,7 +10007,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10236,7 +10046,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10246,7 +10055,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10393,7 +10201,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -10403,7 +10210,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10413,7 +10219,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10488,7 +10293,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -10498,7 +10302,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10508,7 +10311,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10707,7 +10509,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10717,7 +10518,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10830,7 +10630,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10840,7 +10639,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10890,7 +10688,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10900,7 +10697,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11075,7 +10871,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11171,7 +10966,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11181,7 +10975,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11191,7 +10984,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11266,7 +11058,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11276,7 +11067,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11286,7 +11076,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11346,7 +11135,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11356,7 +11144,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11471,7 +11258,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11481,7 +11267,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11491,7 +11276,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11730,7 +11514,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11740,7 +11523,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11750,7 +11532,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11829,7 +11610,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11839,7 +11619,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11967,7 +11746,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11977,7 +11755,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11987,7 +11764,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12043,7 +11819,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12053,7 +11828,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12063,7 +11837,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12187,7 +11960,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12342,7 +12114,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12352,7 +12123,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12362,7 +12132,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12435,7 +12204,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12445,7 +12213,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12552,7 +12319,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12562,7 +12328,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12572,7 +12337,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12767,7 +12531,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12777,7 +12540,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12948,7 +12710,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12958,7 +12719,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12968,7 +12728,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13161,7 +12920,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13171,7 +12929,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13272,7 +13029,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13282,7 +13038,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13326,7 +13081,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13336,7 +13090,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13486,7 +13239,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -13496,7 +13248,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13506,7 +13257,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13600,7 +13350,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -13610,7 +13359,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13620,7 +13368,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13855,7 +13602,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13865,7 +13611,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13996,7 +13741,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14006,7 +13750,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14062,7 +13805,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14072,7 +13814,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14280,7 +14021,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14402,7 +14142,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14412,7 +14151,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14422,7 +14160,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14509,7 +14246,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14519,7 +14255,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14529,7 +14264,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14602,7 +14336,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14612,7 +14345,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14722,7 +14454,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14732,7 +14463,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14776,7 +14506,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14786,7 +14515,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14796,7 +14524,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14991,7 +14718,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15001,7 +14727,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15172,7 +14897,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15182,7 +14906,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15192,7 +14915,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15385,7 +15107,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15395,7 +15116,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15496,7 +15216,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15506,7 +15225,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15653,7 +15371,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15663,7 +15380,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15673,7 +15389,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15763,7 +15478,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15773,7 +15487,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15783,7 +15496,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16018,7 +15730,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16028,7 +15739,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16159,7 +15869,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16169,7 +15878,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16374,7 +16082,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16488,7 +16195,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16498,7 +16204,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16508,7 +16213,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16580,7 +16284,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16590,7 +16293,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16696,7 +16398,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16706,7 +16407,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16716,7 +16416,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16803,7 +16502,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16813,7 +16511,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16823,7 +16520,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17058,7 +16754,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17068,7 +16763,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17329,7 +17023,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17447,7 +17140,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17457,7 +17149,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17467,7 +17158,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17561,7 +17251,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17571,7 +17260,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17720,7 +17408,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17730,7 +17417,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17740,7 +17426,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17805,7 +17490,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17815,7 +17499,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17825,7 +17508,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17970,7 +17652,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18165,7 +17846,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18175,7 +17855,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18185,7 +17864,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18260,7 +17938,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18270,7 +17947,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18314,7 +17990,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18324,7 +17999,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18334,7 +18008,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18529,7 +18202,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18539,7 +18211,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18710,7 +18381,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18720,7 +18390,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18730,7 +18399,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18923,7 +18591,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18933,7 +18600,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19034,7 +18700,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19044,7 +18709,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19181,7 +18845,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19191,7 +18854,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19201,7 +18863,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19288,7 +18949,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19298,7 +18958,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19308,7 +18967,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19543,7 +19201,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19553,7 +19210,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19814,7 +19470,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19929,7 +19584,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19939,7 +19593,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19949,7 +19602,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20039,7 +19691,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20049,7 +19700,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20059,7 +19709,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20294,7 +19943,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20304,7 +19952,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20435,7 +20082,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20445,7 +20091,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20650,7 +20295,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20764,7 +20408,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20774,7 +20417,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20784,7 +20426,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20856,7 +20497,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20866,7 +20506,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21027,7 +20666,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21037,7 +20675,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21047,7 +20684,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21141,7 +20777,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21151,7 +20786,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21300,7 +20934,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21310,7 +20943,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21320,7 +20952,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21385,7 +21016,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21395,7 +21025,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21405,7 +21034,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21550,7 +21178,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21892,7 +21519,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21902,7 +21528,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21912,7 +21537,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22006,7 +21630,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22016,7 +21639,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22165,7 +21787,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22175,7 +21796,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22185,7 +21805,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22250,7 +21869,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22260,7 +21878,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22270,7 +21887,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22415,7 +22031,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22609,7 +22224,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22619,7 +22233,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22629,7 +22242,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22702,7 +22314,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22712,7 +22323,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22722,7 +22332,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -23606,7 +23215,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -23617,7 +23225,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -23627,7 +23234,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -23635,7 +23241,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -23643,7 +23248,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string 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 95c69c4c3..af20a5b5e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -39,7 +39,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -53,7 +52,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -67,7 +65,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -145,7 +142,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -159,7 +155,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -317,7 +312,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -331,7 +325,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -345,7 +338,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -423,7 +415,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -437,7 +428,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -563,7 +553,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -577,7 +566,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -667,7 +655,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -681,7 +668,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -853,7 +839,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -867,7 +852,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -881,7 +865,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1125,7 +1108,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1139,7 +1121,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1507,7 +1488,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1521,7 +1501,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1618,7 +1597,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1632,7 +1610,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1646,7 +1623,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1870,7 +1846,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -1884,7 +1859,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2080,7 +2054,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2094,7 +2067,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2108,7 +2080,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2330,7 +2301,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2344,7 +2314,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2457,7 +2426,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2471,7 +2439,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2519,7 +2486,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2533,7 +2499,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2710,7 +2675,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2724,7 +2688,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2738,7 +2701,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2854,7 +2816,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2868,7 +2829,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -2882,7 +2842,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3168,7 +3127,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3182,7 +3140,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3343,7 +3300,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3357,7 +3313,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3429,7 +3384,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3443,7 +3397,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3701,7 +3654,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3840,7 +3792,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3854,7 +3805,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3868,7 +3818,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3985,7 +3934,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -3999,7 +3947,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4013,7 +3960,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4100,7 +4046,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4114,7 +4059,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4227,7 +4171,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4241,7 +4184,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4303,7 +4245,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4317,7 +4258,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4331,7 +4271,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4555,7 +4494,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4569,7 +4507,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4765,7 +4702,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4779,7 +4715,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -4793,7 +4728,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5015,7 +4949,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5029,7 +4962,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5142,7 +5074,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5156,7 +5087,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5333,7 +5263,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5347,7 +5276,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5361,7 +5289,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5477,7 +5404,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5491,7 +5417,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5505,7 +5430,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5791,7 +5715,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5805,7 +5728,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5966,7 +5888,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -5980,7 +5901,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6238,7 +6158,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6377,7 +6296,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6391,7 +6309,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6405,7 +6322,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6492,7 +6408,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6506,7 +6421,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6634,7 +6548,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6648,7 +6561,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6662,7 +6574,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6774,7 +6685,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6788,7 +6698,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -6802,7 +6711,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7088,7 +6996,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7102,7 +7009,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7420,7 +7326,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7564,7 +7469,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7578,7 +7482,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7592,7 +7495,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7702,7 +7604,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7716,7 +7617,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7902,7 +7802,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7916,7 +7815,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -7930,7 +7828,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8020,7 +7917,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8034,7 +7930,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8048,7 +7943,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8230,7 +8124,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8465,7 +8358,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8479,7 +8371,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8493,7 +8384,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8564,7 +8454,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8578,7 +8467,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8640,7 +8528,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8654,7 +8541,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8668,7 +8554,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8892,7 +8777,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -8906,7 +8790,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9102,7 +8985,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9116,7 +8998,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9130,7 +9011,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9352,7 +9232,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9366,7 +9245,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9479,7 +9357,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9493,7 +9370,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9655,7 +9531,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9669,7 +9544,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9683,7 +9557,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9795,7 +9668,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9809,7 +9681,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -9823,7 +9694,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10109,7 +9979,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10123,7 +9992,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10441,7 +10309,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10581,7 +10448,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10595,7 +10461,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10609,7 +10474,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10725,7 +10589,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10739,7 +10602,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -10753,7 +10615,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11039,7 +10900,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11053,7 +10913,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11214,7 +11073,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11228,7 +11086,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11486,7 +11343,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11625,7 +11481,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11639,7 +11494,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11653,7 +11507,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11740,7 +11593,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11754,7 +11606,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11952,7 +11803,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11966,7 +11816,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -11980,7 +11829,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12090,7 +11938,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12104,7 +11951,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12290,7 +12136,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12304,7 +12149,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12318,7 +12162,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12408,7 +12251,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12422,7 +12264,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12436,7 +12277,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -12618,7 +12458,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13003,7 +12842,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13017,7 +12855,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13031,7 +12868,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13141,7 +12977,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13155,7 +12990,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13341,7 +13175,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13355,7 +13188,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13369,7 +13201,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13459,7 +13290,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13473,7 +13303,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13487,7 +13316,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13669,7 +13497,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13869,7 +13696,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13883,7 +13709,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13897,7 +13722,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13975,7 +13799,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -13989,7 +13812,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14130,7 +13952,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14144,7 +13965,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14158,7 +13978,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14404,7 +14223,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14418,7 +14236,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14666,7 +14483,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14680,7 +14496,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14694,7 +14509,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14980,7 +14794,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -14994,7 +14807,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15141,7 +14953,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15155,7 +14966,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15213,7 +15023,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15227,7 +15036,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15448,7 +15256,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15462,7 +15269,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15476,7 +15282,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15594,7 +15399,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15608,7 +15412,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15622,7 +15425,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15926,7 +15728,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -15940,7 +15741,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16110,7 +15910,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16124,7 +15923,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16199,7 +15997,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16213,7 +16010,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16486,7 +16282,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16636,7 +16431,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16650,7 +16444,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16664,7 +16457,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16787,7 +16579,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16801,7 +16592,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16815,7 +16605,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16908,7 +16697,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -16922,7 +16710,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17103,7 +16890,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17117,7 +16903,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17131,7 +16916,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17494,7 +17278,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17508,7 +17291,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17522,7 +17304,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17636,7 +17417,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17650,7 +17430,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17841,7 +17620,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17855,7 +17633,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17869,7 +17646,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17958,7 +17734,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17972,7 +17747,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -17986,7 +17760,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18173,7 +17946,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18415,7 +18187,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18429,7 +18200,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18443,7 +18213,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18549,7 +18318,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18563,7 +18331,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18725,7 +18492,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18739,7 +18505,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -18753,7 +18518,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19041,7 +18805,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19055,7 +18818,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19307,7 +19069,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19321,7 +19082,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19335,7 +19095,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19621,7 +19380,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19635,7 +19393,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19782,7 +19539,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19796,7 +19552,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19859,7 +19614,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -19873,7 +19627,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20098,7 +19851,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20112,7 +19864,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20126,7 +19877,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20267,7 +20017,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20281,7 +20030,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20295,7 +20043,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20641,7 +20388,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20655,7 +20401,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20846,7 +20591,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20860,7 +20604,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20942,7 +20685,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -20956,7 +20698,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21268,7 +21009,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21449,7 +21189,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21463,7 +21202,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21477,7 +21215,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21614,7 +21351,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21628,7 +21364,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21642,7 +21377,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21750,7 +21484,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21764,7 +21497,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21925,7 +21657,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -21939,7 +21670,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22011,7 +21741,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22025,7 +21754,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22039,7 +21767,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22327,7 +22054,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22341,7 +22067,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22593,7 +22318,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22607,7 +22331,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22621,7 +22344,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22907,7 +22629,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -22921,7 +22642,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23068,7 +22788,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23082,7 +22801,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23303,7 +23021,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23317,7 +23034,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23331,7 +23047,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23467,7 +23182,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23481,7 +23195,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23495,7 +23208,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23841,7 +23553,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -23855,7 +23566,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24046,7 +23756,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24060,7 +23769,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24368,7 +24076,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24539,7 +24246,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24553,7 +24259,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24567,7 +24272,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24674,7 +24378,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24688,7 +24391,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24850,7 +24552,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24864,7 +24565,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -24878,7 +24578,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25010,7 +24709,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25024,7 +24722,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25038,7 +24735,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25384,7 +25080,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25398,7 +25093,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25786,7 +25480,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25962,7 +25655,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25976,7 +25668,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -25990,7 +25681,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26122,7 +25812,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26136,7 +25825,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26352,7 +26040,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26366,7 +26053,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26380,7 +26066,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26480,7 +26165,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26494,7 +26178,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26508,7 +26191,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -26720,7 +26402,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27007,7 +26688,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27021,7 +26701,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27035,7 +26714,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27142,7 +26820,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27156,7 +26833,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27228,7 +26904,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27242,7 +26917,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27256,7 +26930,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27544,7 +27217,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27558,7 +27230,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27810,7 +27481,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27824,7 +27494,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -27838,7 +27507,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28124,7 +27792,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28138,7 +27805,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28285,7 +27951,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28299,7 +27964,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28505,7 +28169,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28519,7 +28182,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28533,7 +28195,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28665,7 +28326,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28679,7 +28339,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -28693,7 +28352,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29039,7 +28697,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29053,7 +28710,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29441,7 +29097,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29613,7 +29268,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29627,7 +29281,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29641,7 +29294,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29777,7 +29429,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29791,7 +29442,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -29805,7 +29455,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30151,7 +29800,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30165,7 +29813,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30356,7 +30003,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30370,7 +30016,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30678,7 +30323,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30849,7 +30493,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30863,7 +30506,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30877,7 +30519,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30984,7 +30625,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -30998,7 +30638,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31242,7 +30881,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31256,7 +30894,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31270,7 +30907,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31402,7 +31038,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31416,7 +31051,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31632,7 +31266,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31646,7 +31279,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31660,7 +31292,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31760,7 +31391,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31774,7 +31404,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -31788,7 +31417,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32000,7 +31628,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32496,7 +32123,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32510,7 +32136,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32524,7 +32149,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32656,7 +32280,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32670,7 +32293,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32886,7 +32508,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32900,7 +32521,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -32914,7 +32534,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33014,7 +32633,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33028,7 +32646,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33042,7 +32659,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33254,7 +32870,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33545,7 +33160,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33559,7 +33173,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33573,7 +33186,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33690,7 +33302,6 @@ "name": "$orderby", "in": "query", "description": "Order items by property values", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33704,7 +33315,6 @@ "name": "$select", "in": "query", "description": "Select properties to be returned", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -33718,7 +33328,6 @@ "name": "$expand", "in": "query", "description": "Expand related entities", - "style": "form", "explode": false, "schema": { "uniqueItems": true, @@ -35052,7 +34661,6 @@ "name": "$top", "in": "query", "description": "Show only the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -35065,7 +34673,6 @@ "name": "$skip", "in": "query", "description": "Skip the first n items", - "style": "form", "explode": false, "schema": { "minimum": 0, @@ -35077,7 +34684,6 @@ "name": "$count", "in": "query", "description": "Include count of items", - "style": "form", "explode": false, "schema": { "type": "boolean" @@ -35087,7 +34693,6 @@ "name": "$filter", "in": "query", "description": "Filter items by property values", - "style": "form", "explode": false, "schema": { "type": "string" @@ -35097,7 +34702,6 @@ "name": "$search", "in": "query", "description": "Search items by search phrases", - "style": "form", "explode": false, "schema": { "type": "string" 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 f60265a75..c9905a87c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -22,7 +22,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -32,7 +31,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -42,7 +40,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -94,7 +91,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -104,7 +100,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -202,7 +197,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -212,7 +206,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -222,7 +215,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -274,7 +266,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -284,7 +275,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -368,7 +358,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -378,7 +367,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -438,7 +426,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -448,7 +435,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -558,7 +544,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -568,7 +553,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -578,7 +562,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -735,7 +718,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -745,7 +727,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -975,7 +956,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -985,7 +965,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1047,7 +1026,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1057,7 +1035,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1067,7 +1044,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1218,7 +1194,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1228,7 +1203,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1361,7 +1335,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1371,7 +1344,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1381,7 +1353,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1530,7 +1501,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1540,7 +1510,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1618,7 +1587,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1628,7 +1596,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1661,7 +1628,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1671,7 +1637,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1788,7 +1753,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1798,7 +1762,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1808,7 +1771,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -1884,7 +1846,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -1894,7 +1855,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -1904,7 +1864,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2097,7 +2056,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2107,7 +2065,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2217,7 +2174,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2227,7 +2183,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2276,7 +2231,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2286,7 +2240,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2456,7 +2409,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2548,7 +2500,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2558,7 +2509,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2568,7 +2518,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2641,7 +2590,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2651,7 +2599,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2661,7 +2608,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2719,7 +2665,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2729,7 +2674,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2807,7 +2751,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2817,7 +2760,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -2854,7 +2796,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -2864,7 +2805,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -2874,7 +2814,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3025,7 +2964,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3035,7 +2973,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3168,7 +3105,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3178,7 +3114,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3188,7 +3123,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3337,7 +3271,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3347,7 +3280,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3425,7 +3357,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3435,7 +3366,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3552,7 +3482,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3562,7 +3491,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3572,7 +3500,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3648,7 +3575,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -3658,7 +3584,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3668,7 +3593,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3861,7 +3785,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3871,7 +3794,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -3981,7 +3903,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -3991,7 +3912,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4161,7 +4081,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4253,7 +4172,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4263,7 +4181,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4273,7 +4190,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4331,7 +4247,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4341,7 +4256,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4424,7 +4338,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4434,7 +4347,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4444,7 +4356,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4517,7 +4428,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -4527,7 +4437,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4537,7 +4446,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4730,7 +4638,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -4740,7 +4647,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -4952,7 +4858,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5048,7 +4953,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5058,7 +4962,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5068,7 +4971,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5147,7 +5049,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5157,7 +5058,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5285,7 +5185,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5295,7 +5194,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5305,7 +5203,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5363,7 +5260,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5373,7 +5269,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5383,7 +5278,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5507,7 +5401,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5666,7 +5559,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5676,7 +5568,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5686,7 +5577,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5737,7 +5627,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5747,7 +5636,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5784,7 +5672,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -5794,7 +5681,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5804,7 +5690,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -5955,7 +5840,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -5965,7 +5849,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6098,7 +5981,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6108,7 +5990,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6118,7 +5999,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6267,7 +6147,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6277,7 +6156,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6355,7 +6233,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6365,7 +6242,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6472,7 +6348,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6482,7 +6357,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6492,7 +6366,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6565,7 +6438,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -6575,7 +6447,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6585,7 +6456,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -6778,7 +6648,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -6788,7 +6657,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7000,7 +6868,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7093,7 +6960,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7103,7 +6969,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7113,7 +6978,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7189,7 +7053,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7199,7 +7062,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7209,7 +7071,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7402,7 +7263,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7412,7 +7272,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7522,7 +7381,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7532,7 +7390,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7702,7 +7559,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7794,7 +7650,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -7804,7 +7659,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7814,7 +7668,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -7872,7 +7725,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -7882,7 +7734,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8011,7 +7862,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8021,7 +7871,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8031,7 +7880,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8110,7 +7958,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8120,7 +7967,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8248,7 +8094,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8258,7 +8103,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8268,7 +8112,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8326,7 +8169,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8336,7 +8178,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8346,7 +8187,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8470,7 +8310,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8734,7 +8573,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8744,7 +8582,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8754,7 +8591,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8833,7 +8669,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8843,7 +8678,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -8971,7 +8805,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -8981,7 +8814,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -8991,7 +8823,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9049,7 +8880,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9059,7 +8889,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9069,7 +8898,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9193,7 +9021,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9327,7 +9154,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9337,7 +9163,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9347,7 +9172,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9399,7 +9223,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9409,7 +9232,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9498,7 +9320,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9508,7 +9329,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9518,7 +9338,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9677,7 +9496,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9687,7 +9505,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -9855,7 +9672,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -9865,7 +9681,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -9875,7 +9690,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10068,7 +9882,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10078,7 +9891,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10179,7 +9991,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10189,7 +10000,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10229,7 +10039,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10239,7 +10048,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10386,7 +10194,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -10396,7 +10203,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10406,7 +10212,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10481,7 +10286,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -10491,7 +10295,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10501,7 +10304,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10700,7 +10502,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10710,7 +10511,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10823,7 +10623,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10833,7 +10632,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -10883,7 +10681,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -10893,7 +10690,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11068,7 +10864,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11164,7 +10959,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11174,7 +10968,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11184,7 +10977,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11259,7 +11051,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11269,7 +11060,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11279,7 +11069,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11339,7 +11128,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11349,7 +11137,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11464,7 +11251,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11474,7 +11260,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11484,7 +11269,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11722,7 +11506,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11732,7 +11515,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11742,7 +11524,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11821,7 +11602,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11831,7 +11611,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -11959,7 +11738,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -11969,7 +11747,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -11979,7 +11756,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12035,7 +11811,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12045,7 +11820,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12055,7 +11829,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12179,7 +11952,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12334,7 +12106,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12344,7 +12115,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12354,7 +12124,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12427,7 +12196,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12437,7 +12205,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12544,7 +12311,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12554,7 +12320,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12564,7 +12329,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12759,7 +12523,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12769,7 +12532,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -12940,7 +12702,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -12950,7 +12711,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -12960,7 +12720,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13153,7 +12912,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13163,7 +12921,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13264,7 +13021,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13274,7 +13030,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13318,7 +13073,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13328,7 +13082,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13478,7 +13231,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -13488,7 +13240,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13498,7 +13249,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13592,7 +13342,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -13602,7 +13351,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13612,7 +13360,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13847,7 +13594,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13857,7 +13603,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -13988,7 +13733,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -13998,7 +13742,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14054,7 +13797,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14064,7 +13806,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14272,7 +14013,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14394,7 +14134,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14404,7 +14143,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14414,7 +14152,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14501,7 +14238,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14511,7 +14247,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14521,7 +14256,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14594,7 +14328,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14604,7 +14337,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14714,7 +14446,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14724,7 +14455,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14768,7 +14498,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -14778,7 +14507,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14788,7 +14516,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -14983,7 +14710,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -14993,7 +14719,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15164,7 +14889,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15174,7 +14898,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15184,7 +14907,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15377,7 +15099,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15387,7 +15108,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15488,7 +15208,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15498,7 +15217,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15645,7 +15363,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15655,7 +15372,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15665,7 +15381,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -15755,7 +15470,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -15765,7 +15479,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -15775,7 +15488,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16010,7 +15722,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16020,7 +15731,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16151,7 +15861,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16161,7 +15870,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16366,7 +16074,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16480,7 +16187,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16490,7 +16196,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16500,7 +16205,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16572,7 +16276,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16582,7 +16285,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16688,7 +16390,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16698,7 +16399,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16708,7 +16408,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -16795,7 +16494,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -16805,7 +16503,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -16815,7 +16512,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17050,7 +16746,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17060,7 +16755,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17321,7 +17015,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17439,7 +17132,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17449,7 +17141,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17459,7 +17150,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17553,7 +17243,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17563,7 +17252,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17712,7 +17400,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17722,7 +17409,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17732,7 +17418,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17797,7 +17482,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -17807,7 +17491,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -17817,7 +17500,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -17962,7 +17644,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18157,7 +17838,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18167,7 +17847,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18177,7 +17856,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18252,7 +17930,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18262,7 +17939,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18306,7 +17982,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18316,7 +17991,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18326,7 +18000,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18521,7 +18194,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18531,7 +18203,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18702,7 +18373,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -18712,7 +18382,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18722,7 +18391,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -18915,7 +18583,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -18925,7 +18592,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19026,7 +18692,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19036,7 +18701,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19173,7 +18837,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19183,7 +18846,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19193,7 +18855,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19280,7 +18941,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19290,7 +18950,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19300,7 +18959,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19535,7 +19193,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19545,7 +19202,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -19806,7 +19462,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19921,7 +19576,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -19931,7 +19585,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -19941,7 +19594,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20031,7 +19683,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20041,7 +19692,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20051,7 +19701,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20286,7 +19935,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20296,7 +19944,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20427,7 +20074,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20437,7 +20083,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20642,7 +20287,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20756,7 +20400,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -20766,7 +20409,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20776,7 +20418,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -20848,7 +20489,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -20858,7 +20498,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21018,7 +20657,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21028,7 +20666,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21038,7 +20675,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21132,7 +20768,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21142,7 +20777,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21291,7 +20925,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21301,7 +20934,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21311,7 +20943,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21376,7 +21007,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21386,7 +21016,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21396,7 +21025,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21541,7 +21169,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21883,7 +21510,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -21893,7 +21519,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -21903,7 +21528,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -21997,7 +21621,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22007,7 +21630,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22156,7 +21778,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22166,7 +21787,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22176,7 +21796,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22241,7 +21860,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22251,7 +21869,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22261,7 +21878,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22406,7 +22022,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22600,7 +22215,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22610,7 +22224,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22620,7 +22233,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -22693,7 +22305,6 @@ paths: - name: $orderby in: query description: Order items by property values - style: form explode: false schema: uniqueItems: true @@ -22703,7 +22314,6 @@ paths: - name: $select in: query description: Select properties to be returned - style: form explode: false schema: uniqueItems: true @@ -22713,7 +22323,6 @@ paths: - name: $expand in: query description: Expand related entities - style: form explode: false schema: uniqueItems: true @@ -23553,7 +23162,6 @@ components: name: $top in: query description: Show only the first n items - style: form explode: false schema: minimum: 0 @@ -23564,7 +23172,6 @@ components: name: $skip in: query description: Skip the first n items - style: form explode: false schema: minimum: 0 @@ -23574,7 +23181,6 @@ components: name: $count in: query description: Include count of items - style: form explode: false schema: type: boolean @@ -23582,7 +23188,6 @@ components: name: $filter in: query description: Filter items by property values - style: form explode: false schema: type: string @@ -23590,7 +23195,6 @@ components: name: $search in: query description: Search items by search phrases - style: form explode: false schema: type: string From 2652d3788ca5a0eb35116403f2aa5363aae176d9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 12:42:22 -0500 Subject: [PATCH 092/103] fix: odata query parameter references Signed-off-by: Vincent Biret --- .../Operation/EdmOperationOperationHandler.cs | 16 ++++++++-------- .../EdmModelOpenApiExtensionsTest.cs | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index b1e2fe8ff..cc2148507 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -249,31 +249,31 @@ private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation op if (function.ReturnType.IsCollection()) { // $top - if (Context.CreateTop(function, _document) is OpenApiParameter topParameter) + if (Context.CreateTop(function, _document) is {} topParameter) { operation.Parameters.AppendParameter(topParameter); } // $skip - if (Context.CreateSkip(function, _document) is OpenApiParameter skipParameter) + if (Context.CreateSkip(function, _document) is {} skipParameter) { operation.Parameters.AppendParameter(skipParameter); } // $search - if (Context.CreateSearch(function, _document) is OpenApiParameter searchParameter) + if (Context.CreateSearch(function, _document) is {} searchParameter) { operation.Parameters.AppendParameter(searchParameter); } // $filter - if (Context.CreateFilter(function, _document) is OpenApiParameter filterParameter) + if (Context.CreateFilter(function, _document) is {} filterParameter) { operation.Parameters.AppendParameter(filterParameter); } // $count - if (Context.CreateCount(function, _document) is OpenApiParameter countParameter) + if (Context.CreateCount(function, _document) is {} countParameter) { operation.Parameters.AppendParameter(countParameter); } @@ -281,19 +281,19 @@ private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation op if (function.ReturnType?.Definition?.AsElementType() is IEdmEntityType entityType) { // $select - if (Context.CreateSelect(function, entityType) is OpenApiParameter selectParameter) + if (Context.CreateSelect(function, entityType) is {} selectParameter) { operation.Parameters.AppendParameter(selectParameter); } // $orderby - if (Context.CreateOrderBy(function, entityType) is OpenApiParameter orderbyParameter) + if (Context.CreateOrderBy(function, entityType) is {} orderbyParameter) { operation.Parameters.AppendParameter(orderbyParameter); } // $expand - if (Context.CreateExpand(function, entityType) is OpenApiParameter expandParameter) + if (Context.CreateExpand(function, entityType) is {} expandParameter) { operation.Parameters.AppendParameter(expandParameter); } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs index ffdcd951e..9d22a50cd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/EdmModelOpenApiExtensionsTest.cs @@ -143,14 +143,15 @@ public async Task TripServiceMetadataToOpenApiWorks(OpenApiSpecVersion specVersi private void AssertDocumentsAreEqual(string result, string fileName, OpenApiFormat format) { _output.WriteLine(result); + var expected = Resources.GetString(fileName); if (format is OpenApiFormat.Json) { var parsedJson = JsonNode.Parse(result); - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(Resources.GetString(fileName)), parsedJson)); + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expected), parsedJson)); } else { - Assert.Equal(Resources.GetString(fileName).ChangeLineBreaks(), result); + Assert.Equal(expected.ChangeLineBreaks(), result); } } From 9b3ff9dd226ac4962604c982049d4c957e7311b8 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 12:42:37 -0500 Subject: [PATCH 093/103] fix: removes style as it's the default value Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGeneratorTests.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 1560d69fc..d49498fa2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -56,7 +56,6 @@ public async Task CreateParametersReturnsCreatedParameters() ""name"": ""$top"", ""in"": ""query"", ""description"": ""Show only the first n items"", - ""style"": ""form"", ""explode"": false, ""schema"": { ""minimum"": 0, @@ -69,7 +68,6 @@ public async Task CreateParametersReturnsCreatedParameters() ""name"": ""$skip"", ""in"": ""query"", ""description"": ""Skip the first n items"", - ""style"": ""form"", ""explode"": false, ""schema"": { ""minimum"": 0, @@ -81,7 +79,6 @@ public async Task CreateParametersReturnsCreatedParameters() ""name"": ""$count"", ""in"": ""query"", ""description"": ""Include count of items"", - ""style"": ""form"", ""explode"": false, ""schema"": { ""type"": ""boolean"" @@ -91,7 +88,6 @@ public async Task CreateParametersReturnsCreatedParameters() ""name"": ""$filter"", ""in"": ""query"", ""description"": ""Filter items by property values"", - ""style"": ""form"", ""explode"": false, ""schema"": { ""type"": ""string"" @@ -101,7 +97,6 @@ public async Task CreateParametersReturnsCreatedParameters() ""name"": ""$search"", ""in"": ""query"", ""description"": ""Search items by search phrases"", - ""style"": ""form"", ""explode"": false, ""schema"": { ""type"": ""string"" @@ -137,7 +132,6 @@ public async Task CanSerializeAsYamlFromTheCreatedParameters() @"name: $skip in: query description: Skip the first n items -style: form explode: false schema: minimum: 0 From a5415a362ecfb815b83a739e1a5f3ca3493a6988 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 12:50:47 -0500 Subject: [PATCH 094/103] fix: more style form cleanup Signed-off-by: Vincent Biret --- .../Generator/OpenApiParameterGeneratorTests.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index d49498fa2..3301782b5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -442,7 +442,6 @@ private static async Task VerifyCreateOrderByParameter(IEdmElement edmElement, O ""name"": ""$orderby"", ""in"": ""query"", ""description"": ""Order items by property values"", - ""style"": ""form"", ""explode"": false, ""schema"": {{ ""uniqueItems"": true, @@ -488,7 +487,6 @@ private static async Task VerifyCreateSelectParameter(IEdmElement edmElement, OD ""name"": ""$select"", ""in"": ""query"", ""description"": ""Select properties to be returned"", - ""style"": ""form"", ""explode"": false, ""schema"": {{ ""uniqueItems"": true, @@ -530,7 +528,6 @@ private static async Task VerifyCreateExpandParameter(IEdmElement edmElement, OD ""name"": ""$expand"", ""in"": ""query"", ""description"": ""Expand related entities"", - ""style"": ""form"", ""explode"": false, ""schema"": {{ ""uniqueItems"": true, @@ -545,7 +542,6 @@ private static async Task VerifyCreateExpandParameter(IEdmElement edmElement, OD ""name"": ""$expand"", ""in"": ""query"", ""description"": ""Expand related entities"", - ""style"": ""form"", ""explode"": false, ""schema"": {{ ""uniqueItems"": true, From 18cf118175fae90ceab32b4f24cd8fa385c0b03d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 12:59:09 -0500 Subject: [PATCH 095/103] chore: linting Signed-off-by: Vincent Biret --- .../Operation/DollarCountGetOperationHandlerTests.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs index d2d8fc307..8d2f39871 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs @@ -8,9 +8,6 @@ using Microsoft.OpenApi.OData.Edm; using Microsoft.OpenApi.OData.Tests; using Xunit; -using Microsoft.OpenApi.Models.References; -using System.Collections.Generic; -using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.OData.Operation.Tests From 1d2715d81b332e0b491399d97fa2f34788da46cf Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 12:59:23 -0500 Subject: [PATCH 096/103] fix: missing security scheme for reference Signed-off-by: Vincent Biret --- .../EdmActionImportOperationHandlerTests.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs index e2c7f4eb1..0122ce86e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs @@ -4,11 +4,13 @@ // ------------------------------------------------------------ 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; @@ -17,7 +19,17 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class EdmActionImportOperationHandlerTests { - private EdmActionImportOperationHandler _operationHandler = new EdmActionImportOperationHandler(new()); + private readonly OpenApiDocument openApiDocument = new(); + private EdmActionImportOperationHandler _operationHandler => new EdmActionImportOperationHandler(openApiDocument); + public EdmActionImportOperationHandlerTests() + { + openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + } [Fact] public void CreateOperationForEdmActionImportReturnsCorrectOperation() From 88fce320ec24fa83a262464c01fd14a0740c5985 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 13:15:42 -0500 Subject: [PATCH 097/103] fix: adds missing security scheme definitions --- .../Operation/EdmActionOperationHandlerTests.cs | 9 +++++++-- .../EdmFunctionImportOperationHandlerTests.cs | 9 +++++++-- .../Operation/EdmFunctionOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntityDeleteOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntityGetOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntityPatchOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntityPutOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntitySetGetOperationHandlerTests.cs | 9 +++++++-- .../Operation/EntitySetPostOperationHandlerTests.cs | 9 +++++++-- .../NavigationPropertyGetOperationHandlerTests.cs | 9 +++++++-- .../NavigationPropertyPatchOperationHandlerTests.cs | 9 +++++++-- .../NavigationPropertyPostOperationHandlerTests.cs | 9 +++++++-- .../NavigationPropertyPutOperationHandlerTests.cs | 9 +++++++-- .../Operation/SingletonGetOperationHandlerTests.cs | 9 +++++++-- .../Operation/SingletonPatchOperationHandlerTests.cs | 12 ++++++++++-- 15 files changed, 108 insertions(+), 30 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index a7017e0dc..9d7e514f2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -23,10 +23,15 @@ public class EdmActionOperationHandlerTests { public EdmActionOperationHandlerTests() { - _operationHandler = new EdmActionOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EdmActionOperationHandler _operationHandler; + private EdmActionOperationHandler _operationHandler => new(_openApiDocument); [Fact] public void CreateOperationForEdmActionReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index 5f53b903a..b4cc26ac7 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -21,10 +21,15 @@ public class EdmFunctionImportOperationHandlerTests { public EdmFunctionImportOperationHandlerTests() { - _operationHandler = new EdmFunctionImportOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EdmFunctionImportOperationHandler _operationHandler; + private EdmFunctionImportOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index af99ad499..12847cf54 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -22,11 +22,16 @@ public class EdmFunctionOperationHandlerTests { public EdmFunctionOperationHandlerTests() { - _operationHandler = new EdmFunctionOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EdmFunctionOperationHandler _operationHandler; + private EdmFunctionOperationHandler _operationHandler => new(_openApiDocument); #region OperationHandlerTests [Fact] public void SetsDeprecationInformation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index fa22e1cd7..89809b42d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -19,10 +19,15 @@ public class EntityDeleteOperationHandlerTests { public EntityDeleteOperationHandlerTests() { - _operationHandler = new EntityDeleteOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntityDeleteOperationHandler _operationHandler; + private EntityDeleteOperationHandler _operationHandler => new (_openApiDocument); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index a2513a24d..91de64618 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -20,11 +20,16 @@ public class EntityGetOperationHandlerTests { public EntityGetOperationHandlerTests() { - _operationHandler = new EntityGetOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntityGetOperationHandler _operationHandler; + private EntityGetOperationHandler _operationHandler => new (_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index bafaf46f9..8371132c5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -19,11 +19,16 @@ public class EntityPatchOperationHandlerTests { public EntityPatchOperationHandlerTests() { - _operationHandler = new EntityPatchOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntityPatchOperationHandler _operationHandler; + private EntityPatchOperationHandler _operationHandler => new (_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index bf0203af2..26a9ac763 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -19,11 +19,16 @@ public class EntityPutOperationHandlerTests { public EntityPutOperationHandlerTests() { - _operationHandler = new EntityPutOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntityPutOperationHandler _operationHandler; + private EntityPutOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index 19c49bb33..db027e21c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -24,11 +24,16 @@ public class EntitySetGetOperationHandlerTests { public EntitySetGetOperationHandlerTests() { - _operationHandler = new EntitySetGetOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntitySetGetOperationHandler _operationHandler; + private EntitySetGetOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index 70d6351cf..c731a3056 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -23,11 +23,16 @@ public class EntitySetPostOperationHandlerTests { public EntitySetPostOperationHandlerTests() { - _operationHandler = new EntitySetPostOperationHandler(_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly EntitySetPostOperationHandler _operationHandler; + private EntitySetPostOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index be43ee8d6..4b41a9f36 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -21,10 +21,15 @@ public class NavigationPropertyGetOperationHandlerTests { public NavigationPropertyGetOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly NavigationPropertyGetOperationHandler _operationHandler; + private NavigationPropertyGetOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index 8c2d845b0..2789ff49b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -20,10 +20,15 @@ public class NavigationPropertyPatchOperationHandlerTests { public NavigationPropertyPatchOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly NavigationPropertyPatchOperationHandler _operationHandler; + private NavigationPropertyPatchOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index c7cd2c6b4..423d2e38d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -20,10 +20,15 @@ public class NavigationPropertyPostOperationHandlerTests { public NavigationPropertyPostOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private NavigationPropertyPostOperationHandler _operationHandler; + private NavigationPropertyPostOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index 750390147..e2c7dcc84 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -20,10 +20,15 @@ public class NavigationPropertyPutOperationHandlerTests { public NavigationPropertyPutOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly NavigationPropertyPutOperationHandler _operationHandler; + private NavigationPropertyPutOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index 1d31f59c2..c27cdafd5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -24,10 +24,15 @@ public class SingletonGetOperationHandlerTests { public SingletonGetOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly SingletonGetOperationHandler _operationHandler; + private SingletonGetOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index 6791b9147..6901a363c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -20,10 +20,18 @@ public class SingletonPatchOperationHandlerTests { public SingletonPatchOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("Application", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); + _openApiDocument.AddComponent("authorizationName", new OpenApiSecurityScheme { + Type = SecuritySchemeType.OAuth2, + }); } private readonly OpenApiDocument _openApiDocument = new(); - private readonly SingletonPatchOperationHandler _operationHandler; + private SingletonPatchOperationHandler _operationHandler => new(_openApiDocument); [Theory] [InlineData(true, true)] From ac4526165b8cb8362ec56f31787a06877249681c Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 15:38:43 -0500 Subject: [PATCH 098/103] fix: nullable information Signed-off-by: Vincent Biret --- .../OpenApiEdmTypeSchemaGenerator.cs | 9 +- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 20 +- .../OpenApiResponseGeneratorTests.cs | 9 +- .../Generator/OpenApiSchemaGeneratorTests.cs | 76 +++-- .../Resources/Basic.OpenApi.yaml | 8 +- .../Resources/Empty.OpenApi.yaml | 8 +- .../Multiple.Schema.OpenApi.V3.1.json | 65 +--- .../Multiple.Schema.OpenApi.V3.1.yaml | 52 +--- .../Resources/Multiple.Schema.OpenApi.yaml | 282 +++++++++--------- .../Resources/TripService.OpenApi.V3.1.json | 80 +---- .../Resources/TripService.OpenApi.V3.1.yaml | 64 +--- .../Resources/TripService.OpenApi.yaml | 162 +++++----- 12 files changed, 352 insertions(+), 483 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 540dbcfc6..bbaa78ce9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -349,8 +349,7 @@ private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IE new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), new OpenApiSchema { - Type = JsonSchemaType.Object, - Nullable = true + Type = JsonSchemaType.Null, } ] }; @@ -380,8 +379,7 @@ private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext conte new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), new OpenApiSchema { - Type = JsonSchemaType.Object, - Nullable = true + Type = JsonSchemaType.Null, } ] }; @@ -406,8 +404,7 @@ private static IOpenApiSchema CreateTypeDefinitionSchema(this ODataContext conte new OpenApiSchemaReference(reference.Definition.FullTypeName(), document), new OpenApiSchema { - Type = JsonSchemaType.Object, - Nullable = true + Type = JsonSchemaType.Null, } ] }; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 5eb3e520d..2cde5f744 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -164,8 +164,10 @@ public async Task CreateEdmTypeSchemaReturnSchemaForNullableCollectionPrimitiveT [Theory] [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(true, OpenApiSpecVersion.OpenApi3_1)] [InlineData(false, OpenApiSpecVersion.OpenApi2_0)] [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(false, OpenApiSpecVersion.OpenApi3_1)] public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiSpecVersion specVersion) { // Arrange @@ -182,19 +184,15 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS // & Assert Assert.NotNull(schema); - - if (specVersion == OpenApiSpecVersion.OpenApi2_0) { var schemaReference = Assert.IsType(schema); Assert.Null(schema.AnyOf); Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); Assert.Equal(enumType.FullTypeName(), schemaReference.Reference.Id); - Assert.Equal(isNullable, schema.Nullable); } else { - if (isNullable) { Assert.NotNull(schema.AnyOf); @@ -207,8 +205,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS Assert.Equal(enumType.FullTypeName(), anyOfRef.Reference.Id); var anyOfNull = schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); - Assert.True(anyOfNull.Nullable); + Assert.Equal(JsonSchemaType.Null, anyOfNull.Type); } else { @@ -216,15 +213,17 @@ public void CreateEdmTypeSchemaReturnSchemaForEnumType(bool isNullable, OpenApiS var schemaReference = Assert.IsType(schema); Assert.Equal(ReferenceType.Schema, schemaReference.Reference.Type); Assert.Equal(enumType.FullTypeName(), schemaReference.Reference.Id); - } + } } } [Theory] [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(true, OpenApiSpecVersion.OpenApi3_1)] [InlineData(false, OpenApiSpecVersion.OpenApi2_0)] [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(false, OpenApiSpecVersion.OpenApi3_1)] public void CreateEdmTypeSchemaReturnSchemaForComplexType(bool isNullable, OpenApiSpecVersion specVersion) { // Arrange @@ -263,10 +262,12 @@ public void CreateEdmTypeSchemaReturnSchemaForComplexType(bool isNullable, OpenA } [Theory] + [InlineData(true, OpenApiSpecVersion.OpenApi3_1)] [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] [InlineData(false, OpenApiSpecVersion.OpenApi2_0)] [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] + [InlineData(false, OpenApiSpecVersion.OpenApi3_1)] public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenApiSpecVersion specVersion) { // Arrange @@ -284,7 +285,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp // & Assert Assert.NotNull(schema); - if (specVersion == OpenApiSpecVersion.OpenApi2_0 || isNullable == false) + if (specVersion == OpenApiSpecVersion.OpenApi2_0 || !isNullable) { Assert.Null(schema.AnyOf); var schemaReference = Assert.IsType(schema); @@ -303,8 +304,7 @@ public void CreateEdmTypeSchemaReturnSchemaForEntityType(bool isNullable, OpenAp Assert.Equal(entity.FullTypeName(), anyOfRef.Reference.Id); var anyOfNull = schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); - Assert.True(anyOfNull.Nullable); + Assert.Equal(JsonSchemaType.Null, anyOfNull.Type); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 4151f3058..0a780099c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -178,6 +178,8 @@ public void CreateResponseForOperationThrowArgumentNullOperation() } [Theory] + [InlineData(true, OpenApiSpecVersion.OpenApi3_1)] + [InlineData(false, OpenApiSpecVersion.OpenApi3_1)] [InlineData(true, OpenApiSpecVersion.OpenApi3_0)] [InlineData(false, OpenApiSpecVersion.OpenApi3_0)] [InlineData(true, OpenApiSpecVersion.OpenApi2_0)] @@ -217,8 +219,7 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm var response = responses["200"]; Assert.NotNull(response.Content); OpenApiMediaType mediaType = response.Content["application/json"]; - - // openApi version 2 should not use AnyOf +// openApi version 2 should not use AnyOf if (specVersion == OpenApiSpecVersion.OpenApi2_0) { Assert.NotNull(mediaType.Schema); @@ -226,7 +227,6 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm var mediaTypeSchemaReference = Assert.IsType(mediaType.Schema); Assert.NotNull(mediaTypeSchemaReference.Reference); Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", mediaTypeSchemaReference.Reference.Id); - Assert.True(mediaType.Schema.Nullable); } else { @@ -239,8 +239,7 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm Assert.Equal("Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person", anyOfRef.Reference.Id); var anyOfNull = mediaType.Schema.AnyOf.Skip(1).FirstOrDefault(); Assert.NotNull(anyOfNull.Type); - Assert.Equal(JsonSchemaType.Object, anyOfNull.Type); - Assert.True(anyOfNull.Nullable); + Assert.Equal(JsonSchemaType.Null, anyOfNull.Type); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index b008f65a6..e1b801e6e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -316,7 +316,7 @@ public async Task CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValue ""#microsoft.graph.singleUser"": ""#/components/schemas/microsoft.graph.singleUser"" } } -}".ChangeLineBreaks() +}" : @"{ ""title"": ""userSet"", @@ -346,9 +346,9 @@ public async Task CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValue ""#microsoft.graph.singleUser"": ""#/components/schemas/microsoft.graph.singleUser"" } } -}".ChangeLineBreaks(); +}"; - Assert.Equal(expected, json); + Assert.True(JsonObject.DeepEquals(JsonObject.Parse(expected), JsonObject.Parse(json))); } [Fact] @@ -367,7 +367,7 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonObject.DeepEquals(JsonObject.Parse(@"{ ""allOf"": [ { ""$ref"": ""#/components/schemas/microsoft.graph.entity"" @@ -439,7 +439,7 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns } } ] -}".ChangeLineBreaks(), json); +}"), JsonObject.Parse(json))); } [Fact] @@ -473,7 +473,7 @@ public async Task CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() // Assert Assert.NotNull(json); - Assert.Equal(@"{ + Assert.True(JsonObject.DeepEquals(JsonObject.Parse(@"{ ""title"": ""Address"", ""type"": ""object"", ""properties"": { @@ -491,7 +491,7 @@ public async Task CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() ""Street"": ""string"", ""City"": ""string"" } -}".ChangeLineBreaks(), json); +}"), JsonObject.Parse(json))); } [Fact] @@ -893,6 +893,7 @@ public async Task CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(Ope } [Theory] + [InlineData(OpenApiSpecVersion.OpenApi3_1)] [InlineData(OpenApiSpecVersion.OpenApi3_0)] [InlineData(OpenApiSpecVersion.OpenApi2_0)] public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenApiSpecVersion specVersion) @@ -913,28 +914,45 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp string json = await schema.SerializeAsJsonAsync(specVersion); _output.WriteLine(json); - // Assert - if (specVersion == OpenApiSpecVersion.OpenApi2_0) - { - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ - ""$ref"": ""#/definitions/DefaultNs.Color"" -}"), JsonNode.Parse(json))); - } - else - { - Assert.True(JsonNode.DeepEquals(JsonNode.Parse(@"{ - ""anyOf"": [ - { - ""$ref"": ""#/components/schemas/DefaultNs.Color"" - }, - { - ""type"": ""object"", - ""nullable"": true - } - ], - ""default"": ""yellow"" -}"), JsonNode.Parse(json))); - } + var expected = JsonNode.Parse(specVersion switch { + OpenApiSpecVersion.OpenApi2_0 => + """ + { + "$ref": "#/definitions/DefaultNs.Color" + } + """, + OpenApiSpecVersion.OpenApi3_0 => + """ + { + "anyOf": [ + { + "$ref": "#/components/schemas/DefaultNs.Color" + }, + { + "type": "object", + "nullable": true + } + ], + "default": "yellow" + } + """, + OpenApiSpecVersion.OpenApi3_1 => + """ + { + "anyOf": [ + { + "$ref": "#/components/schemas/DefaultNs.Color" + }, + { + "type": "null" + } + ], + "default": "yellow" + } + """, + }); + + Assert.True(JsonNode.DeepEquals(expected, JsonNode.Parse(json))); } [Theory] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml index 7f9acd1c8..7614a033a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml @@ -659,8 +659,8 @@ components: type: string x-ms-primary-error-message: true target: - type: string nullable: true + type: string details: type: array items: @@ -678,8 +678,8 @@ components: message: type: string target: - type: string nullable: true + type: string DefaultNs.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -692,8 +692,8 @@ components: '@odata.id': type: string '@odata.type': - type: string nullable: true + type: string ReferenceCreate: type: object properties: @@ -706,8 +706,8 @@ components: - '-INF' - INF - NaN - type: string nullable: true + type: string DefaultNs.Color: title: Color enum: diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml index 6c097575d..1a83b68ac 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml @@ -27,8 +27,8 @@ components: type: string x-ms-primary-error-message: true target: - type: string nullable: true + type: string details: type: array items: @@ -46,8 +46,8 @@ components: message: type: string target: - type: string nullable: true + type: string ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -60,8 +60,8 @@ components: '@odata.id': type: string '@odata.type': - type: string nullable: true + type: string ReferenceCreate: type: object properties: @@ -74,8 +74,8 @@ components: - '-INF' - INF - NaN - type: string nullable: true + type: string responses: error: description: error diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json index 80faf4a09..fe23ad38e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.json @@ -5074,10 +5074,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5493,10 +5490,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5507,10 +5501,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5521,10 +5512,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5673,10 +5661,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5746,10 +5731,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -5760,10 +5742,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6049,10 +6028,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6063,10 +6039,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6077,10 +6050,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6272,10 +6242,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6286,10 +6253,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -6862,10 +6826,7 @@ "$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml index 5377c55cf..ea0aec895 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V3.1.yaml @@ -3560,9 +3560,7 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true example: Id: 0 @@ -3873,23 +3871,17 @@ components: Library: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true LastRevisionFile: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true SourceDocument: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true SourceDocumentChildren: type: array @@ -4002,9 +3994,7 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true example: ClassInstance: 0 @@ -4057,16 +4047,12 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true Tag: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true example: DocumentId: 0 @@ -4285,23 +4271,17 @@ components: LibraryParent: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true Type: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true SourceFolder: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true Documents: type: array @@ -4445,16 +4425,12 @@ components: MasterLibraryType: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true ParentLibraryTypes: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true MasterLibraryTypeChildren: type: array @@ -4870,9 +4846,7 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true example: Id: 0 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 3f1326206..dd2d13b7d 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 @@ -3241,8 +3241,8 @@ components: type: string x-ms-primary-error-message: true target: - type: string nullable: true + type: string details: type: array items: @@ -3260,8 +3260,8 @@ components: message: type: string target: - type: string nullable: true + type: string Default.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -3282,8 +3282,8 @@ components: '@odata.id': type: string '@odata.type': - type: string nullable: true + type: string ReferenceCreate: type: object properties: @@ -3296,8 +3296,8 @@ components: - '-INF' - INF - NaN - type: string nullable: true + type: string Siterra.Documents.App.DTO.DocumentDto: title: DocumentDto type: object @@ -3308,20 +3308,20 @@ components: type: number format: int32 Name: - type: string nullable: true - Description: type: string + Description: nullable: true - Filename: type: string + Filename: nullable: true - NumberOfRevisions: type: string + NumberOfRevisions: nullable: true - Suffix: type: string + Suffix: nullable: true + type: string DomainId: maximum: 2147483647 minimum: -2147483648 @@ -3329,15 +3329,15 @@ components: format: int32 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])$' + nullable: true type: string format: date-time - nullable: true ModifiedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Tags: type: array items: @@ -3371,20 +3371,20 @@ components: type: number format: int32 Name: - type: string nullable: true - Number: type: string + Number: nullable: true - Description: type: string + Description: nullable: true + type: string LibraryTemplateId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ParentTypeId: maximum: 2147483647 minimum: -2147483648 @@ -3421,14 +3421,14 @@ components: ModifiedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true Documents: type: array items: @@ -3469,15 +3469,15 @@ components: DocumentId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true DocumentName: - type: string nullable: true - DocumentDescription: type: string + DocumentDescription: nullable: true + type: string CreationDate: 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 @@ -3492,40 +3492,40 @@ components: ReviewedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true IsRejected: type: boolean RejectedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true DomainId: maximum: 2147483647 minimum: -2147483648 @@ -3534,8 +3534,8 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true example: Id: 0 @@ -3567,11 +3567,11 @@ components: type: number format: int32 Name: - type: string nullable: true - Description: type: string + Description: nullable: true + type: string CreationDate: 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 @@ -3597,8 +3597,8 @@ components: type: object properties: Name: - type: string nullable: true + type: string example: Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: @@ -3611,11 +3611,11 @@ components: type: number format: int32 Name: - type: string nullable: true - Description: type: string + Description: nullable: true + type: string StatusId: maximum: 2147483647 minimum: -2147483648 @@ -3627,8 +3627,8 @@ components: type: number format: int32 Keywords: - type: string nullable: true + type: string CreationDate: 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 @@ -3655,9 +3655,9 @@ components: LibraryId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true OwnerUserId: maximum: 2147483647 minimum: -2147483648 @@ -3670,137 +3670,137 @@ components: LastRevisionId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true CheckoutPath: - type: string nullable: true + type: string CheckoutUserId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Number: - type: string nullable: true + type: string 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])$' + nullable: true type: string format: date-time - nullable: true FileSized: type: number format: decimal FileClientPath: - type: string nullable: true + type: string LastRevisionFileId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsDeleted: maximum: 2147483647 minimum: -2147483648 type: number format: int32 IsNa: + nullable: true type: number format: decimal - nullable: true IsRejected: + nullable: true type: number format: decimal - nullable: true IsReviewed: + nullable: true type: number format: decimal - nullable: true NaDescription: - type: string nullable: true - NaReason: type: string + NaReason: nullable: true - RejectedDescription: type: string + RejectedDescription: nullable: true - RejectedReason: type: string + RejectedReason: nullable: true - ReviewDescription: type: string + ReviewDescription: nullable: true + type: string SourceDocumentId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ScraperMapId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string format: date-time - nullable: true SmsId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsApprovedOld: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Suffix: - type: string nullable: true + type: string ScrapeResultId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsApproved: + nullable: true type: number format: decimal - nullable: true CategoryId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true SectionId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true VersionCount: maximum: 2147483647 minimum: -2147483648 type: number format: int32 LastFileName: - type: string nullable: true + type: string DocumentClasses: type: array items: @@ -3812,20 +3812,20 @@ components: Library: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true LastRevisionFile: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true SourceDocument: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true SourceDocumentChildren: type: array @@ -3938,8 +3938,8 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true example: ClassInstance: 0 @@ -3992,14 +3992,14 @@ components: Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true Tag: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true example: DocumentId: 0 @@ -4028,17 +4028,17 @@ components: type: number format: int32 Name: - type: string nullable: true + type: string ParentFolderId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Number: - type: string nullable: true + type: string TypeId: maximum: 2147483647 minimum: -2147483648 @@ -4083,60 +4083,60 @@ components: ProjectId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true SearchRingId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true SiteId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true AssetId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true AllowMultiple: type: boolean AutoCreate: type: boolean Description: - type: string nullable: true + type: string IsTemplate: type: boolean ProgramId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true SourceFolderId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true TemplateClassId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true TemplateSubType: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsHidden: type: boolean IsDeleted: @@ -4147,45 +4147,45 @@ components: StatusId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true SmsId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ContractId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true VendorId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true OrganizationUnitId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IncidentId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true EventId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ClassInstance: maximum: 2147483647 minimum: -2147483648 @@ -4199,20 +4199,20 @@ components: LibraryParent: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true Type: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true SourceFolder: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true Documents: type: array @@ -4289,8 +4289,8 @@ components: type: number format: int32 Name: - type: string nullable: true + type: string ModifiedBy: maximum: 2147483647 minimum: -2147483648 @@ -4312,27 +4312,27 @@ components: DomainId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Description: - type: string nullable: true - XmlName: type: string + XmlName: nullable: true + type: string MasterId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Number: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ClassId: maximum: 2147483647 minimum: -2147483648 @@ -4341,22 +4341,22 @@ components: ParentId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true HasChanged: type: boolean MasterLibraryType: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true ParentLibraryTypes: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true MasterLibraryTypeChildren: type: array @@ -4401,11 +4401,11 @@ components: type: number format: int32 Name: - type: string nullable: true - Path: type: string + Path: nullable: true + type: string ModifiedBy: maximum: 2147483647 minimum: -2147483648 @@ -4428,8 +4428,8 @@ components: type: number format: decimal ActualName: - type: string nullable: true + type: string DomainId: maximum: 2147483647 minimum: -2147483648 @@ -4438,18 +4438,18 @@ components: SourceClassId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ContentTypeId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true ClientPath: - type: string nullable: true + type: string IsSelfHosted: maximum: 32767 minimum: -32768 @@ -4458,17 +4458,17 @@ components: SmsId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true Latitude: + nullable: true type: number format: decimal - nullable: true Longitude: + nullable: true type: number format: decimal - nullable: true Documents: type: array items: @@ -4509,11 +4509,11 @@ components: type: number format: int32 Name: - type: string nullable: true - Description: type: string + Description: nullable: true + type: string CreatedBy: maximum: 2147483647 minimum: -2147483648 @@ -4623,9 +4623,9 @@ components: DocumentId: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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 @@ -4645,8 +4645,8 @@ components: type: number format: int32 Remarks: - type: string nullable: true + type: string FileId: maximum: 2147483647 minimum: -2147483648 @@ -4658,30 +4658,30 @@ components: type: number format: int32 DocumentDescription: - type: string nullable: true + type: string DocumentStatusDate: 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 format: date-time DocumentFolder: - type: string nullable: true - DocumentKeywords: type: string + DocumentKeywords: nullable: true - DocumentStatus: type: string + DocumentStatus: nullable: true - DocumentType: type: string + DocumentType: nullable: true - DocumentName: type: string + DocumentName: nullable: true - DocumentNumber: type: string + DocumentNumber: nullable: true + type: string DomainId: maximum: 2147483647 minimum: -2147483648 @@ -4695,56 +4695,56 @@ components: IsReviewed: type: boolean ReviewDescription: - type: string nullable: true + type: string ReviewedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsRejected: type: boolean RejectedReason: - type: string nullable: true - RejectedDescription: type: string + RejectedDescription: nullable: true + type: string RejectedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number format: int32 - nullable: true IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 + nullable: true type: number 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])$' + nullable: true type: string 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])$' + nullable: true type: string 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])$' + nullable: true type: string format: date-time - nullable: true Document: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true example: Id: 0 diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json index 08687f1cf..75cb382aa 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.json @@ -1432,10 +1432,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -1469,10 +1466,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -11739,10 +11733,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -17026,10 +17017,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -30811,10 +30799,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -33853,10 +33838,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] }, @@ -33890,10 +33872,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "description": "The best friend.", @@ -33949,10 +33928,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -33974,10 +33950,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } @@ -34025,10 +33998,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "description": "The person to contact in case of a crisis at this location.", @@ -34185,10 +34155,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] }, @@ -34242,10 +34209,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -34256,10 +34220,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -34270,10 +34231,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ], "x-ms-navigationProperty": true @@ -34351,10 +34309,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] }, @@ -34697,10 +34652,7 @@ "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" }, { - "type": [ - "null", - "object" - ] + "type": "null" } ] } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml index fa86360ac..e191756cf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V3.1.yaml @@ -922,9 +922,7 @@ paths: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: - - 'null' - - object + - type: 'null' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -944,9 +942,7 @@ paths: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -7824,9 +7820,7 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' required: true responses: '204': @@ -11343,9 +11337,7 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' required: true responses: '204': @@ -20614,9 +20606,7 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' required: true responses: '204': @@ -22660,9 +22650,7 @@ components: HomeAddress: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - type: - - 'null' - - object + - type: 'null' FavoriteFeature: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Features: @@ -22683,9 +22671,7 @@ components: BestFriend: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' description: The best friend. x-ms-navigationProperty: true Trips: @@ -22721,9 +22707,7 @@ components: Location: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - - type: - - 'null' - - object + - type: 'null' Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object @@ -22735,9 +22719,7 @@ components: City: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - - type: - - 'null' - - object + - type: 'null' Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: title: City type: object @@ -22765,9 +22747,7 @@ components: EmergencyAuthority: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: - - 'null' - - object + - type: 'null' description: The person to contact in case of a crisis at this location. x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: @@ -22868,9 +22848,7 @@ components: OccursAt: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' - - type: - - 'null' - - object + - type: 'null' Description: type: - 'null' @@ -22898,23 +22876,17 @@ components: Airline: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true From: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true To: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: - - 'null' - - object + - type: 'null' x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: @@ -22954,9 +22926,7 @@ components: BossOffice: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - type: - - 'null' - - object + - type: 'null' DirectReports: type: array items: @@ -23173,9 +23143,7 @@ components: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - - type: - - 'null' - - object + - type: 'null' GetFriendsTripsResponse: description: Success content: 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 c9905a87c..91dc8fc0d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -893,22 +893,22 @@ paths: required: true schema: oneOf: - - type: number + - nullable: true + type: number format: double - nullable: true - - type: string - nullable: true + - nullable: true + type: string - $ref: '#/components/schemas/ReferenceNumeric' - name: lon in: path required: true schema: oneOf: - - type: number + - nullable: true + type: number format: double - nullable: true - - type: string - nullable: true + - nullable: true + type: string - $ref: '#/components/schemas/ReferenceNumeric' responses: '200': @@ -918,8 +918,8 @@ paths: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: object - nullable: true + - nullable: true + type: object default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -939,8 +939,8 @@ paths: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - nullable: true + type: object default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -7818,8 +7818,8 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - nullable: true + type: object required: true responses: '204': @@ -11336,8 +11336,8 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - nullable: true + type: object required: true responses: '204': @@ -20606,8 +20606,8 @@ paths: hire: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - nullable: true + type: object required: true responses: '204': @@ -22539,8 +22539,8 @@ components: type: string x-ms-primary-error-message: true target: - type: string nullable: true + type: string details: type: array items: @@ -22558,20 +22558,20 @@ components: message: type: string target: - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: title: InnerError type: object properties: 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])$' + nullable: true type: string format: date-time - nullable: true RequestId: - type: string nullable: true + type: string ODataCountResponse: type: number format: int64 @@ -22589,8 +22589,8 @@ components: '@odata.id': type: string '@odata.type': - type: string nullable: true + type: string ReferenceCreate: type: object properties: @@ -22603,8 +22603,8 @@ components: - '-INF' - INF - NaN - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: title: Person type: object @@ -22614,25 +22614,25 @@ components: FirstName: type: string LastName: - type: string nullable: true - MiddleName: type: string + MiddleName: nullable: true + type: string Gender: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' Age: oneOf: - - type: number + - nullable: true + type: number format: int64 - nullable: true - - type: string - nullable: true + - nullable: true + type: string Emails: type: array items: - type: string nullable: true + type: string AddressInfo: type: array items: @@ -22640,8 +22640,8 @@ components: HomeAddress: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - type: object - nullable: true + - nullable: true + type: object FavoriteFeature: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Features: @@ -22649,9 +22649,9 @@ components: items: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Photo: + nullable: true type: string format: base64url - nullable: true Friends: type: array items: @@ -22661,8 +22661,8 @@ components: BestFriend: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - nullable: true + type: object description: The best friend. x-ms-navigationProperty: true Trips: @@ -22678,50 +22678,50 @@ components: AirlineCode: type: string Name: - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: title: Airport type: object properties: Name: - type: string nullable: true + type: string IcaoCode: type: string IataCode: - type: string nullable: true + type: string Location: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - - type: object - nullable: true + - nullable: true + type: object Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object properties: Address: - type: string nullable: true + type: string City: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - - type: object - nullable: true + - nullable: true + type: object Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: title: City type: object properties: Name: - type: string nullable: true - CountryRegion: type: string + CountryRegion: nullable: true - Region: type: string + Region: nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' @@ -22733,8 +22733,8 @@ components: EmergencyAuthority: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - - type: object - nullable: true + - 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: @@ -22744,8 +22744,8 @@ components: type: object properties: BuildingInfo: - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: title: Trip type: object @@ -22760,24 +22760,24 @@ components: type: string format: uuid Name: - type: string nullable: true + type: string Budget: oneOf: - - type: number + - nullable: true + type: number format: float - nullable: true - - type: string - nullable: true + - nullable: true + type: string - $ref: '#/components/schemas/ReferenceNumeric' Description: - type: string nullable: true + type: string Tags: type: array items: - type: string nullable: true + type: string TripData: { } DestinationInfo: type: array @@ -22805,8 +22805,8 @@ components: type: number format: int32 ConfirmationCode: - type: string nullable: true + type: string 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])$' type: string @@ -22828,11 +22828,11 @@ components: OccursAt: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' - - type: object - nullable: true + - nullable: true + type: object Description: - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' @@ -22840,8 +22840,8 @@ components: type: object properties: SeatNumber: - type: string nullable: true + type: string Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' @@ -22849,25 +22849,25 @@ components: type: object properties: FlightNumber: - type: string nullable: true + type: string Airline: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true From: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true To: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - - type: object - nullable: true + - nullable: true + type: object x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: @@ -22877,11 +22877,11 @@ components: properties: Cost: oneOf: - - type: number + - nullable: true + type: number format: int64 - nullable: true - - type: string - nullable: true + - nullable: true + type: string Peers: type: array items: @@ -22895,16 +22895,16 @@ components: properties: Budget: oneOf: - - type: number + - nullable: true + type: number format: int64 - nullable: true - - type: string - nullable: true + - nullable: true + type: string BossOffice: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - - type: object - nullable: true + - nullable: true + type: object DirectReports: type: array items: @@ -23121,8 +23121,8 @@ components: schema: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - - type: object - nullable: true + - nullable: true + type: object GetFriendsTripsResponse: description: Success content: From d8c25f31456a8bef134541933a9d06c1d139d430 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 15:44:00 -0500 Subject: [PATCH 099/103] ci: fix type test definition Signed-off-by: Vincent Biret --- .../Operation/EdmActionOperationHandlerTests.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index 9d7e514f2..d606dae4d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -62,11 +62,8 @@ public void CreateOperationForEdmActionReturnsCorrectOperation() Assert.Single(operation.Parameters); Assert.Equal(new string[] { "UserName" }, operation.Parameters.Select(p => p.Name)); - Assert.NotNull(operation.RequestBody); - if (operation.RequestBody is OpenApiSchemaReference openApiSchemaReference) - Assert.Equal("ShareTripRequestBody", openApiSchemaReference.Reference.Id); - else - Assert.Equal("Action parameters", operation.RequestBody.Description); + var requestBodyReference = Assert.IsType(operation.RequestBody); + Assert.Equal("ShareTripRequestBody", requestBodyReference.Reference.Id); Assert.Equal(2, operation.Responses.Count); Assert.Equal(new string[] { "204", "default" }, operation.Responses.Select(e => e.Key)); From 313ee7aac99630974942e2a65ad36f3a94bccf94 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Jan 2025 17:23:34 -0500 Subject: [PATCH 100/103] fix flaky behaviour with error responses Signed-off-by: Vincent Biret --- .../Generator/OpenApiResponseGenerator.cs | 35 ++++++------------- .../Resources/Basic.OpenApi.V2.yaml | 17 +++++++++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index 292d7e874..c0cfa4f01 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -3,6 +3,7 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ +using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -21,25 +22,6 @@ namespace Microsoft.OpenApi.OData.Generator /// internal static class OpenApiResponseGenerator { - private static Dictionary _responses; - - private static Dictionary GetResponses(OpenApiDocument openApiDocument) - { - _responses ??= new() - { - { Constants.StatusCodeDefault, - new OpenApiResponseReference(Constants.Error, openApiDocument) - }, - - { Constants.StatusCode204, new OpenApiResponse { Description = Constants.Success} }, - { Constants.StatusCode201, new OpenApiResponse { Description = Constants.Created} }, - { Constants.StatusCodeClass2XX, new OpenApiResponse { Description = Constants.Success} }, - { Constants.StatusCodeClass4XX, new OpenApiResponseReference(Constants.Error, openApiDocument)}, - { Constants.StatusCodeClass5XX, new OpenApiResponseReference(Constants.Error, openApiDocument)} - }; - return _responses; - } - /// /// Get the for the build-in statusCode. /// @@ -48,12 +30,15 @@ private static Dictionary GetResponses(OpenApiDocument /// The created . public static IOpenApiResponse GetResponse(this string statusCode, OpenApiDocument document) { - if (GetResponses(document).TryGetValue(statusCode, out var response)) - { - return response; - } - - return null; + return statusCode switch { + Constants.StatusCodeDefault => new OpenApiResponseReference(Constants.Error, document), + Constants.StatusCode204 => new OpenApiResponse { Description = Constants.Success}, + Constants.StatusCode201 => new OpenApiResponse { Description = Constants.Created}, + Constants.StatusCodeClass2XX => new OpenApiResponse { Description = Constants.Success}, + Constants.StatusCodeClass4XX => new OpenApiResponseReference(Constants.Error, document), + Constants.StatusCodeClass5XX => new OpenApiResponseReference(Constants.Error, document), + _ => null, + }; } /// 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 4b0cbd4b4..f4087138d 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 @@ -122,6 +122,8 @@ paths: operationId: City.City.UpdateCity consumes: - application/json + produces: + - application/json parameters: - in: path name: Name @@ -146,6 +148,8 @@ paths: - City.City summary: Delete entity from City operationId: City.City.DeleteCity + produces: + - application/json parameters: - in: path name: Name @@ -172,6 +176,7 @@ paths: operationId: City.GetCount-8728 produces: - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -296,6 +301,8 @@ paths: operationId: CountryOrRegion.CountryOrRegion.UpdateCountryOrRegion consumes: - application/json + produces: + - application/json parameters: - in: path name: Name @@ -320,6 +327,8 @@ paths: - CountryOrRegion.CountryOrRegion summary: Delete entity from CountryOrRegion operationId: CountryOrRegion.CountryOrRegion.DeleteCountryOrRegion + produces: + - application/json parameters: - in: path name: Name @@ -346,6 +355,7 @@ paths: operationId: CountryOrRegion.GetCount-daf5 produces: - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' @@ -398,6 +408,8 @@ paths: operationId: Me.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: body name: body @@ -540,6 +552,8 @@ paths: operationId: People.Person.UpdatePerson consumes: - application/json + produces: + - application/json parameters: - in: path name: UserName @@ -564,6 +578,8 @@ paths: - People.Person summary: Delete entity from People operationId: People.Person.DeletePerson + produces: + - application/json parameters: - in: path name: UserName @@ -590,6 +606,7 @@ paths: operationId: People.GetCount-dd8d produces: - text/plain + - application/json parameters: - $ref: '#/parameters/search' - $ref: '#/parameters/filter' From 9c1ed4a9859df8077ed6d114e485201f8a672be1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 4 Feb 2025 11:06:33 -0500 Subject: [PATCH 101/103] fix: removal of nullable property Signed-off-by: Vincent Biret --- .../OpenApiEdmTypeSchemaGenerator.cs | 27 +- .../Generator/OpenApiErrorSchemaGenerator.cs | 12 +- .../Generator/OpenApiSchemaGenerator.cs | 9 +- .../OData/ODataConstants.cs | 6 +- .../OpenApiEdmTypeSchemaGeneratorTest.cs | 52 ++-- .../OpenApiRequestBodyGeneratorTests.cs | 4 +- .../Generator/OpenApiSchemaGeneratorTests.cs | 3 +- .../Resources/Basic.OpenApi.V2.json | 10 +- .../Resources/Basic.OpenApi.V2.yaml | 4 + .../Resources/Basic.OpenApi.yaml | 8 +- .../Resources/Empty.OpenApi.V2.json | 28 ++- .../Resources/Empty.OpenApi.V2.yaml | 4 + .../Resources/Empty.OpenApi.yaml | 8 +- .../Resources/Multiple.Schema.OpenApi.V2.json | 219 +++++++++++++---- .../Resources/Multiple.Schema.OpenApi.V2.yaml | 115 +++++++++ .../Resources/Multiple.Schema.OpenApi.yaml | 230 +++++++++--------- .../Resources/TripService.OpenApi.V2.json | 75 ++++-- .../Resources/TripService.OpenApi.V2.yaml | 31 ++- .../Resources/TripService.OpenApi.yaml | 98 ++++---- 19 files changed, 613 insertions(+), 330 deletions(-) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index bbaa78ce9..50b7b1059 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -150,7 +150,10 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti // Nullable properties are marked with the keyword nullable and a value of true. // nullable cannot be true when type is empty, often common in anyof/allOf since individual entries are nullable - openApiSchema.Nullable = !string.IsNullOrEmpty(schema.Type.ToIdentifier()) && primitiveType.IsNullable; + if (!string.IsNullOrEmpty(schema.Type.ToIdentifier()) && primitiveType.IsNullable) + { + openApiSchema.Type |= JsonSchemaType.Null; + } } return schema; @@ -203,8 +206,8 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti case EdmPrimitiveTypeKind.Decimal when emitIEEECompatibleTypes: // decimal schema.OneOf = [ - new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.DecimalFormat, Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = Constants.DecimalFormat }, + new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }, ]; break; case EdmPrimitiveTypeKind.Decimal when !emitIEEECompatibleTypes: // decimal @@ -212,28 +215,26 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti schema.Format = Constants.DecimalFormat; break; case EdmPrimitiveTypeKind.Double when emitV2CompatibleParameterTypes: // double - schema.Type = JsonSchemaType.Number; + schema.Type = JsonSchemaType.Number | JsonSchemaType.Null; schema.Format = "double"; - schema.Nullable = true; break; case EdmPrimitiveTypeKind.Double when !emitV2CompatibleParameterTypes: // double schema.OneOf = [ - new OpenApiSchema { Type = JsonSchemaType.Number, Format = "double", Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = "double" }, + new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }, new OpenApiSchemaReference(Constants.ReferenceNumericName, document) ]; break; case EdmPrimitiveTypeKind.Single when emitV2CompatibleParameterTypes: // single - schema.Type = JsonSchemaType.Number; + schema.Type = JsonSchemaType.Number | JsonSchemaType.Null; schema.Format = "float"; - schema.Nullable = true; break; case EdmPrimitiveTypeKind.Single when !emitV2CompatibleParameterTypes: // single schema.OneOf = [ - new OpenApiSchema { Type = JsonSchemaType.Number, Format = "float", Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }, + new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = "float"}, + new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null}, new OpenApiSchemaReference(Constants.ReferenceNumericName, document) ]; break; @@ -257,8 +258,8 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti case EdmPrimitiveTypeKind.Int64 when emitIEEECompatibleTypes: schema.OneOf = [ - new OpenApiSchema { Type = JsonSchemaType.Number, Format = Constants.Int64Format, Nullable = true }, - new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } + new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = Constants.Int64Format}, + new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null } ]; break; case EdmPrimitiveTypeKind.Int64 when !emitIEEECompatibleTypes: diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index 56e8e2fb7..346362259 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -130,14 +130,14 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName, Open Properties = new Dictionary { { - "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false } + "code", new OpenApiSchema { Type = JsonSchemaType.String } }, { - "message", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, Extensions = new Dictionary + "message", new OpenApiSchema { Type = JsonSchemaType.String, Extensions = new Dictionary { { OpenApiPrimaryErrorMessageExtension.Name, new OpenApiPrimaryErrorMessageExtension { IsPrimaryErrorMessage = true } } } } }, { - "target", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true } + "target", new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null } }, { "details", @@ -171,13 +171,13 @@ public static OpenApiSchema CreateErrorDetailSchema() Properties = new Dictionary { { - "code", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, } + "code", new OpenApiSchema { Type = JsonSchemaType.String, } }, { - "message", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false, } + "message", new OpenApiSchema { Type = JsonSchemaType.String, } }, { - "target", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true, } + "target", new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null, } } } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index a3c67f313..e05512b92 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -68,8 +68,8 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume Type = JsonSchemaType.Object, Properties = new Dictionary { - {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }}, - {Constants.OdataType, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }}, + {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String }}, + {Constants.OdataType, new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }}, } }); @@ -78,15 +78,14 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume Type = JsonSchemaType.Object, Properties = new Dictionary { - {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String, Nullable = false }} + {Constants.OdataId, new OpenApiSchema { Type = JsonSchemaType.String }} }, AdditionalProperties = new OpenApiSchema { Type = JsonSchemaType.Object } }); document.AddComponent(Constants.ReferenceNumericName, new OpenApiSchema() { - Type = JsonSchemaType.String, - Nullable = true, + Type = JsonSchemaType.String | JsonSchemaType.Null, Enum = [ "-INF", diff --git a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs index c4916af76..4515aec96 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs @@ -24,16 +24,16 @@ internal static class ODataConstants /// /// @odata.nextLink KeyValue pair /// - public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); + public static KeyValuePair OdataNextLink = new("@odata.nextLink", new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }); /// /// @odata.count KeyValue pair /// - public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Number, Format = "int64", Nullable = true }); + public static KeyValuePair OdataCount = new("@odata.count", new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = "int64"}); /// /// @odata.deltaLink KeyValue pair /// - public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = JsonSchemaType.String, Nullable = true }); + public static KeyValuePair OdataDeltaLink = new("@odata.deltaLink", new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }); } } diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs index 2cde5f744..562cc2c1a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiEdmTypeSchemaGeneratorTest.cs @@ -405,19 +405,15 @@ public void CreateEdmTypeSchemaReturnSchemaForDecimal(bool isNullable, bool IEEE Assert.Null(schema.Type); Assert.NotNull(schema.OneOf); Assert.Equal(2, schema.OneOf.Count); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); - Assert.NotNull(numberSchema); - Assert.True(numberSchema.Nullable); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); - Assert.NotNull(stringSchema); - Assert.True(stringSchema.Nullable); - Assert.False(schema.Nullable); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.Number | JsonSchemaType.Null)); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.String | JsonSchemaType.Null)); + Assert.NotEqual(JsonSchemaType.Null, schema.Type & JsonSchemaType.Null); } else { - Assert.Equal(JsonSchemaType.Number, schema.Type); + Assert.Equal(JsonSchemaType.Number, schema.Type & JsonSchemaType.Number); Assert.Null(schema.OneOf); - Assert.Equal(isNullable, schema.Nullable); + Assert.Equal(isNullable, (schema.Type & JsonSchemaType.Null) is JsonSchemaType.Null); } } @@ -448,19 +444,15 @@ public void CreateEdmTypeSchemaReturnSchemaForInt64(bool isNullable, bool IEEE75 Assert.Null(schema.Type); Assert.NotNull(schema.OneOf); Assert.Equal(2, schema.OneOf.Count); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); - Assert.NotNull(numberSchema); - Assert.True(numberSchema.Nullable); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); - Assert.NotNull(stringSchema); - Assert.True(stringSchema.Nullable); - Assert.False(schema.Nullable); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.Number | JsonSchemaType.Null)); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.String | JsonSchemaType.Null)); + Assert.NotEqual(JsonSchemaType.Null, schema.Type & JsonSchemaType.Null); } else { - Assert.Equal(JsonSchemaType.Number, schema.Type); + Assert.Equal(JsonSchemaType.Number, schema.Type & JsonSchemaType.Number); Assert.Null(schema.AnyOf); - Assert.Equal(isNullable, schema.Nullable); + Assert.Equal(isNullable, (schema.Type & JsonSchemaType.Null) is JsonSchemaType.Null); } } @@ -516,16 +508,11 @@ public void CreateEdmTypeSchemaReturnSchemaForDouble(bool isNullable) // & Assert Assert.Null(schema.Type); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.Number)); - Assert.NotNull(numberSchema); - Assert.True(numberSchema.Nullable); - Assert.Equal("double", numberSchema.Format, StringComparer.OrdinalIgnoreCase); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.Number | JsonSchemaType.Null) && x.Format.Equals("double", StringComparison.OrdinalIgnoreCase)); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type.Equals(JsonSchemaType.String)); - Assert.NotNull(stringSchema); - Assert.True(stringSchema.Nullable); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.String | JsonSchemaType.Null)); - Assert.False(schema.Nullable); + Assert.NotEqual(JsonSchemaType.Null, schema.Type & JsonSchemaType.Null); Assert.Null(schema.AnyOf); @@ -550,16 +537,11 @@ public void CreateEdmTypeSchemaReturnSchemaForSingle(bool isNullable) // & Assert Assert.Null(schema.Type); - var numberSchema = schema.OneOf.FirstOrDefault(x => x.Type != null && x.Type.HasValue && (x.Type & JsonSchemaType.Number) is JsonSchemaType.Number); - Assert.NotNull(numberSchema); - Assert.True(numberSchema.Nullable); - Assert.Equal("float", numberSchema.Format, StringComparer.OrdinalIgnoreCase); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.Number | JsonSchemaType.Null) && x.Format.Equals("float", StringComparison.OrdinalIgnoreCase)); - var stringSchema = schema.OneOf.FirstOrDefault(x => x.Type != null && x.Type.HasValue && (x.Type & JsonSchemaType.String) is JsonSchemaType.String); - Assert.NotNull(stringSchema); - Assert.True(stringSchema.Nullable); - - Assert.False(schema.Nullable); + Assert.Single(schema.OneOf, x => x.Type.Equals(JsonSchemaType.String | JsonSchemaType.Null)); + + Assert.NotEqual(JsonSchemaType.Null, schema.Type & JsonSchemaType.Null); Assert.Null(schema.AnyOf); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index 49aad3ba3..c778f904d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -95,7 +95,7 @@ public void CreateRequestBodyForActionImportReturnCorrectRequestBody() Assert.NotNull(schema.Properties); var parameter = Assert.Single(schema.Properties); Assert.Equal("param", parameter.Key); - Assert.Equal(JsonSchemaType.String, parameter.Value.Type); + Assert.Equal(JsonSchemaType.String | JsonSchemaType.Null, parameter.Value.Type); } [Fact] @@ -156,7 +156,7 @@ public void CreateRequestBodyForActionReturnCorrectRequestBody() Assert.NotNull(schema.Properties); var parameter = Assert.Single(schema.Properties); Assert.Equal("param", parameter.Key); - Assert.Equal(JsonSchemaType.String, parameter.Value.Type); + Assert.Equal(JsonSchemaType.String | JsonSchemaType.Null, parameter.Value.Type); } [Fact] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index e1b801e6e..9774886f2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -537,7 +537,7 @@ public async Task CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.Equal("Price", property.Key); Assert.Equal("decimal", property.Value.OneOf.FirstOrDefault(x => !string.IsNullOrEmpty(x.Format))?.Format); Assert.NotNull(property.Value.OneOf); - Assert.Equal([JsonSchemaType.Number, JsonSchemaType.String], property.Value.OneOf.Select(e => e.Type)); + Assert.Equal([JsonSchemaType.Number | JsonSchemaType.Null, JsonSchemaType.String | JsonSchemaType.Null], property.Value.OneOf.Select(e => e.Type)); Assert.Equal("Complex type 'Tree' description.", declaredSchema.Description); Assert.Equal("Tree", declaredSchema.Title); @@ -950,6 +950,7 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp "default": "yellow" } """, + _ => throw new NotSupportedException() }); Assert.True(JsonNode.DeepEquals(expected, JsonNode.Parse(json))); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json index 24a0baa40..2a2e75db6 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json @@ -966,7 +966,8 @@ "x-ms-primary-error-message": true }, "target": { - "type": "string" + "type": "string", + "x-nullable": true }, "details": { "type": "array", @@ -993,7 +994,8 @@ "type": "string" }, "target": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -1012,7 +1014,8 @@ "type": "string" }, "@odata.type": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -1029,6 +1032,7 @@ }, "ReferenceNumeric": { "type": "string", + "x-nullable": true, "enum": [ "-INF", "INF", 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 f4087138d..81966d75c 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 @@ -637,6 +637,7 @@ definitions: x-ms-primary-error-message: true target: type: string + x-nullable: true details: type: array items: @@ -655,6 +656,7 @@ definitions: type: string target: type: string + x-nullable: true DefaultNs.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -668,6 +670,7 @@ definitions: type: string '@odata.type': type: string + x-nullable: true ReferenceCreate: type: object properties: @@ -677,6 +680,7 @@ definitions: type: object ReferenceNumeric: type: string + x-nullable: true enum: - '-INF' - INF diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml index 7614a033a..7f9acd1c8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.yaml @@ -659,8 +659,8 @@ components: type: string x-ms-primary-error-message: true target: - nullable: true type: string + nullable: true details: type: array items: @@ -678,8 +678,8 @@ components: message: type: string target: - nullable: true type: string + nullable: true DefaultNs.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -692,8 +692,8 @@ components: '@odata.id': type: string '@odata.type': - nullable: true type: string + nullable: true ReferenceCreate: type: object properties: @@ -706,8 +706,8 @@ components: - '-INF' - INF - NaN - nullable: true type: string + nullable: true DefaultNs.Color: title: Color enum: diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json index 23c7cd2a2..a7e0d8abc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.V2.json @@ -12,10 +12,10 @@ "paths": { }, "definitions": { "ODataErrors.ODataError": { + "type": "object", "required": [ "error" ], - "type": "object", "properties": { "error": { "$ref": "#/definitions/ODataErrors.MainError" @@ -23,11 +23,11 @@ } }, "ODataErrors.MainError": { + "type": "object", "required": [ "code", "message" ], - "type": "object", "properties": { "code": { "type": "string" @@ -37,7 +37,8 @@ "x-ms-primary-error-message": true }, "target": { - "type": "string" + "type": "string", + "x-nullable": true }, "details": { "type": "array", @@ -51,11 +52,11 @@ } }, "ODataErrors.ErrorDetails": { + "type": "object", "required": [ "code", "message" ], - "type": "object", "properties": { "code": { "type": "string" @@ -64,17 +65,18 @@ "type": "string" }, "target": { - "type": "string" + "type": "string", + "x-nullable": true } } }, "ODataErrors.InnerError": { - "description": "The structure of this object is service-specific", - "type": "object" + "type": "object", + "description": "The structure of this object is service-specific" }, "ODataCountResponse": { - "format": "int64", - "type": "number" + "type": "number", + "format": "int64" }, "ReferenceUpdate": { "type": "object", @@ -83,7 +85,8 @@ "type": "string" }, "@odata.type": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -99,12 +102,13 @@ } }, "ReferenceNumeric": { + "type": "string", + "x-nullable": true, "enum": [ "-INF", "INF", "NaN" - ], - "type": "string" + ] } }, "parameters": { 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 df22b9f6a..9692922eb 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 @@ -28,6 +28,7 @@ definitions: x-ms-primary-error-message: true target: type: string + x-nullable: true details: type: array items: @@ -46,6 +47,7 @@ definitions: type: string target: type: string + x-nullable: true ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -59,6 +61,7 @@ definitions: type: string '@odata.type': type: string + x-nullable: true ReferenceCreate: type: object properties: @@ -68,6 +71,7 @@ definitions: type: object ReferenceNumeric: type: string + x-nullable: true enum: - '-INF' - INF diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml index 1a83b68ac..6c097575d 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Empty.OpenApi.yaml @@ -27,8 +27,8 @@ components: type: string x-ms-primary-error-message: true target: - nullable: true type: string + nullable: true details: type: array items: @@ -46,8 +46,8 @@ components: message: type: string target: - nullable: true type: string + nullable: true ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -60,8 +60,8 @@ components: '@odata.id': type: string '@odata.type': - nullable: true type: string + nullable: true ReferenceCreate: type: object properties: @@ -74,8 +74,8 @@ components: - '-INF' - INF - NaN - nullable: true type: string + nullable: true responses: error: description: error diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json index 857c4a3e4..995e3e06c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json @@ -4415,7 +4415,8 @@ "x-ms-primary-error-message": true }, "target": { - "type": "string" + "type": "string", + "x-nullable": true }, "details": { "type": "array", @@ -4442,7 +4443,8 @@ "type": "string" }, "target": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -4473,7 +4475,8 @@ "type": "string" }, "@odata.type": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -4490,6 +4493,7 @@ }, "ReferenceNumeric": { "type": "string", + "x-nullable": true, "enum": [ "-INF", "INF", @@ -4507,19 +4511,24 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "Filename": { - "type": "string" + "type": "string", + "x-nullable": true }, "NumberOfRevisions": { - "type": "string" + "type": "string", + "x-nullable": true }, "Suffix": { - "type": "string" + "type": "string", + "x-nullable": true }, "DomainId": { "type": "number", @@ -4529,11 +4538,13 @@ }, "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])$" }, "ModifiedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -4585,16 +4596,20 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Number": { - "type": "string" + "type": "string", + "x-nullable": true }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "LibraryTemplateId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -4642,12 +4657,14 @@ }, "ModifiedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "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])$" }, @@ -4700,15 +4717,18 @@ }, "DocumentId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "DocumentName": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "CreationDate": { "type": "string", @@ -4726,12 +4746,14 @@ }, "ReviewedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, @@ -4740,12 +4762,14 @@ }, "ApprovedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, @@ -4754,12 +4778,14 @@ }, "RejectedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, @@ -4807,10 +4833,12 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "CreationDate": { "type": "string", @@ -4843,7 +4871,8 @@ "title": "DocumentTagRelDto", "properties": { "Name": { - "type": "string" + "type": "string", + "x-nullable": true } }, "example": { @@ -4861,10 +4890,12 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "StatusId": { "type": "number", @@ -4879,7 +4910,8 @@ "minimum": -2147483648 }, "Keywords": { - "type": "string" + "type": "string", + "x-nullable": true }, "CreationDate": { "type": "string", @@ -4911,6 +4943,7 @@ }, "LibraryId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -4928,29 +4961,35 @@ }, "LastRevisionId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, "CheckoutPath": { - "type": "string" + "type": "string", + "x-nullable": true }, "CheckoutUserId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Number": { - "type": "string" + "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])$" }, @@ -4959,10 +4998,12 @@ "format": "decimal" }, "FileClientPath": { - "type": "string" + "type": "string", + "x-nullable": true }, "LastRevisionFileId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -4975,81 +5016,99 @@ }, "IsNa": { "type": "number", + "x-nullable": true, "format": "decimal" }, "IsRejected": { "type": "number", + "x-nullable": true, "format": "decimal" }, "IsReviewed": { "type": "number", + "x-nullable": true, "format": "decimal" }, "NaDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "NaReason": { - "type": "string" + "type": "string", + "x-nullable": true }, "RejectedDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "RejectedReason": { - "type": "string" + "type": "string", + "x-nullable": true }, "ReviewDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "SourceDocumentId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "ScraperMapId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, "SmsId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "IsApprovedOld": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Suffix": { - "type": "string" + "type": "string", + "x-nullable": true }, "ScrapeResultId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "IsApproved": { "type": "number", + "x-nullable": true, "format": "decimal" }, "CategoryId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "SectionId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5061,7 +5120,8 @@ "minimum": -2147483648 }, "LastFileName": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentClasses": { "type": "array", @@ -5324,16 +5384,19 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "ParentFolderId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Number": { - "type": "string" + "type": "string", + "x-nullable": true }, "TypeId": { "type": "number", @@ -5387,24 +5450,28 @@ }, "ProjectId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "SearchRingId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "SiteId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "AssetId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5416,31 +5483,36 @@ "type": "boolean" }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "IsTemplate": { "type": "boolean" }, "ProgramId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "SourceFolderId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "TemplateClassId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "TemplateSubType": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5456,42 +5528,49 @@ }, "StatusId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "SmsId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "ContractId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "VendorId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "OrganizationUnitId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "IncidentId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "EventId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5614,7 +5693,8 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "ModifiedBy": { "type": "number", @@ -5640,24 +5720,29 @@ }, "DomainId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "XmlName": { - "type": "string" + "type": "string", + "x-nullable": true }, "MasterId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Number": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5670,6 +5755,7 @@ }, "ParentId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -5742,10 +5828,12 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Path": { - "type": "string" + "type": "string", + "x-nullable": true }, "ModifiedBy": { "type": "number", @@ -5774,7 +5862,8 @@ "format": "decimal" }, "ActualName": { - "type": "string" + "type": "string", + "x-nullable": true }, "DomainId": { "type": "number", @@ -5784,18 +5873,21 @@ }, "SourceClassId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "ContentTypeId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "ClientPath": { - "type": "string" + "type": "string", + "x-nullable": true }, "IsSelfHosted": { "type": "number", @@ -5805,16 +5897,19 @@ }, "SmsId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "Latitude": { "type": "number", + "x-nullable": true, "format": "decimal" }, "Longitude": { "type": "number", + "x-nullable": true, "format": "decimal" }, "Documents": { @@ -5867,10 +5962,12 @@ "minimum": -2147483648 }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "CreatedBy": { "type": "number", @@ -6028,6 +6125,7 @@ }, "DocumentId": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -6055,7 +6153,8 @@ "minimum": -2147483648 }, "Remarks": { - "type": "string" + "type": "string", + "x-nullable": true }, "FileId": { "type": "number", @@ -6070,7 +6169,8 @@ "minimum": -2147483648 }, "DocumentDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentStatusDate": { "type": "string", @@ -6078,22 +6178,28 @@ "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])$" }, "DocumentFolder": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentKeywords": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentStatus": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentType": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentName": { - "type": "string" + "type": "string", + "x-nullable": true }, "DocumentNumber": { - "type": "string" + "type": "string", + "x-nullable": true }, "DomainId": { "type": "number", @@ -6111,10 +6217,12 @@ "type": "boolean" }, "ReviewDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "ReviewedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -6123,13 +6231,16 @@ "type": "boolean" }, "RejectedReason": { - "type": "string" + "type": "string", + "x-nullable": true }, "RejectedDescription": { - "type": "string" + "type": "string", + "x-nullable": true }, "RejectedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 @@ -6139,22 +6250,26 @@ }, "ApprovedBy": { "type": "number", + "x-nullable": true, "format": "int32", "maximum": 2147483647, "minimum": -2147483648 }, "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])$" }, "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])$" }, "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])$" }, 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 c925391ea..e3782d6f4 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 @@ -3122,6 +3122,7 @@ definitions: x-ms-primary-error-message: true target: type: string + x-nullable: true details: type: array items: @@ -3140,6 +3141,7 @@ definitions: type: string target: type: string + x-nullable: true Default.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -3161,6 +3163,7 @@ definitions: type: string '@odata.type': type: string + x-nullable: true ReferenceCreate: type: object properties: @@ -3170,6 +3173,7 @@ definitions: type: object ReferenceNumeric: type: string + x-nullable: true enum: - '-INF' - INF @@ -3185,14 +3189,19 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Description: type: string + x-nullable: true Filename: type: string + x-nullable: true NumberOfRevisions: type: string + x-nullable: true Suffix: type: string + x-nullable: true DomainId: type: number format: int32 @@ -3200,10 +3209,12 @@ 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])$' ModifiedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3241,12 +3252,16 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Number: type: string + x-nullable: true Description: type: string + x-nullable: true LibraryTemplateId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3285,11 +3300,13 @@ 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 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])$' Documents: @@ -3331,13 +3348,16 @@ definitions: minimum: -2147483648 DocumentId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 DocumentName: type: string + x-nullable: true DocumentDescription: type: string + x-nullable: true CreationDate: type: string format: date-time @@ -3351,33 +3371,39 @@ definitions: type: boolean ReviewedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' IsApproved: type: boolean ApprovedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' IsRejected: type: boolean RejectedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' DomainId: @@ -3418,8 +3444,10 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Description: type: string + x-nullable: true CreationDate: type: string format: date-time @@ -3446,6 +3474,7 @@ definitions: properties: Name: type: string + x-nullable: true example: Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: @@ -3459,8 +3488,10 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Description: type: string + x-nullable: true StatusId: type: number format: int32 @@ -3473,6 +3504,7 @@ definitions: minimum: -2147483648 Keywords: type: string + x-nullable: true CreationDate: type: string format: date-time @@ -3498,6 +3530,7 @@ definitions: minimum: -2147483648 LibraryId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3512,24 +3545,30 @@ 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 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])$' CheckoutPath: type: string + x-nullable: true CheckoutUserId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' FileSized: @@ -3537,8 +3576,10 @@ definitions: format: decimal FileClientPath: type: string + x-nullable: true LastRevisionFileId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3549,64 +3590,82 @@ definitions: minimum: -2147483648 IsNa: type: number + x-nullable: true format: decimal IsRejected: type: number + x-nullable: true format: decimal IsReviewed: type: number + x-nullable: true format: decimal NaDescription: type: string + x-nullable: true NaReason: type: string + x-nullable: true RejectedDescription: type: string + x-nullable: true RejectedReason: type: string + x-nullable: true ReviewDescription: type: string + x-nullable: true SourceDocumentId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 ScraperMapId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' SmsId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 IsApprovedOld: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 Suffix: type: string + x-nullable: true ScrapeResultId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 IsApproved: type: number + x-nullable: true format: decimal CategoryId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 SectionId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3617,6 +3676,7 @@ definitions: minimum: -2147483648 LastFileName: type: string + x-nullable: true DocumentClasses: type: array items: @@ -3821,13 +3881,16 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true ParentFolderId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 Number: type: string + x-nullable: true TypeId: type: number format: int32 @@ -3871,21 +3934,25 @@ definitions: minimum: -2147483648 ProjectId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 SearchRingId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 SiteId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 AssetId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3895,25 +3962,30 @@ definitions: type: boolean Description: type: string + x-nullable: true IsTemplate: type: boolean ProgramId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 SourceFolderId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 TemplateClassId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 TemplateSubType: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -3926,36 +3998,43 @@ definitions: minimum: -2147483648 StatusId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 SmsId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 ContractId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 VendorId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 OrganizationUnitId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 IncidentId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 EventId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4051,6 +4130,7 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true ModifiedBy: type: number format: int32 @@ -4071,20 +4151,25 @@ 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 Description: type: string + x-nullable: true XmlName: type: string + x-nullable: true MasterId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 Number: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4095,6 +4180,7 @@ definitions: minimum: -2147483648 ParentId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4148,8 +4234,10 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Path: type: string + x-nullable: true ModifiedBy: type: number format: int32 @@ -4173,6 +4261,7 @@ definitions: format: decimal ActualName: type: string + x-nullable: true DomainId: type: number format: int32 @@ -4180,16 +4269,19 @@ definitions: minimum: -2147483648 SourceClassId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 ContentTypeId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 ClientPath: type: string + x-nullable: true IsSelfHosted: type: number format: int16 @@ -4197,14 +4289,17 @@ definitions: minimum: -32768 SmsId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 Latitude: type: number + x-nullable: true format: decimal Longitude: type: number + x-nullable: true format: decimal Documents: type: array @@ -4247,8 +4342,10 @@ definitions: minimum: -2147483648 Name: type: string + x-nullable: true Description: type: string + x-nullable: true CreatedBy: type: number format: int32 @@ -4357,6 +4454,7 @@ definitions: minimum: -2147483648 DocumentId: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4380,6 +4478,7 @@ definitions: minimum: -2147483648 Remarks: type: string + x-nullable: true FileId: type: number format: int32 @@ -4392,22 +4491,29 @@ definitions: minimum: -2147483648 DocumentDescription: type: string + x-nullable: true DocumentStatusDate: type: string 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])$' DocumentFolder: type: string + x-nullable: true DocumentKeywords: type: string + x-nullable: true DocumentStatus: type: string + x-nullable: true DocumentType: type: string + x-nullable: true DocumentName: type: string + x-nullable: true DocumentNumber: type: string + x-nullable: true DomainId: type: number format: int32 @@ -4422,8 +4528,10 @@ definitions: type: boolean ReviewDescription: type: string + x-nullable: true ReviewedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4431,10 +4539,13 @@ definitions: type: boolean RejectedReason: type: string + x-nullable: true RejectedDescription: type: string + x-nullable: true RejectedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 @@ -4442,19 +4553,23 @@ definitions: type: boolean ApprovedBy: type: number + x-nullable: true format: int32 maximum: 2147483647 minimum: -2147483648 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])$' 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])$' 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])$' 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 dd2d13b7d..122dee965 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 @@ -3241,8 +3241,8 @@ components: type: string x-ms-primary-error-message: true target: - nullable: true type: string + nullable: true details: type: array items: @@ -3260,8 +3260,8 @@ components: message: type: string target: - nullable: true type: string + nullable: true Default.ODataErrors.InnerError: type: object description: The structure of this object is service-specific @@ -3282,8 +3282,8 @@ components: '@odata.id': type: string '@odata.type': - nullable: true type: string + nullable: true ReferenceCreate: type: object properties: @@ -3296,8 +3296,8 @@ components: - '-INF' - INF - NaN - nullable: true type: string + nullable: true Siterra.Documents.App.DTO.DocumentDto: title: DocumentDto type: object @@ -3308,20 +3308,20 @@ components: type: number format: int32 Name: - nullable: true type: string - Description: nullable: true + Description: type: string - Filename: nullable: true + Filename: type: string - NumberOfRevisions: nullable: true + NumberOfRevisions: type: string - Suffix: nullable: true + Suffix: type: string + nullable: true DomainId: maximum: 2147483647 minimum: -2147483648 @@ -3329,14 +3329,14 @@ components: format: int32 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])$' - nullable: true type: string + nullable: true format: date-time ModifiedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Tags: type: array @@ -3371,19 +3371,19 @@ components: type: number format: int32 Name: - nullable: true type: string - Number: nullable: true + Number: type: string - Description: nullable: true + Description: type: string + nullable: true LibraryTemplateId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ParentTypeId: maximum: 2147483647 @@ -3421,13 +3421,13 @@ components: ModifiedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time Documents: type: array @@ -3469,15 +3469,15 @@ components: DocumentId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 DocumentName: - nullable: true type: string - DocumentDescription: nullable: true + DocumentDescription: type: string + nullable: true CreationDate: 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 @@ -3492,39 +3492,39 @@ components: ReviewedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time IsRejected: type: boolean RejectedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time DomainId: maximum: 2147483647 @@ -3567,11 +3567,11 @@ components: type: number format: int32 Name: - nullable: true type: string - Description: nullable: true + Description: type: string + nullable: true CreationDate: 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 @@ -3597,8 +3597,8 @@ components: type: object properties: Name: - nullable: true type: string + nullable: true example: Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: @@ -3611,11 +3611,11 @@ components: type: number format: int32 Name: - nullable: true type: string - Description: nullable: true + Description: type: string + nullable: true StatusId: maximum: 2147483647 minimum: -2147483648 @@ -3627,8 +3627,8 @@ components: type: number format: int32 Keywords: - nullable: true type: string + nullable: true CreationDate: 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 @@ -3655,8 +3655,8 @@ components: LibraryId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 OwnerUserId: maximum: 2147483647 @@ -3670,42 +3670,42 @@ components: LastRevisionId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time CheckoutPath: - nullable: true type: string + nullable: true CheckoutUserId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Number: - nullable: true 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])$' - nullable: true type: string + nullable: true format: date-time FileSized: type: number format: decimal FileClientPath: - nullable: true type: string + nullable: true LastRevisionFileId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsDeleted: maximum: 2147483647 @@ -3713,85 +3713,85 @@ components: type: number format: int32 IsNa: - nullable: true type: number + nullable: true format: decimal IsRejected: - nullable: true type: number + nullable: true format: decimal IsReviewed: - nullable: true type: number + nullable: true format: decimal NaDescription: - nullable: true type: string - NaReason: nullable: true + NaReason: type: string - RejectedDescription: nullable: true + RejectedDescription: type: string - RejectedReason: nullable: true + RejectedReason: type: string - ReviewDescription: nullable: true + ReviewDescription: type: string + nullable: true SourceDocumentId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ScraperMapId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time SmsId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsApprovedOld: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Suffix: - nullable: true type: string + nullable: true ScrapeResultId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsApproved: - nullable: true type: number + nullable: true format: decimal CategoryId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 SectionId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 VersionCount: maximum: 2147483647 @@ -3799,8 +3799,8 @@ components: type: number format: int32 LastFileName: - nullable: true type: string + nullable: true DocumentClasses: type: array items: @@ -4028,17 +4028,17 @@ components: type: number format: int32 Name: - nullable: true type: string + nullable: true ParentFolderId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Number: - nullable: true type: string + nullable: true TypeId: maximum: 2147483647 minimum: -2147483648 @@ -4083,59 +4083,59 @@ components: ProjectId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 SearchRingId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 SiteId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 AssetId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 AllowMultiple: type: boolean AutoCreate: type: boolean Description: - nullable: true type: string + nullable: true IsTemplate: type: boolean ProgramId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 SourceFolderId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 TemplateClassId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 TemplateSubType: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsHidden: type: boolean @@ -4147,44 +4147,44 @@ components: StatusId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 SmsId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ContractId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 VendorId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 OrganizationUnitId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IncidentId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 EventId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ClassInstance: maximum: 2147483647 @@ -4289,8 +4289,8 @@ components: type: number format: int32 Name: - nullable: true type: string + nullable: true ModifiedBy: maximum: 2147483647 minimum: -2147483648 @@ -4312,26 +4312,26 @@ components: DomainId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Description: - nullable: true type: string - XmlName: nullable: true + XmlName: type: string + nullable: true MasterId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Number: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ClassId: maximum: 2147483647 @@ -4341,8 +4341,8 @@ components: ParentId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 HasChanged: type: boolean @@ -4401,11 +4401,11 @@ components: type: number format: int32 Name: - nullable: true type: string - Path: nullable: true + Path: type: string + nullable: true ModifiedBy: maximum: 2147483647 minimum: -2147483648 @@ -4428,8 +4428,8 @@ components: type: number format: decimal ActualName: - nullable: true type: string + nullable: true DomainId: maximum: 2147483647 minimum: -2147483648 @@ -4438,18 +4438,18 @@ components: SourceClassId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ContentTypeId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 ClientPath: - nullable: true type: string + nullable: true IsSelfHosted: maximum: 32767 minimum: -32768 @@ -4458,16 +4458,16 @@ components: SmsId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 Latitude: - nullable: true type: number + nullable: true format: decimal Longitude: - nullable: true type: number + nullable: true format: decimal Documents: type: array @@ -4509,11 +4509,11 @@ components: type: number format: int32 Name: - nullable: true type: string - Description: nullable: true + Description: type: string + nullable: true CreatedBy: maximum: 2147483647 minimum: -2147483648 @@ -4623,8 +4623,8 @@ components: DocumentId: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' @@ -4645,8 +4645,8 @@ components: type: number format: int32 Remarks: - nullable: true type: string + nullable: true FileId: maximum: 2147483647 minimum: -2147483648 @@ -4658,30 +4658,30 @@ components: type: number format: int32 DocumentDescription: - nullable: true type: string + nullable: true DocumentStatusDate: 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 format: date-time DocumentFolder: - nullable: true type: string - DocumentKeywords: nullable: true + DocumentKeywords: type: string - DocumentStatus: nullable: true + DocumentStatus: type: string - DocumentType: nullable: true + DocumentType: type: string - DocumentName: nullable: true + DocumentName: type: string - DocumentNumber: nullable: true + DocumentNumber: type: string + nullable: true DomainId: maximum: 2147483647 minimum: -2147483648 @@ -4695,50 +4695,50 @@ components: IsReviewed: type: boolean ReviewDescription: - nullable: true type: string + nullable: true ReviewedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsRejected: type: boolean RejectedReason: - nullable: true type: string - RejectedDescription: nullable: true + RejectedDescription: type: string + nullable: true RejectedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 IsApproved: type: boolean ApprovedBy: maximum: 2147483647 minimum: -2147483648 - nullable: true type: number + nullable: true format: int32 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])$' - nullable: true type: string + nullable: true format: date-time 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])$' - nullable: true type: string + nullable: true format: date-time 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])$' - nullable: true type: string + nullable: true format: date-time Document: anyOf: diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json index 2a1aa2324..3545b6b3a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json @@ -1309,14 +1309,12 @@ "in": "path", "name": "lat", "required": true, - "type": "number", "format": "double" }, { "in": "path", "name": "lon", "required": true, - "type": "number", "format": "double" } ], @@ -31982,7 +31980,8 @@ "x-ms-primary-error-message": true }, "target": { - "type": "string" + "type": "string", + "x-nullable": true }, "details": { "type": "array", @@ -32009,7 +32008,8 @@ "type": "string" }, "target": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -32019,11 +32019,13 @@ "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])$" }, "RequestId": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -32050,7 +32052,8 @@ "type": "string" }, "@odata.type": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -32067,6 +32070,7 @@ }, "ReferenceNumeric": { "type": "string", + "x-nullable": true, "enum": [ "-INF", "INF", @@ -32084,10 +32088,12 @@ "type": "string" }, "LastName": { - "type": "string" + "type": "string", + "x-nullable": true }, "MiddleName": { - "type": "string" + "type": "string", + "x-nullable": true }, "Gender": { "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender" @@ -32097,6 +32103,7 @@ "allOf": [ { "type": "number", + "x-nullable": true, "format": "int64" } ] @@ -32104,7 +32111,8 @@ "Emails": { "type": "array", "items": { - "type": "string" + "type": "string", + "x-nullable": true } }, "AddressInfo": { @@ -32127,6 +32135,7 @@ }, "Photo": { "type": "string", + "x-nullable": true, "format": "base64url" }, "Friends": { @@ -32158,7 +32167,8 @@ "type": "string" }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -32167,13 +32177,15 @@ "title": "Airport", "properties": { "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "IcaoCode": { "type": "string" }, "IataCode": { - "type": "string" + "type": "string", + "x-nullable": true }, "Location": { "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" @@ -32185,7 +32197,8 @@ "title": "Location", "properties": { "Address": { - "type": "string" + "type": "string", + "x-nullable": true }, "City": { "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" @@ -32197,13 +32210,16 @@ "title": "City", "properties": { "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "CountryRegion": { - "type": "string" + "type": "string", + "x-nullable": true }, "Region": { - "type": "string" + "type": "string", + "x-nullable": true } } }, @@ -32236,7 +32252,8 @@ "title": "EventLocation", "properties": { "BuildingInfo": { - "type": "string" + "type": "string", + "x-nullable": true } } } @@ -32258,24 +32275,28 @@ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "Name": { - "type": "string" + "type": "string", + "x-nullable": true }, "Budget": { "format": "float", "allOf": [ { "type": "number", + "x-nullable": true, "format": "float" } ] }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true }, "Tags": { "type": "array", "items": { - "type": "string" + "type": "string", + "x-nullable": true } }, "TripData": { }, @@ -32313,7 +32334,8 @@ "minimum": -2147483648 }, "ConfirmationCode": { - "type": "string" + "type": "string", + "x-nullable": true }, "StartsAt": { "type": "string", @@ -32345,7 +32367,8 @@ "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation" }, "Description": { - "type": "string" + "type": "string", + "x-nullable": true } } } @@ -32361,7 +32384,8 @@ "title": "PublicTransportation", "properties": { "SeatNumber": { - "type": "string" + "type": "string", + "x-nullable": true } } } @@ -32377,7 +32401,8 @@ "title": "Flight", "properties": { "FlightNumber": { - "type": "string" + "type": "string", + "x-nullable": true }, "Airline": { "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline" @@ -32406,6 +32431,7 @@ "allOf": [ { "type": "number", + "x-nullable": true, "format": "int64" } ] @@ -32435,6 +32461,7 @@ "allOf": [ { "type": "number", + "x-nullable": true, "format": "int64" } ] 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 39a8cd5ac..dda54ba8b 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 @@ -863,12 +863,10 @@ paths: - in: path name: lat required: true - type: number format: double - in: path name: lon required: true - type: number format: double responses: '200': @@ -21725,6 +21723,7 @@ definitions: x-ms-primary-error-message: true target: type: string + x-nullable: true details: type: array items: @@ -21743,16 +21742,19 @@ definitions: type: string target: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: type: object title: InnerError 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])$' RequestId: type: string + x-nullable: true ODataCountResponse: type: number format: int64 @@ -21771,6 +21773,7 @@ definitions: type: string '@odata.type': type: string + x-nullable: true ReferenceCreate: type: object properties: @@ -21780,6 +21783,7 @@ definitions: type: object ReferenceNumeric: type: string + x-nullable: true enum: - '-INF' - INF @@ -21794,19 +21798,23 @@ definitions: type: string LastName: type: string + x-nullable: true MiddleName: type: string + x-nullable: true Gender: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' Age: format: int64 allOf: - type: number + x-nullable: true format: int64 Emails: type: array items: type: string + x-nullable: true AddressInfo: type: array items: @@ -21821,6 +21829,7 @@ definitions: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Photo: type: string + x-nullable: true format: base64url Friends: type: array @@ -21844,16 +21853,19 @@ definitions: type: string Name: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: type: object title: Airport properties: Name: type: string + x-nullable: true IcaoCode: type: string IataCode: type: string + x-nullable: true Location: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: @@ -21862,6 +21874,7 @@ definitions: properties: Address: type: string + x-nullable: true City: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: @@ -21870,10 +21883,13 @@ definitions: properties: Name: type: string + x-nullable: true CountryRegion: type: string + x-nullable: true Region: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' @@ -21892,6 +21908,7 @@ definitions: properties: BuildingInfo: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: type: object title: Trip @@ -21907,17 +21924,21 @@ definitions: pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' Name: type: string + x-nullable: true Budget: format: float allOf: - type: number + x-nullable: true format: float Description: type: string + x-nullable: true Tags: type: array items: type: string + x-nullable: true TripData: { } DestinationInfo: type: array @@ -21946,6 +21967,7 @@ definitions: minimum: -2147483648 ConfirmationCode: type: string + x-nullable: true StartsAt: type: string format: date-time @@ -21968,6 +21990,7 @@ definitions: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' Description: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' @@ -21976,6 +21999,7 @@ definitions: properties: SeatNumber: type: string + x-nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: allOf: - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' @@ -21984,6 +22008,7 @@ definitions: properties: FlightNumber: type: string + x-nullable: true Airline: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' From: @@ -22000,6 +22025,7 @@ definitions: format: int64 allOf: - type: number + x-nullable: true format: int64 Peers: type: array @@ -22016,6 +22042,7 @@ definitions: format: int64 allOf: - type: number + x-nullable: true format: int64 BossOffice: $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' 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 91dc8fc0d..1043ced16 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -893,22 +893,22 @@ paths: required: true schema: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: double - - nullable: true - type: string + - type: string + nullable: true - $ref: '#/components/schemas/ReferenceNumeric' - name: lon in: path required: true schema: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: double - - nullable: true - type: string + - type: string + nullable: true - $ref: '#/components/schemas/ReferenceNumeric' responses: '200': @@ -22539,8 +22539,8 @@ components: type: string x-ms-primary-error-message: true target: - nullable: true type: string + nullable: true details: type: array items: @@ -22558,20 +22558,20 @@ components: message: type: string target: - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.ODataErrors.InnerError: title: InnerError type: object properties: 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])$' - nullable: true type: string + nullable: true format: date-time RequestId: - nullable: true type: string + nullable: true ODataCountResponse: type: number format: int64 @@ -22589,8 +22589,8 @@ components: '@odata.id': type: string '@odata.type': - nullable: true type: string + nullable: true ReferenceCreate: type: object properties: @@ -22603,8 +22603,8 @@ components: - '-INF' - INF - NaN - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person: title: Person type: object @@ -22614,25 +22614,25 @@ components: FirstName: type: string LastName: - nullable: true type: string - MiddleName: nullable: true + MiddleName: type: string + nullable: true Gender: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender' Age: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: int64 - - nullable: true - type: string + - type: string + nullable: true Emails: type: array items: - nullable: true type: string + nullable: true AddressInfo: type: array items: @@ -22649,8 +22649,8 @@ components: items: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Photo: - nullable: true type: string + nullable: true format: base64url Friends: type: array @@ -22678,20 +22678,20 @@ components: AirlineCode: type: string Name: - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: title: Airport type: object properties: Name: - nullable: true type: string + nullable: true IcaoCode: type: string IataCode: - nullable: true type: string + nullable: true Location: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' @@ -22702,8 +22702,8 @@ components: type: object properties: Address: - nullable: true type: string + nullable: true City: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' @@ -22714,14 +22714,14 @@ components: type: object properties: Name: - nullable: true type: string - CountryRegion: nullable: true + CountryRegion: type: string - Region: nullable: true + Region: type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' @@ -22744,8 +22744,8 @@ components: type: object properties: BuildingInfo: - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: title: Trip type: object @@ -22760,24 +22760,24 @@ components: type: string format: uuid Name: - nullable: true type: string + nullable: true Budget: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: float - - nullable: true - type: string + - type: string + nullable: true - $ref: '#/components/schemas/ReferenceNumeric' Description: - nullable: true type: string + nullable: true Tags: type: array items: - nullable: true type: string + nullable: true TripData: { } DestinationInfo: type: array @@ -22805,8 +22805,8 @@ components: type: number format: int32 ConfirmationCode: - nullable: true type: string + nullable: true 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])$' type: string @@ -22831,8 +22831,8 @@ components: - nullable: true type: object Description: - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' @@ -22840,8 +22840,8 @@ components: type: object properties: SeatNumber: - nullable: true type: string + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: allOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' @@ -22849,8 +22849,8 @@ components: type: object properties: FlightNumber: - nullable: true type: string + nullable: true Airline: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' @@ -22877,11 +22877,11 @@ components: properties: Cost: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: int64 - - nullable: true - type: string + - type: string + nullable: true Peers: type: array items: @@ -22895,11 +22895,11 @@ components: properties: Budget: oneOf: - - nullable: true - type: number + - type: number + nullable: true format: int64 - - nullable: true - type: string + - type: string + nullable: true BossOffice: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' From c53ed520bafd7632d8816cbaf3162b1a157c0279 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 5 Feb 2025 15:25:26 -0500 Subject: [PATCH 102/103] chore: updates oai.net reference --- .../Microsoft.OpenAPI.OData.Reader.csproj | 2 +- src/OoasGui/OoasGui.csproj | 2 +- .../Microsoft.OpenAPI.OData.Reader.Tests.csproj | 2 +- tool/UpdateDocs/UpdateDocs.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 052fc0b97..3a8e8260e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -54,7 +54,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/OoasGui/OoasGui.csproj b/src/OoasGui/OoasGui.csproj index 9b96180cb..52d080615 100644 --- a/src/OoasGui/OoasGui.csproj +++ b/src/OoasGui/OoasGui.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj index 2a22ccac9..c9fb7ef59 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Microsoft.OpenAPI.OData.Reader.Tests.csproj @@ -89,7 +89,7 @@ all - + diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj index 8d619f751..7417833d0 100644 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ b/tool/UpdateDocs/UpdateDocs.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file From 67226d52ced8e1902bcf0b463d848be89c3d2e44 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 5 Feb 2025 16:35:40 -0500 Subject: [PATCH 103/103] chore: removes passing reference to document across workflow --- .../Common/EdmModelHelper.cs | 6 +- .../Common/OpenApiOperationExtensions.cs | 14 +- .../Edm/ODataContext.cs | 4 +- .../Generator/OpenApiDocumentGenerator.cs | 2 + .../OpenApiEdmTypeSchemaGenerator.cs | 89 ++++++------ .../Generator/OpenApiErrorSchemaGenerator.cs | 26 ++-- .../Generator/OpenApiExampleGenerator.cs | 6 +- .../Generator/OpenApiParameterGenerator.cs | 95 +++++-------- .../Generator/OpenApiPathItemGenerator.cs | 2 +- .../Generator/OpenApiRequestBodyGenerator.cs | 28 ++-- .../Generator/OpenApiResponseGenerator.cs | 69 +++++----- .../Generator/OpenApiSchemaGenerator.cs | 80 +++++------ .../OpenApiSecurityRequirementGenerator.cs | 6 +- .../OpenApiSpatialTypeSchemaGenerator.cs | 127 ++++++++---------- .../CachedOperationHandlerProvider.cs | 37 +++++ .../ComplexPropertyBaseOperationHandler.cs | 10 +- .../ComplexPropertyGetOperationHandler.cs | 24 ++-- .../ComplexPropertyPatchOperationHandler.cs | 8 -- .../ComplexPropertyPostOperationHandler.cs | 14 +- .../ComplexPropertyPutOperationHandler.cs | 8 -- .../ComplexPropertyUpdateOperationHandler.cs | 15 +-- .../DollarCountGetOperationHandler.cs | 18 +-- .../EdmActionImportOperationHandler.cs | 10 +- .../Operation/EdmActionOperationHandler.cs | 12 +- .../EdmFunctionImportOperationHandler.cs | 12 +- .../Operation/EdmFunctionOperationHandler.cs | 8 -- .../EdmOperationImportOperationHandler.cs | 14 +- .../Operation/EdmOperationOperationHandler.cs | 24 ++-- .../Operation/EntityDeleteOperationHandler.cs | 12 +- .../Operation/EntityGetOperationHandler.cs | 16 +-- .../Operation/EntityPatchOperationHandler.cs | 8 -- .../Operation/EntityPutOperationHandler.cs | 8 -- .../Operation/EntitySetGetOperationHandler.cs | 24 ++-- .../Operation/EntitySetOperationHandler.cs | 10 +- .../EntitySetPostOperationHandler.cs | 16 +-- .../Operation/EntityUpdateOperationHandler.cs | 16 +-- .../Operation/IOperationHandlerProvider.cs | 3 +- .../MediaEntityDeleteOperationHandler.cs | 12 +- .../MediaEntityGetOperationHandler.cs | 12 +- .../MediaEntityOperationalHandler.cs | 10 +- .../MediaEntityPutOperationHandler.cs | 16 +-- .../Operation/MetadataGetOperationHandler.cs | 10 +- ...avigationPropertyDeleteOperationHandler.cs | 12 +- .../NavigationPropertyGetOperationHandler.cs | 28 ++-- .../NavigationPropertyOperationHandler.cs | 12 +- ...NavigationPropertyPatchOperationHandler.cs | 8 -- .../NavigationPropertyPostOperationHandler.cs | 16 +-- .../NavigationPropertyPutOperationHandler.cs | 8 -- ...avigationPropertyUpdateOperationHandler.cs | 14 +- .../ODataTypeCastGetOperationHandler.cs | 28 ++-- .../Operation/OperationHandler.cs | 14 +- .../Operation/OperationHandlerProvider.cs | 65 +++++---- .../Operation/RefDeleteOperationHandler.cs | 12 +- .../Operation/RefGetOperationHandler.cs | 24 ++-- .../Operation/RefPostOperationHandler.cs | 14 +- .../Operation/RefPutOperationHandler.cs | 14 +- .../Operation/SingletonGetOperationHandler.cs | 16 +-- .../Operation/SingletonOperationHandler.cs | 10 +- .../SingletonPatchOperationHandler.cs | 16 +-- .../PathItem/CachedPathItemHandlerProvider.cs | 33 +++++ .../PathItem/ComplexPropertyItemHandler.cs | 8 -- .../PathItem/DollarCountPathItemHandler.cs | 8 -- .../PathItem/EntityPathItemHandler.cs | 8 -- .../PathItem/EntitySetPathItemHandler.cs | 8 -- .../PathItem/IPathItemHandlerProvider.cs | 3 +- .../PathItem/MediaEntityPathItemHandler.cs | 8 -- .../PathItem/MetadataPathItemHandler.cs | 8 -- .../NavigationPropertyPathItemHandler.cs | 8 -- .../PathItem/ODataTypeCastPathItemHandler.cs | 8 -- .../OperationImportPathItemHandler.cs | 8 -- .../PathItem/OperationPathItemHandler.cs | 8 -- .../PathItem/PathItemHandler.cs | 14 +- .../PathItem/PathItemHandlerProvider.cs | 27 ++-- .../PathItem/RefPathItemHandler.cs | 8 -- .../PathItem/SingletonPathItemHandler.cs | 8 -- .../Common/OpenApiOperationExtensionsTests.cs | 2 +- .../OpenApiErrorSchemaGeneraratorTests.cs | 4 +- .../OpenApiParameterGeneratorTests.cs | 14 +- .../OpenApiRequestBodyGeneratorTests.cs | 10 +- .../OpenApiResponseGeneratorTests.cs | 28 ++-- .../Generator/OpenApiSchemaGeneratorTests.cs | 46 +++---- .../OpenApiSpatialTypeSchemaGeneratorTest.cs | 38 +++--- ...ComplexPropertyGetOperationHandlerTests.cs | 2 +- ...mplexPropertyPatchOperationHandlerTests.cs | 2 +- ...omplexPropertyPostOperationHandlerTests.cs | 2 +- ...ComplexPropertyPutOperationHandlerTests.cs | 2 +- .../DollarCountGetOperationHandlerTests.cs | 2 +- .../EdmActionImportOperationHandlerTests.cs | 3 +- .../EdmActionOperationHandlerTests.cs | 2 +- .../EdmFunctionImportOperationHandlerTests.cs | 2 +- .../EdmFunctionOperationHandlerTests.cs | 2 +- .../EntityDeleteOperationHandlerTests.cs | 2 +- .../EntityGetOperationHandlerTests.cs | 2 +- .../EntityPatchOperationHandlerTests.cs | 2 +- .../EntityPutOperationHandlerTests.cs | 2 +- .../EntitySetGetOperationHandlerTests.cs | 2 +- .../EntitySetPostOperationHandlerTests.cs | 2 +- .../MediaEntityDeleteOperationHandlerTests.cs | 6 +- .../MediaEntityGetOperationHandlerTests.cs | 2 +- .../MediaEntityPutOperationHandlerTests.cs | 2 +- ...tionPropertyDeleteOperationHandlerTests.cs | 2 +- ...igationPropertyGetOperationHandlerTests.cs | 2 +- ...ationPropertyPatchOperationHandlerTests.cs | 2 +- ...gationPropertyPostOperationHandlerTests.cs | 2 +- ...igationPropertyPutOperationHandlerTests.cs | 2 +- .../ODataTypeCastGetOperationHandlerTests.cs | 14 +- .../OperationHandlerProviderTests.cs | 3 +- .../RefDeleteOperationHandlerTests.cs | 2 +- .../Operation/RefGetOperationHandlerTests.cs | 2 +- .../Operation/RefPostOperationHandlerTests.cs | 2 +- .../Operation/RefPutOperationHandlerTests.cs | 2 +- .../SingletonGetOperationHandlerTests.cs | 2 +- .../SingletonPatchOperationHandlerTests.cs | 2 +- .../ComplexPropertyPathItemHandlerTests.cs | 2 +- .../PathItem/EntityPathItemHandlerTests.cs | 6 +- .../PathItem/EntitySetPathItemHandlerTests.cs | 4 +- .../MediaEntityPathItemHandlerTests.cs | 4 +- .../NavigationPropertyPathItemHandlerTests.cs | 2 +- .../ODataTypeCastPathItemHandlerTests.cs | 2 +- .../OperationImportPathItemHandlerTests.cs | 4 +- .../PathItem/OperationPathItemHandlerTests.cs | 2 +- .../PathItem/PathItemHandlerProviderTests.cs | 6 +- .../PathItem/RefPathItemHandlerTests.cs | 2 +- .../PathItem/SingletonPathItemHandlerTests.cs | 6 +- 124 files changed, 606 insertions(+), 1081 deletions(-) create mode 100644 src/Microsoft.OpenApi.OData.Reader/Operation/CachedOperationHandlerProvider.cs create mode 100644 src/Microsoft.OpenApi.OData.Reader/PathItem/CachedPathItemHandlerProvider.cs diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs index b3cdf8ed4..28b1d6bc4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs @@ -23,7 +23,7 @@ internal static class EdmModelHelper /// Adds the derived types references together with their base type reference in the OneOf property of an OpenAPI schema. /// /// The OpenAPI schema with the list of derived types references and their base type references set in the OneOf property. - internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType structuredType, IEdmModel edmModel, OpenApiDocument document) + internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType structuredType, IEdmModel edmModel) { Utils.CheckArgumentNull(structuredType, nameof(structuredType)); Utils.CheckArgumentNull(edmModel, nameof(edmModel)); @@ -41,12 +41,12 @@ internal static OpenApiSchema GetDerivedTypesReferenceSchema(IEdmStructuredType OneOf = new List() }; - var baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName(), document); + var baseTypeSchema = new OpenApiSchemaReference(schemaElement.FullName()); schema.OneOf.Add(baseTypeSchema); foreach (IEdmSchemaElement derivedType in derivedTypes) { - var derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName(), document); + var derivedTypeSchema = new OpenApiSchemaReference(derivedType.FullName()); schema.OneOf.Add(derivedTypeSchema); }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs index 5d5e6ca7e..e2175058c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Common/OpenApiOperationExtensions.cs @@ -23,12 +23,10 @@ internal static class OpenApiOperationExtensions /// The settings. /// Optional: Whether to add a 204 no content response. /// Optional: The OpenAPI schema of the response. - /// The OpenAPI document to lookup references. - public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, OpenApiDocument document, bool addNoContent = false, IOpenApiSchema schema = null) + public static void AddErrorResponses(this OpenApiOperation operation, OpenApiConvertSettings settings, bool addNoContent = false, IOpenApiSchema schema = null) { Utils.CheckArgumentNull(operation, nameof(operation)); Utils.CheckArgumentNull(settings, nameof(settings)); - Utils.CheckArgumentNull(document, nameof(document)); if (operation.Responses == null) { @@ -57,22 +55,22 @@ public static void AddErrorResponses(this OpenApiOperation operation, OpenApiCon } }; } - operation.Responses.Add(Constants.StatusCodeClass2XX, response ?? Constants.StatusCodeClass2XX.GetResponse(document)); + operation.Responses.Add(Constants.StatusCodeClass2XX, response ?? Constants.StatusCodeClass2XX.GetResponse()); } else { - operation.Responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse(document)); + operation.Responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse()); } } if (settings.ErrorResponsesAsDefault) { - operation.Responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse(document)); + operation.Responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse()); } else { - operation.Responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse(document)); - operation.Responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse(document)); + operation.Responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse()); + operation.Responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse()); } } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs index 8f60d1876..06df4f25f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs @@ -50,8 +50,8 @@ public ODataContext(IEdmModel model, OpenApiConvertSettings settings) visitor.Visit(model); IsSpatialTypeUsed = visitor.IsSpatialTypeUsed; - OperationHandlerProvider = new OperationHandlerProvider(); - PathItemHandlerProvider = new PathItemHandlerProvider(); + OperationHandlerProvider = new CachedOperationHandlerProvider(new OperationHandlerProvider()); + PathItemHandlerProvider = new CachedPathItemHandlerProvider(new PathItemHandlerProvider()); // If no path provider, use the default path provider. _pathProvider = settings.PathProvider ?? new ODataPathProvider(); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs index 273ae47f4..b1e393fc0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs @@ -46,6 +46,8 @@ public static OpenApiDocument CreateDocument(this ODataContext context) context.AddComponentsToDocument(doc); context.AddPathsToDocument(doc); doc.Tags = context.CreateTags(); // order matters so the operation generators have populated the tags + doc.RegisterComponents(); + doc.SetReferenceHostDocument(); return doc; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs index 50b7b1059..4982b9ba9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiEdmTypeSchemaGenerator.cs @@ -28,23 +28,20 @@ internal static class OpenApiEdmTypeSchemaGenerator /// /// The OData context. /// The Edm type reference. - /// The Open API document to lookup references. /// The created . - public static IOpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) - => CreateEdmTypeSchema(context, edmTypeReference, document, true); + public static IOpenApiSchema CreateEdmTypeSchemaForParameter(this ODataContext context, IEdmTypeReference edmTypeReference) + => CreateEdmTypeSchema(context, edmTypeReference, true); /// /// Create a for a . /// /// The OData context. /// The Edm type reference. - /// The Open API document to lookup references. /// Whether the schema is for a parameter. /// The created . - public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document, bool schemaForParameter = false) + public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdmTypeReference edmTypeReference, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(edmTypeReference, nameof(edmTypeReference)); - Utils.CheckArgumentNull(document, nameof(document)); switch (edmTypeReference.TypeKind()) { @@ -54,8 +51,8 @@ public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdm IEdmTypeReference typeRef = edmTypeReference.AsCollection().ElementType(); var schema = typeRef.TypeKind() == EdmTypeKind.Complex || typeRef.TypeKind() == EdmTypeKind.Entity - ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), document, true) - : context.CreateEdmTypeSchema(typeRef, document, schemaForParameter); + ? context.CreateStructuredTypeSchema(typeRef.AsStructured(), true) + : context.CreateEdmTypeSchema(typeRef, schemaForParameter); return new OpenApiSchema { @@ -68,22 +65,22 @@ public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdm // or as external references for types defined in referenced CSDL documents. case EdmTypeKind.Complex: case EdmTypeKind.Entity: - return context.CreateStructuredTypeSchema(edmTypeReference.AsStructured(), document); + return context.CreateStructuredTypeSchema(edmTypeReference.AsStructured()); case EdmTypeKind.Enum: - return context.CreateEnumTypeSchema(edmTypeReference.AsEnum(), document); + return context.CreateEnumTypeSchema(edmTypeReference.AsEnum()); // Primitive properties of type Edm.PrimitiveType, Edm.Stream, and any of the Edm.Geo* types are // represented as Schema Objects that are JSON References to definitions in the Definitions Object case EdmTypeKind.Primitive: IEdmPrimitiveTypeReference primitiveTypeReference = (IEdmPrimitiveTypeReference)edmTypeReference; - return context.CreateSchema(primitiveTypeReference, document, schemaForParameter); + return context.CreateSchema(primitiveTypeReference, schemaForParameter); case EdmTypeKind.TypeDefinition: - return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, document, schemaForParameter); + return context.CreateSchema(((IEdmTypeDefinitionReference)edmTypeReference).TypeDefinition().UnderlyingType, schemaForParameter); case EdmTypeKind.EntityReference: - return context.CreateTypeDefinitionSchema(edmTypeReference.AsTypeDefinition(), document); + return context.CreateTypeDefinitionSchema(edmTypeReference.AsTypeDefinition()); case EdmTypeKind.Untyped: return new OpenApiSchema(); @@ -99,16 +96,14 @@ public static IOpenApiSchema CreateEdmTypeSchema(this ODataContext context, IEdm /// /// The OData context. /// The Edm primitive reference. - /// The Open API document to lookup references. /// Whether the schema is for a parameter. /// The created . - public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, OpenApiDocument document, bool schemaForParameter = false) + public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveTypeReference primitiveType, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); - Utils.CheckArgumentNull(document, nameof(document)); - var schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), document, schemaForParameter); + var schema = context.CreateSchema(primitiveType.PrimitiveDefinition(), schemaForParameter); if (schema is OpenApiSchema openApiSchema) { switch(primitiveType.PrimitiveKind()) @@ -164,14 +159,12 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti /// /// The OData context. /// The Edm primitive type. - /// The Open API document to lookup references. /// Whether the schema is for a parameter. /// The created . - public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, OpenApiDocument document, bool schemaForParameter = false) + public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimitiveType primitiveType, bool schemaForParameter = false) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(primitiveType, nameof(primitiveType)); - Utils.CheckArgumentNull(document, nameof(document)); // Spec has different configure for double, AnyOf or OneOf? OpenApiSchema schema = new OpenApiSchema @@ -223,7 +216,7 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti [ new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = "double" }, new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null }, - new OpenApiSchemaReference(Constants.ReferenceNumericName, document) + new OpenApiSchemaReference(Constants.ReferenceNumericName) ]; break; case EdmPrimitiveTypeKind.Single when emitV2CompatibleParameterTypes: // single @@ -235,7 +228,7 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti [ new OpenApiSchema { Type = JsonSchemaType.Number | JsonSchemaType.Null, Format = "float"}, new OpenApiSchema { Type = JsonSchemaType.String | JsonSchemaType.Null}, - new OpenApiSchemaReference(Constants.ReferenceNumericName, document) + new OpenApiSchemaReference(Constants.ReferenceNumericName) ]; break; case EdmPrimitiveTypeKind.Guid: // guid @@ -296,37 +289,37 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti break; case EdmPrimitiveTypeKind.Geography: - return new OpenApiSchemaReference("Edm.Geography", document); + return new OpenApiSchemaReference("Edm.Geography"); case EdmPrimitiveTypeKind.GeographyPoint: - return new OpenApiSchemaReference("Edm.GeographyPoint", document); + return new OpenApiSchemaReference("Edm.GeographyPoint"); case EdmPrimitiveTypeKind.GeographyLineString: - return new OpenApiSchemaReference("Edm.GeographyLineString", document); + return new OpenApiSchemaReference("Edm.GeographyLineString"); case EdmPrimitiveTypeKind.GeographyPolygon: - return new OpenApiSchemaReference("Edm.GeographyPolygon", document); + return new OpenApiSchemaReference("Edm.GeographyPolygon"); case EdmPrimitiveTypeKind.GeographyCollection: - return new OpenApiSchemaReference("Edm.GeographyCollection", document); + return new OpenApiSchemaReference("Edm.GeographyCollection"); case EdmPrimitiveTypeKind.GeographyMultiPolygon: - return new OpenApiSchemaReference("Edm.GeographyMultiPolygon", document); + return new OpenApiSchemaReference("Edm.GeographyMultiPolygon"); case EdmPrimitiveTypeKind.GeographyMultiLineString: - return new OpenApiSchemaReference("Edm.GeographyMultiLineString", document); + return new OpenApiSchemaReference("Edm.GeographyMultiLineString"); case EdmPrimitiveTypeKind.GeographyMultiPoint: - return new OpenApiSchemaReference("Edm.GeographyMultiPoint", document); + return new OpenApiSchemaReference("Edm.GeographyMultiPoint"); case EdmPrimitiveTypeKind.Geometry: // Geometry - return new OpenApiSchemaReference("Edm.Geometry", document); + return new OpenApiSchemaReference("Edm.Geometry"); case EdmPrimitiveTypeKind.GeometryPoint: - return new OpenApiSchemaReference("Edm.GeometryPoint", document); + return new OpenApiSchemaReference("Edm.GeometryPoint"); case EdmPrimitiveTypeKind.GeometryLineString: - return new OpenApiSchemaReference("Edm.GeometryLineString", document); + return new OpenApiSchemaReference("Edm.GeometryLineString"); case EdmPrimitiveTypeKind.GeometryPolygon: - return new OpenApiSchemaReference("Edm.GeometryPolygon", document); + return new OpenApiSchemaReference("Edm.GeometryPolygon"); case EdmPrimitiveTypeKind.GeometryCollection: - return new OpenApiSchemaReference("Edm.GeometryCollection", document); + return new OpenApiSchemaReference("Edm.GeometryCollection"); case EdmPrimitiveTypeKind.GeometryMultiPolygon: - return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); + return new OpenApiSchemaReference("Edm.GeometryMultiPolygon"); case EdmPrimitiveTypeKind.GeometryMultiLineString: - return new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); + return new OpenApiSchemaReference("Edm.GeometryMultiLineString"); case EdmPrimitiveTypeKind.GeometryMultiPoint: - return new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); + return new OpenApiSchemaReference("Edm.GeometryMultiPoint"); case EdmPrimitiveTypeKind.None: default: @@ -336,7 +329,7 @@ public static IOpenApiSchema CreateSchema(this ODataContext context, IEdmPrimiti return schema; } - private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference, OpenApiDocument document) + private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdmEnumTypeReference typeReference) { Debug.Assert(context != null); Debug.Assert(typeReference != null); @@ -347,7 +340,7 @@ private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IE return new OpenApiSchema { AnyOf = [ - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), + new OpenApiSchemaReference(typeReference.Definition.FullTypeName()), new OpenApiSchema { Type = JsonSchemaType.Null, @@ -357,15 +350,14 @@ private static IOpenApiSchema CreateEnumTypeSchema(this ODataContext context, IE } else { - return new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); + return new OpenApiSchemaReference(typeReference.Definition.FullTypeName()); } } - private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, OpenApiDocument document, bool isTypeCollection = false) + private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredTypeReference typeReference, bool isTypeCollection = false) { Debug.Assert(context != null); Debug.Assert(typeReference != null); - Debug.Assert(document != null); // AnyOf will only be valid openApi for version 3 // otherwise the reference should be set directly @@ -377,7 +369,7 @@ private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext conte return new OpenApiSchema { AnyOf = [ - new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document), + new OpenApiSchemaReference(typeReference.Definition.FullTypeName()), new OpenApiSchema { Type = JsonSchemaType.Null, @@ -387,22 +379,21 @@ private static IOpenApiSchema CreateStructuredTypeSchema(this ODataContext conte } else { - return new OpenApiSchemaReference(typeReference.Definition.FullTypeName(), document); + return new OpenApiSchemaReference(typeReference.Definition.FullTypeName()); } } - private static IOpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference, OpenApiDocument document) + private static IOpenApiSchema CreateTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinitionReference reference) { Debug.Assert(context != null); Debug.Assert(reference != null); - Debug.Assert(document != null); if (reference.IsNullable && context.Settings.OpenApiSpecVersion >= OpenApiSpecVersion.OpenApi3_0) { return new OpenApiSchema { AnyOf = [ - new OpenApiSchemaReference(reference.Definition.FullTypeName(), document), + new OpenApiSchemaReference(reference.Definition.FullTypeName()), new OpenApiSchema { Type = JsonSchemaType.Null, @@ -412,7 +403,7 @@ private static IOpenApiSchema CreateTypeDefinitionSchema(this ODataContext conte } else { - return new OpenApiSchemaReference(reference.Definition.FullTypeName(), document); + return new OpenApiSchemaReference(reference.Definition.FullTypeName()); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs index 346362259..c6f954ded 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs @@ -32,19 +32,18 @@ internal static class OpenApiErrorSchemaGenerator /// The value of each pair is a . /// /// The OData to Open API context. - /// The Open API document to lookup references. /// The string/schema dictionary. - public static IDictionary CreateODataErrorSchemas(this ODataContext context, OpenApiDocument document) + public static IDictionary CreateODataErrorSchemas(this ODataContext context) { Utils.CheckArgumentNull(context, nameof(context)); var rootNamespaceName = context.GetErrorNamespaceName(); return new Dictionary() { - { $"{rootNamespaceName}{ODataErrorClassName}", CreateErrorSchema(rootNamespaceName, document) }, - { $"{rootNamespaceName}{MainErrorClassName}", CreateErrorMainSchema(rootNamespaceName, document) }, + { $"{rootNamespaceName}{ODataErrorClassName}", CreateErrorSchema(rootNamespaceName) }, + { $"{rootNamespaceName}{MainErrorClassName}", CreateErrorMainSchema(rootNamespaceName) }, { $"{rootNamespaceName}{ErrorDetailsClassName}", CreateErrorDetailSchema() }, - { $"{rootNamespaceName}{InnerErrorClassName}", CreateInnerErrorSchema(context, document) } + { $"{rootNamespaceName}{InnerErrorClassName}", CreateInnerErrorSchema(context) } }; } @@ -66,8 +65,7 @@ public static string GetErrorNamespaceName(this ODataContext context) { /// /// The created . /// The root namespace name. With a trailing dot. - /// The Open API document to lookup references. - public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiDocument document) + public static OpenApiSchema CreateErrorSchema(string rootNamespaceName) { return new OpenApiSchema { @@ -80,7 +78,7 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiD { { "error", - new OpenApiSchemaReference($"{rootNamespaceName}{MainErrorClassName}", document) + new OpenApiSchemaReference($"{rootNamespaceName}{MainErrorClassName}") } } }; @@ -91,9 +89,8 @@ public static OpenApiSchema CreateErrorSchema(string rootNamespaceName, OpenApiD /// Otherwise, a default inner error type of object will be created. /// /// The OData to Open API context. - /// The Open API document to lookup references. /// The inner error schema definition. - public static IOpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenApiDocument document) + public static IOpenApiSchema CreateInnerErrorSchema(ODataContext context) { Utils.CheckArgumentNull(context, nameof(context)); @@ -102,7 +99,7 @@ public static IOpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenAp !string.IsNullOrEmpty(rootNamespace) && context.Model.FindDeclaredType($"{rootNamespace}.{context.Settings.InnerErrorComplexTypeName}") is IEdmComplexType complexType) { - return context.CreateSchemaTypeSchema(complexType, document); + return context.CreateSchemaTypeSchema(complexType); } return new OpenApiSchema @@ -116,9 +113,8 @@ public static IOpenApiSchema CreateInnerErrorSchema(ODataContext context, OpenAp /// Create for main property of the error. /// /// The root namespace name. With a trailing dot. - /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName, OpenApiDocument document) + public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName) { return new OpenApiSchema { @@ -144,12 +140,12 @@ public static OpenApiSchema CreateErrorMainSchema(string rootNamespaceName, Open new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference($"{rootNamespaceName}{ErrorDetailsClassName}", document) + Items = new OpenApiSchemaReference($"{rootNamespaceName}{ErrorDetailsClassName}") } }, { "innerError", - new OpenApiSchemaReference($"{rootNamespaceName}{InnerErrorClassName}", document) + new OpenApiSchemaReference($"{rootNamespaceName}{InnerErrorClassName}") } } }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs index fc315fdcb..7f3f140da 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiExampleGenerator.cs @@ -40,14 +40,14 @@ public static void AddExamplesToDocument(this ODataContext context, OpenApiDocum foreach (var element in elements) { - if (context.CreateExample(element, document) is OpenApiExample example) + if (context.CreateExample(element) is OpenApiExample example) { document.AddComponent(element.FullTypeName(), example); } } } - private static OpenApiExample CreateExample(this ODataContext context, IEdmType edmType, OpenApiDocument document) + private static OpenApiExample CreateExample(this ODataContext context, IEdmType edmType) { Debug.Assert(context != null); Debug.Assert(edmType != null); @@ -57,7 +57,7 @@ private static OpenApiExample CreateExample(this ODataContext context, IEdmType // complex type EdmTypeKind.Complex or EdmTypeKind.Entity when edmType is IEdmStructuredType edmStructuredType => new() { - Value = OpenApiSchemaGenerator.CreateStructuredTypePropertiesExample(context, edmStructuredType, document), + Value = OpenApiSchemaGenerator.CreateStructuredTypePropertiesExample(context, edmStructuredType), }, _ => null, }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs index df2bdedef..eb3c7e3f8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiParameterGenerator.cs @@ -50,15 +50,13 @@ public static void AddParametersToDocument(this ODataContext context, OpenApiDoc /// /// The OData context. /// The Edm function import. - /// The Open API document to lookup references. /// The created list of . - public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport, OpenApiDocument document) + public static IList CreateParameters(this ODataContext context, IEdmFunctionImport functionImport) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(functionImport, nameof(functionImport)); - Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateParameters(functionImport.Function, document); + return context.CreateParameters(functionImport.Function); } /// @@ -66,16 +64,13 @@ public static IList CreateParameters(this ODataContext contex /// /// The OData context. /// The Edm function. - /// The Open API document to lookup references. /// The parameter name mapping. /// The created list of . public static IList CreateParameters(this ODataContext context, IEdmFunction function, - OpenApiDocument document, IDictionary parameterNameMapping = null) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(function, nameof(function)); - Utils.CheckArgumentNull(document, nameof(document)); var parameters = new List(); int skip = function.IsBound ? 1 : 0; @@ -132,7 +127,7 @@ public static IList CreateParameters(this ODataContext contex Name = parameterNameMapping == null ? edmParameter.Name : parameterNameMapping[edmParameter.Name], In = isOptionalParameter ? ParameterLocation.Query : ParameterLocation.Path, Required = !isOptionalParameter, - Schema = context.CreateEdmTypeSchemaForParameter(edmParameter.Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(edmParameter.Type) }; } @@ -155,19 +150,16 @@ public static IList CreateParameters(this ODataContext contex /// /// The OData context. /// The key segment. - /// The Open API document to lookup references. /// The parameter name mapping. /// The created list of . public static IList CreateKeyParameters(this ODataContext context, ODataKeySegment keySegment, - OpenApiDocument document, IDictionary parameterNameMapping = null) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(keySegment, nameof(keySegment)); - Utils.CheckArgumentNull(document, nameof(document)); if (keySegment.IsAlternateKey) - return CreateAlternateKeyParameters(context, keySegment, document); + return CreateAlternateKeyParameters(context, keySegment); IEdmEntityType entityType = keySegment.EntityType; IList keys = entityType.Key().ToList(); @@ -190,7 +182,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"The unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchemaForParameter(keys[0].Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(keys[0].Type) }; parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiAny(entityType.Name)); @@ -209,7 +201,7 @@ public static IList CreateKeyParameters(this ODataContext cont In = ParameterLocation.Path, Required = true, Description = $"Property in multi-part unique identifier of {entityType.Name}", - Schema = context.CreateEdmTypeSchemaForParameter(keyProperty.Type, document) + Schema = context.CreateEdmTypeSchemaForParameter(keyProperty.Type) }; if (keySegment.KeyMappings != null) @@ -231,9 +223,8 @@ public static IList CreateKeyParameters(this ODataContext cont /// /// The OData context. /// The key segment. - /// The Open API document to lookup references. /// A list of of alternate key parameters. - private static IList CreateAlternateKeyParameters(ODataContext context, ODataSegment keySegment, OpenApiDocument document) + private static IList CreateAlternateKeyParameters(ODataContext context, ODataSegment keySegment) { Debug.Assert(keySegment.Kind == ODataSegmentKind.Key); @@ -253,7 +244,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = alternateKey.First().Key, In = ParameterLocation.Path, Description = $"Alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchemaForParameter(alternateKey.First().Value.Type, document), + Schema = context.CreateEdmTypeSchemaForParameter(alternateKey.First().Value.Type), Required = true } ); @@ -271,7 +262,7 @@ private static IList CreateAlternateKeyParameters(ODataContext Name = compositekey.Key, In = ParameterLocation.Path, Description = $"Property in multi-part alternate key of {entityType.Name}", - Schema = context.CreateEdmTypeSchemaForParameter(compositekey.Value.Type, document), + Schema = context.CreateEdmTypeSchemaForParameter(compositekey.Value.Type), Required = true } ); @@ -287,9 +278,8 @@ private static IList CreateAlternateKeyParameters(ODataContext /// /// The ODataPath /// The OData context. - /// The Open API document to lookup references. /// The created list of - public static List CreatePathParameters(this ODataPath path, ODataContext context, OpenApiDocument document) + public static List CreatePathParameters(this ODataPath path, ODataContext context) { List pathParameters = []; var parameterMappings = path.CalculateParameterMapping(context.Settings); @@ -297,7 +287,7 @@ public static List CreatePathParameters(this ODataPath path, foreach (ODataKeySegment keySegment in path.OfType()) { IDictionary mapping = parameterMappings[keySegment]; - pathParameters.AddRange(context.CreateKeyParameters(keySegment, document, mapping)); + pathParameters.AddRange(context.CreateKeyParameters(keySegment, mapping)); } foreach (ODataOperationSegment operationSegment in path.OfType()) @@ -309,7 +299,7 @@ public static List CreatePathParameters(this ODataPath path, if (operationSegment.ParameterMappings != null) { - var parameters = context.CreateParameters(function, document, operationSegment.ParameterMappings); + var parameters = context.CreateParameters(function, operationSegment.ParameterMappings); foreach (var parameter in parameters) { pathParameters.AppendParameter(parameter); @@ -318,7 +308,7 @@ public static List CreatePathParameters(this ODataPath path, else { IDictionary mappings = parameterMappings[operationSegment]; - var parameters = context.CreateParameters(function, document, mappings); + var parameters = context.CreateParameters(function, mappings); pathParameters.AddRange(parameters); } } @@ -364,18 +354,16 @@ public static void AppendParameter(this IList parameters, IOp /// /// The OData context. /// The Edm annotation target. - /// The Open API document. /// The created or null. - public static IOpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateTop(this ODataContext context, IEdmVocabularyAnnotatable target) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); - Utils.CheckArgumentNull(document, nameof(document)); bool? top = context.Model.GetBoolean(target, CapabilitiesConstants.TopSupported); if (top == null || top.Value) { - return new OpenApiParameterReference("top", document); + return new OpenApiParameterReference("top"); } return null; @@ -386,19 +374,17 @@ public static IOpenApiParameter CreateTop(this ODataContext context, IEdmVocabul /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document to use to build references. /// - public static IOpenApiParameter CreateTop(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateTop(this ODataContext context, string targetPath) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); - Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateTop(target, document); + return context.CreateTop(target); } /// @@ -406,18 +392,16 @@ public static IOpenApiParameter CreateTop(this ODataContext context, string targ /// /// The OData context. /// The Edm annotation target. - /// The Open API document to use to build references. /// The created or null. - public static IOpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateSkip(this ODataContext context, IEdmVocabularyAnnotatable target) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); - Utils.CheckArgumentNull(document, nameof(document)); bool? skip = context.Model.GetBoolean(target, CapabilitiesConstants.SkipSupported); if (skip == null || skip.Value) { - return new OpenApiParameterReference("skip", document); + return new OpenApiParameterReference("skip"); } return null; @@ -428,19 +412,17 @@ public static IOpenApiParameter CreateSkip(this ODataContext context, IEdmVocabu /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document to use to build references. /// - public static IOpenApiParameter CreateSkip(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateSkip(this ODataContext context, string targetPath) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); - Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateSkip(target, document); + return context.CreateSkip(target); } /// @@ -448,18 +430,16 @@ public static IOpenApiParameter CreateSkip(this ODataContext context, string tar /// /// The OData context. /// The Edm annotation target. - /// The Open API document to use to build references. /// The created or null. - public static IOpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateSearch(this ODataContext context, IEdmVocabularyAnnotatable target) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); - Utils.CheckArgumentNull(document, nameof(document)); SearchRestrictionsType search = context.Model.GetRecord(target, CapabilitiesConstants.SearchRestrictions); if (search == null || search.IsSearchable) { - return new OpenApiParameterReference("search", document); + return new OpenApiParameterReference("search"); } return null; @@ -469,19 +449,17 @@ public static IOpenApiParameter CreateSearch(this ODataContext context, IEdmVoca /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document to use to build references. /// - public static IOpenApiParameter CreateSearch(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateSearch(this ODataContext context, string targetPath) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); - Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateSearch(target, document); + return context.CreateSearch(target); } /// @@ -489,18 +467,16 @@ public static IOpenApiParameter CreateSearch(this ODataContext context, string t /// /// The OData context. /// The Edm annotation target. - /// The Open API document to use to build references. /// The created or null. - public static IOpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateCount(this ODataContext context, IEdmVocabularyAnnotatable target) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); - Utils.CheckArgumentNull(document, nameof(document)); CountRestrictionsType count = context.Model.GetRecord(target, CapabilitiesConstants.CountRestrictions); if (count == null || count.IsCountable) { - return new OpenApiParameterReference("count", document); + return new OpenApiParameterReference("count"); } return null; @@ -511,19 +487,17 @@ public static IOpenApiParameter CreateCount(this ODataContext context, IEdmVocab /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document to use to build references. /// - public static IOpenApiParameter CreateCount(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateCount(this ODataContext context, string targetPath) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); - Utils.CheckArgumentNull(document, nameof(document)); IEdmTargetPath target = context.Model.GetTargetPath(targetPath); if (target == null) return null; - return context.CreateCount(target, document); + return context.CreateCount(target); } /// @@ -531,18 +505,16 @@ public static IOpenApiParameter CreateCount(this ODataContext context, string ta /// /// The OData context. /// The Edm annotation target. - /// The Open API document to use to build references. /// The created or null. - public static IOpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target, OpenApiDocument document) + public static IOpenApiParameter CreateFilter(this ODataContext context, IEdmVocabularyAnnotatable target) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(target, nameof(target)); - Utils.CheckArgumentNull(document, nameof(document)); FilterRestrictionsType filter = context.Model.GetRecord(target, CapabilitiesConstants.FilterRestrictions); if (filter == null || filter.IsFilterable) { - return new OpenApiParameterReference("filter", document); + return new OpenApiParameterReference("filter"); } return null; @@ -553,9 +525,8 @@ public static IOpenApiParameter CreateFilter(this ODataContext context, IEdmVoca /// /// The OData context. /// The string representation of the Edm target path. - /// The Open API document to use to build references. /// - public static IOpenApiParameter CreateFilter(this ODataContext context, string targetPath, OpenApiDocument document) + public static IOpenApiParameter CreateFilter(this ODataContext context, string targetPath) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(targetPath, nameof(targetPath)); @@ -564,7 +535,7 @@ public static IOpenApiParameter CreateFilter(this ODataContext context, string t if (target == null) return null; - return context.CreateFilter(target, document); + return context.CreateFilter(target); } public static OpenApiParameter CreateOrderBy(this ODataContext context, string targetPath, IEdmEntityType entityType) diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs index f0b09000d..f74b51c27 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiPathItemGenerator.cs @@ -39,7 +39,7 @@ public static void AddPathItemsToDocument(this ODataContext context, OpenApiDocu settings.EnableKeyAsSegment = context.KeyAsSegment; foreach (ODataPath path in context.AllPaths) { - IPathItemHandler handler = context.PathItemHandlerProvider.GetHandler(path.Kind, document); + IPathItemHandler handler = context.PathItemHandlerProvider.GetHandler(path.Kind); if (handler == null) { continue; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs index ffb8f0c10..068ff77ab 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiRequestBodyGenerator.cs @@ -24,15 +24,13 @@ internal static class OpenApiRequestBodyGenerator /// /// The OData context. /// The Edm action import. - /// The OpenApi document to lookup references. /// The created or null. - public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmActionImport actionImport, OpenApiDocument document) + public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmActionImport actionImport) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(actionImport, nameof(actionImport)); - Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateRequestBody(actionImport.Action, document); + return context.CreateRequestBody(actionImport.Action); } /// @@ -40,13 +38,11 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE /// /// The OData context. /// The Edm action. - /// The OpenApi document to lookup references. /// The created or null. - public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmAction action, OpenApiDocument document) + public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IEdmAction action) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(action, nameof(action)); - Utils.CheckArgumentNull(document, nameof(document)); // return null for empty action parameters int skip = 0; @@ -74,7 +70,7 @@ public static OpenApiRequestBody CreateRequestBody(this ODataContext context, IE foreach (var parameter in action.Parameters.Skip(skip)) { - parametersSchema.Properties.Add(parameter.Name, context.CreateEdmTypeSchema(parameter.Type, document)); + parametersSchema.Properties.Add(parameter.Name, context.CreateEdmTypeSchema(parameter.Type)); } OpenApiRequestBody requestBody = new OpenApiRequestBody @@ -102,14 +98,14 @@ public static void AddRequestBodiesToDocument(this ODataContext context, OpenApi Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(document, nameof(document)); - document.AddComponent(Constants.ReferencePostRequestBodyName, CreateRefPostRequestBody(document)); - document.AddComponent(Constants.ReferencePutRequestBodyName, CreateRefPutRequestBody(document)); + document.AddComponent(Constants.ReferencePostRequestBodyName, CreateRefPostRequestBody()); + document.AddComponent(Constants.ReferencePutRequestBodyName, CreateRefPutRequestBody()); // add request bodies for actions targeting multiple related paths foreach (IEdmAction action in context.Model.SchemaElements.OfType() .Where(context.Model.OperationTargetsMultiplePaths)) { - if (context.CreateRequestBody(action, document) is OpenApiRequestBody requestBody) + if (context.CreateRequestBody(action) is OpenApiRequestBody requestBody) document.AddComponent($"{action.Name}RequestBody", requestBody); } } @@ -118,10 +114,9 @@ public static void AddRequestBodiesToDocument(this ODataContext context, OpenApi /// Create a to be reused across ref POST operations /// /// The created - /// The OpenApi document to lookup references. - private static OpenApiRequestBody CreateRefPostRequestBody(OpenApiDocument document) + private static OpenApiRequestBody CreateRefPostRequestBody() { - var schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.ReferenceCreateSchemaName); return new OpenApiRequestBody { Required = true, @@ -142,10 +137,9 @@ private static OpenApiRequestBody CreateRefPostRequestBody(OpenApiDocument docum /// Create a to be reused across ref PUT operations /// /// The created - /// The OpenApi document to lookup references. - private static OpenApiRequestBody CreateRefPutRequestBody(OpenApiDocument document) + private static OpenApiRequestBody CreateRefPutRequestBody() { - var schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.ReferenceUpdateSchemaName); return new OpenApiRequestBody { diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs index c0cfa4f01..6756ddaea 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiResponseGenerator.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.OData.Edm; using Microsoft.OpenApi.Models; @@ -26,17 +25,16 @@ internal static class OpenApiResponseGenerator /// Get the for the build-in statusCode. /// /// The status code. - /// The OpenApi document to lookup references. /// The created . - public static IOpenApiResponse GetResponse(this string statusCode, OpenApiDocument document) + public static IOpenApiResponse GetResponse(this string statusCode) { return statusCode switch { - Constants.StatusCodeDefault => new OpenApiResponseReference(Constants.Error, document), + Constants.StatusCodeDefault => new OpenApiResponseReference(Constants.Error), Constants.StatusCode204 => new OpenApiResponse { Description = Constants.Success}, Constants.StatusCode201 => new OpenApiResponse { Description = Constants.Created}, Constants.StatusCodeClass2XX => new OpenApiResponse { Description = Constants.Success}, - Constants.StatusCodeClass4XX => new OpenApiResponseReference(Constants.Error, document), - Constants.StatusCodeClass5XX => new OpenApiResponseReference(Constants.Error, document), + Constants.StatusCodeClass4XX => new OpenApiResponseReference(Constants.Error), + Constants.StatusCodeClass5XX => new OpenApiResponseReference(Constants.Error), _ => null, }; } @@ -56,33 +54,33 @@ public static void AddResponsesToDocument(this ODataContext context, OpenApiDocu var responses = new Dictionary { - { "error", context.CreateErrorResponse(document) } + { "error", context.CreateErrorResponse() } }; if(context.Settings.EnableDollarCountPath) { - responses[Constants.DollarCountSchemaName] = CreateCountResponse(document); + responses[Constants.DollarCountSchemaName] = CreateCountResponse(); } responses = responses.Concat(context.GetAllCollectionEntityTypes() .Select(x => new KeyValuePair( $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", - CreateCollectionResponse(x, document))) + CreateCollectionResponse(x))) .Where(x => !responses.ContainsKey(x.Key))) .Concat(context.GetAllCollectionComplexTypes() .Select(x => new KeyValuePair( $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", - CreateCollectionResponse(x, document))) + CreateCollectionResponse(x))) .Where(x => !responses.ContainsKey(x.Key))) .ToDictionary(x => x.Key, x => x.Value); if(context.HasAnyNonContainedCollections()) - responses[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionResponse("String", document); + responses[$"String{Constants.CollectionSchemaSuffix}"] = CreateCollectionResponse("String"); foreach (IEdmOperation operation in context.Model.SchemaElements.OfType() .Where(op => context.Model.OperationTargetsMultiplePaths(op))) { - OpenApiResponse response = context.CreateOperationResponse(operation, document); + OpenApiResponse response = context.CreateOperationResponse(operation); if (response != null) responses[$"{operation.Name}Response"] = response; } @@ -98,15 +96,13 @@ public static void AddResponsesToDocument(this ODataContext context, OpenApiDocu /// /// The OData context. /// The Edm operation import. - /// The OpenApi document to lookup references. /// The created . - public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperationImport operationImport, OpenApiDocument document) + public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperationImport operationImport) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(operationImport, nameof(operationImport)); - Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateResponses(operationImport.Operation, document); + return context.CreateResponses(operationImport.Operation); } /// @@ -114,9 +110,8 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp /// /// The OData context. /// The Edm operation. - /// The OpenApi document to lookup references. /// The created . - public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperation operation, OpenApiDocument document) + public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOperation operation) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(operation, nameof(operation)); @@ -125,35 +120,35 @@ public static OpenApiResponses CreateResponses(this ODataContext context, IEdmOp if (operation.IsAction() && operation.ReturnType == null) { - responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse(document)); + responses.Add(Constants.StatusCode204, Constants.StatusCode204.GetResponse()); } else if (context.Model.OperationTargetsMultiplePaths(operation)) { responses.Add( context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{operation.Name}Response", document) + new OpenApiResponseReference($"{operation.Name}Response") ); } else { - OpenApiResponse response = context.CreateOperationResponse(operation, document); + OpenApiResponse response = context.CreateOperationResponse(operation); responses.Add(context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, response); } if (context.Settings.ErrorResponsesAsDefault) { - responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse(document)); + responses.Add(Constants.StatusCodeDefault, Constants.StatusCodeDefault.GetResponse()); } else { - responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse(document)); - responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse(document)); + responses.Add(Constants.StatusCodeClass4XX, Constants.StatusCodeClass4XX.GetResponse()); + responses.Add(Constants.StatusCodeClass5XX, Constants.StatusCodeClass5XX.GetResponse()); } return responses; } - public static OpenApiResponse CreateOperationResponse(this ODataContext context, IEdmOperation operation, OpenApiDocument document) + public static OpenApiResponse CreateOperationResponse(this ODataContext context, IEdmOperation operation) { if (operation.ReturnType == null) return null; @@ -167,7 +162,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, Properties = new Dictionary { { - "value", context.CreateEdmTypeSchema(operation.ReturnType, document) + "value", context.CreateEdmTypeSchema(operation.ReturnType) } } }; @@ -181,7 +176,7 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, [ new OpenApiSchemaReference(operation.IsDeltaFunction() ? Constants.BaseDeltaFunctionResponse // @odata.nextLink + @odata.deltaLink : Constants.BaseCollectionPaginationCountResponse // @odata.nextLink + @odata.count) - ,document), + ), baseSchema ] }; @@ -222,14 +217,14 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, Properties = new Dictionary { { - "value", context.CreateEdmTypeSchema(operation.ReturnType, document) + "value", context.CreateEdmTypeSchema(operation.ReturnType) } } }; } else { - schema = context.CreateEdmTypeSchema(operation.ReturnType, document); + schema = context.CreateEdmTypeSchema(operation.ReturnType); } string mediaType = Constants.ApplicationJsonMediaType; @@ -262,12 +257,12 @@ public static OpenApiResponse CreateOperationResponse(this ODataContext context, return response; } - private static OpenApiResponse CreateCollectionResponse(IEdmStructuredType structuredType, OpenApiDocument document) + private static OpenApiResponse CreateCollectionResponse(IEdmStructuredType structuredType) { var entityType = structuredType as IEdmEntityType; - return CreateCollectionResponse(entityType?.FullName() ?? structuredType.FullTypeName(), document); + return CreateCollectionResponse(entityType?.FullName() ?? structuredType.FullTypeName()); } - private static OpenApiResponse CreateCollectionResponse(string typeName, OpenApiDocument document) + private static OpenApiResponse CreateCollectionResponse(string typeName) { return new OpenApiResponse { @@ -278,16 +273,16 @@ private static OpenApiResponse CreateCollectionResponse(string typeName, OpenApi Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchemaReference($"{typeName}{Constants.CollectionSchemaSuffix}", document) + Schema = new OpenApiSchemaReference($"{typeName}{Constants.CollectionSchemaSuffix}") } } } }; } - private static OpenApiResponse CreateCountResponse(OpenApiDocument document) + private static OpenApiResponse CreateCountResponse() { - var schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName, document); + var schema = new OpenApiSchemaReference(Constants.DollarCountSchemaName); return new OpenApiResponse { Description = "The count of the resource", @@ -304,7 +299,7 @@ private static OpenApiResponse CreateCountResponse(OpenApiDocument document) }; } - private static OpenApiResponse CreateErrorResponse(this ODataContext context, OpenApiDocument document) + private static OpenApiResponse CreateErrorResponse(this ODataContext context) { var errorNamespaceName = context.GetErrorNamespaceName(); return new OpenApiResponse @@ -316,7 +311,7 @@ private static OpenApiResponse CreateErrorResponse(this ODataContext context, Op Constants.ApplicationJsonMediaType, new OpenApiMediaType { - Schema = new OpenApiSchemaReference($"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}", document) + Schema = new OpenApiSchemaReference($"{errorNamespaceName}{OpenApiErrorSchemaGenerator.ODataErrorClassName}") } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index e05512b92..eaf3609cc 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -41,13 +41,13 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume Utils.CheckArgumentNull(document, nameof(document)); // append the Edm.Spatial - foreach(var schema in context.CreateSpatialSchemas(document)) + foreach(var schema in context.CreateSpatialSchemas()) { document.AddComponent(schema.Key, schema.Value); } // append the OData errors - foreach(var schema in context.CreateODataErrorSchemas(document)) + foreach(var schema in context.CreateODataErrorSchemas()) { document.AddComponent(schema.Key, schema.Value); } @@ -60,7 +60,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume if(context.HasAnyNonContainedCollections()) { - document.AddComponent($"String{Constants.CollectionSchemaSuffix}", CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType, document)); + document.AddComponent($"String{Constants.CollectionSchemaSuffix}", CreateCollectionSchema(context, new OpenApiSchema { Type = JsonSchemaType.String }, Constants.StringType)); } document.AddComponent(Constants.ReferenceUpdateSchemaName, new OpenApiSchema() @@ -148,7 +148,7 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume .Equals(context.Settings.InnerErrorComplexTypeName, StringComparison.Ordinal)) continue; - document.AddComponent(fullTypeName, context.CreateSchemaTypeSchema(reference, document)); + document.AddComponent(fullTypeName, context.CreateSchemaTypeSchema(reference)); } break; } @@ -157,11 +157,11 @@ public static void AddSchemasToDocument(this ODataContext context, OpenApiDocume foreach(var collectionEntry in context.GetAllCollectionEntityTypes() .Select(x => new KeyValuePair( $"{(x is IEdmEntityType eType ? eType.FullName() : x.FullTypeName())}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x, document))) + CreateCollectionSchema(context, x))) .Concat(context.GetAllCollectionComplexTypes() .Select(x => new KeyValuePair( $"{x.FullTypeName()}{Constants.CollectionSchemaSuffix}", - CreateCollectionSchema(context, x, document)))) + CreateCollectionSchema(context, x)))) .ToArray()) { document.AddComponent(collectionEntry.Key, collectionEntry.Value); @@ -208,23 +208,23 @@ internal static IEnumerable GetAllCollectionEntityTypes(this return collectionEntityTypes.Union(derivedCollectionTypes); } - private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + private static OpenApiSchema CreateCollectionSchema(ODataContext context, IEdmStructuredType structuredType) { IOpenApiSchema schema = null; var entityType = structuredType as IEdmEntityType; if (context.Settings.EnableDerivedTypesReferencesForResponses && entityType != null) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, context.Model, document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, context.Model); } if (schema == null) { - schema = new OpenApiSchemaReference(entityType?.FullName() ?? structuredType.FullTypeName(), document); + schema = new OpenApiSchemaReference(entityType?.FullName() ?? structuredType.FullTypeName()); } - return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName(), document); + return CreateCollectionSchema(context, schema, entityType?.Name ?? structuredType.FullTypeName()); } - private static OpenApiSchema CreateCollectionSchema(ODataContext context, IOpenApiSchema schema, string typeName, OpenApiDocument document) + private static OpenApiSchema CreateCollectionSchema(ODataContext context, IOpenApiSchema schema, string typeName) { var properties = new Dictionary { @@ -250,7 +250,7 @@ private static OpenApiSchema CreateCollectionSchema(ODataContext context, IOpenA if (context.Settings.EnableODataAnnotationReferencesForResponses) { // @odata.nextLink + @odata.count - var paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse, document); + var paginationCountSchema = new OpenApiSchemaReference(Constants.BaseCollectionPaginationCountResponse); collectionSchema = new OpenApiSchema { @@ -359,15 +359,13 @@ private static void AddEnumDescription(IEdmEnumMember member, OpenApiEnumValuesD /// /// The OData context. /// The Edm structured type. - /// The Open API document to lookup references. /// The created . - public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(structuredType, nameof(structuredType)); - Utils.CheckArgumentNull(document, nameof(document)); - return context.CreateStructuredTypeSchema(structuredType, true, true, document); + return context.CreateStructuredTypeSchema(structuredType, true, true); } /// @@ -378,15 +376,13 @@ public static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context /// /// The OData context. /// The Edm property. - /// The Open API document to lookup references. /// The created . - public static IOpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property, OpenApiDocument document) + public static IOpenApiSchema CreatePropertySchema(this ODataContext context, IEdmProperty property) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(property, nameof(property)); - Utils.CheckArgumentNull(document, nameof(document)); - var schema = context.CreateEdmTypeSchema(property.Type, document); + var schema = context.CreateEdmTypeSchema(property.Type); if (schema is OpenApiSchema openApiSchema) @@ -413,9 +409,8 @@ public static IOpenApiSchema CreatePropertySchema(this ODataContext context, IEd /// /// The OData context. /// The Edm structured type. - /// The Open API document to lookup references. /// The created map of . - public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + public static IDictionary CreateStructuredTypePropertiesSchema(this ODataContext context, IEdmStructuredType structuredType) { Utils.CheckArgumentNull(context, nameof(context)); Utils.CheckArgumentNull(structuredType, nameof(structuredType)); @@ -426,7 +421,7 @@ public static IDictionary CreateStructuredTypeProperties // structure properties foreach (var property in structuredType.DeclaredStructuralProperties()) { - var propertySchema = context.CreatePropertySchema(property, document); + var propertySchema = context.CreatePropertySchema(property); if (propertySchema is OpenApiSchema openApiSchema) { openApiSchema.Description = context.Model.GetDescriptionAnnotation(property); @@ -440,7 +435,7 @@ public static IDictionary CreateStructuredTypeProperties // navigation properties foreach (var property in structuredType.DeclaredNavigationProperties()) { - var propertySchema = context.CreateEdmTypeSchema(property.Type, document); + var propertySchema = context.CreateEdmTypeSchema(property.Type); if (propertySchema is OpenApiSchema openApiSchema) { openApiSchema.Description = context.Model.GetDescriptionAnnotation(property); @@ -455,12 +450,12 @@ public static IDictionary CreateStructuredTypeProperties return properties; } - public static IOpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition, OpenApiDocument document) + public static IOpenApiSchema CreateSchemaTypeDefinitionSchema(this ODataContext context, IEdmTypeDefinition typeDefinition) { - return context.CreateSchema(typeDefinition.UnderlyingType, document); + return context.CreateSchema(typeDefinition.UnderlyingType); } - internal static IOpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType, OpenApiDocument document) + internal static IOpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType) { Debug.Assert(context != null); Debug.Assert(edmType != null); @@ -469,13 +464,13 @@ internal static IOpenApiSchema CreateSchemaTypeSchema(this ODataContext context, { case EdmTypeKind.Complex: // complex type case EdmTypeKind.Entity: // entity type - return context.CreateStructuredTypeSchema((IEdmStructuredType)edmType, true, true, document); + return context.CreateStructuredTypeSchema((IEdmStructuredType)edmType, true, true); case EdmTypeKind.Enum: // enum type return context.CreateEnumTypeSchema((IEdmEnumType)edmType); case EdmTypeKind.TypeDefinition: // type definition - return context.CreateSchemaTypeDefinitionSchema((IEdmTypeDefinition)edmType, document); + return context.CreateSchemaTypeDefinitionSchema((IEdmTypeDefinition)edmType); case EdmTypeKind.None: default: @@ -484,7 +479,6 @@ internal static IOpenApiSchema CreateSchemaTypeSchema(this ODataContext context, } private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, bool processBase, bool processExample, - OpenApiDocument document, IEnumerable derivedTypes = null) { Debug.Assert(context != null); @@ -493,7 +487,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex JsonNode example = null; if (context.Settings.ShowSchemaExamples) { - example = CreateStructuredTypePropertiesExample(context, structuredType, document); + example = CreateStructuredTypePropertiesExample(context, structuredType); } if (context.Settings.EnableDiscriminatorValue && derivedTypes == null) @@ -522,10 +516,10 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex AllOf = [ // 1. a JSON Reference to the Schema Object of the base type - new OpenApiSchemaReference(structuredType.BaseType.FullTypeName(), document), + new OpenApiSchemaReference(structuredType.BaseType.FullTypeName()), // 2. a Schema Object describing the derived type - context.CreateStructuredTypeSchema(structuredType, false, false, document, derivedTypes) + context.CreateStructuredTypeSchema(structuredType, false, false, derivedTypes) ], AnyOf = null, @@ -541,7 +535,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex if (context.Settings.EnableDiscriminatorValue && derivedTypes.Any()) { Dictionary mapping = derivedTypes - .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchemaReference(x.FullTypeName(), document).Reference.ReferenceV3); + .ToDictionary(x => $"#{x.FullTypeName()}", x => new OpenApiSchemaReference(x.FullTypeName()).Reference.ReferenceV3); discriminator = new OpenApiDiscriminator { @@ -561,7 +555,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex // Each structural property and navigation property is represented // as a name/value pair of the standard OpenAPI properties object. - Properties = context.CreateStructuredTypePropertiesSchema(structuredType, document), + Properties = context.CreateStructuredTypePropertiesSchema(structuredType), // make others null AllOf = null, @@ -616,7 +610,7 @@ private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext contex } } - internal static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType, OpenApiDocument document) + internal static JsonObject CreateStructuredTypePropertiesExample(ODataContext context, IEdmStructuredType structuredType) { JsonObject example = []; @@ -625,7 +619,7 @@ internal static JsonObject CreateStructuredTypePropertiesExample(ODataContext co { IEdmTypeReference propertyType = property.Type; - JsonNode item = GetTypeNameForExample(context, propertyType, document); + JsonNode item = GetTypeNameForExample(context, propertyType); if (propertyType.TypeKind() == EdmTypeKind.Primitive && item is JsonValue jsonValue && @@ -642,10 +636,10 @@ structuredType is IEdmEntityType entityType && return example; } - private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeReference edmTypeReference) { IEdmPrimitiveType primitiveType = edmTypeReference.AsPrimitive().PrimitiveDefinition(); - IOpenApiSchema schema = context.CreateSchema(primitiveType, document); + IOpenApiSchema schema = context.CreateSchema(primitiveType); if (edmTypeReference.IsBoolean()) { @@ -668,7 +662,7 @@ private static JsonNode GetTypeNameForPrimitive(ODataContext context, IEdmTypeRe } } - private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference, OpenApiDocument document) + private static JsonNode GetTypeNameForExample(ODataContext context, IEdmTypeReference edmTypeReference) { return edmTypeReference.TypeKind() switch { @@ -685,15 +679,15 @@ EdmTypeKind.Primitive when edmTypeReference.IsInt16() || edmTypeReference.IsInt64() || edmTypeReference.IsFloating() || edmTypeReference.IsDouble() => 0, - EdmTypeKind.Primitive => GetTypeNameForPrimitive(context, edmTypeReference, document), + EdmTypeKind.Primitive => GetTypeNameForPrimitive(context, edmTypeReference), EdmTypeKind.Entity or EdmTypeKind.Complex or EdmTypeKind.Enum => new JsonObject() {//TODO this is wrong for enums, and should instead use one of the enum members [Constants.OdataType] = edmTypeReference.FullName() }, - EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(context, edmTypeReference.AsCollection().ElementType(), document)), - EdmTypeKind.TypeDefinition => GetTypeNameForExample(context, new EdmPrimitiveTypeReference(edmTypeReference.AsTypeDefinition().TypeDefinition().UnderlyingType, edmTypeReference.IsNullable), document), + EdmTypeKind.Collection => new JsonArray(GetTypeNameForExample(context, edmTypeReference.AsCollection().ElementType())), + EdmTypeKind.TypeDefinition => GetTypeNameForExample(context, new EdmPrimitiveTypeReference(edmTypeReference.AsTypeDefinition().TypeDefinition().UnderlyingType, edmTypeReference.IsNullable)), EdmTypeKind.Untyped => new JsonObject(), _ => throw new OpenApiException("Not support for the type kind " + edmTypeReference.TypeKind()), }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs index 3aa231f98..93b32e330 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSecurityRequirementGenerator.cs @@ -24,13 +24,11 @@ internal static class OpenApiSecurityRequirementGenerator /// /// The OData to Open API context. /// The permissions. - /// The Open API document to use for references lookup. /// The created collection. public static IEnumerable CreateSecurityRequirements(this ODataContext context, - IList permissions, OpenApiDocument document) + IList permissions) { Utils.CheckArgumentNull(context, nameof(context)); - Utils.CheckArgumentNull(document, nameof(document)); if (permissions != null) { @@ -39,7 +37,7 @@ public static IEnumerable CreateSecurityRequirements yield return new OpenApiSecurityRequirement { [ - new OpenApiSecuritySchemeReference(permission.SchemeName, document) + new OpenApiSecuritySchemeReference(permission.SchemeName) ] = new List(permission.Scopes?.Select(c => c.Scope) ?? new List()) }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs index 74a70bf06..3bbdb43b2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSpatialTypeSchemaGenerator.cs @@ -24,9 +24,8 @@ internal static class OpenApiSpatialTypeSchemaGenerator /// The value of each pair is a . /// /// The OData to Open API context. - /// The document to use to lookup references. /// The string/schema dictionary. - public static IDictionary CreateSpatialSchemas(this ODataContext context, OpenApiDocument document) + public static IDictionary CreateSpatialSchemas(this ODataContext context) { Utils.CheckArgumentNull(context, nameof(context)); @@ -34,37 +33,37 @@ public static IDictionary CreateSpatialSchemas(this ODat if (context.IsSpatialTypeUsed) { - schemas.Add("Edm.Geography", CreateEdmGeographySchema(document)); + schemas.Add("Edm.Geography", CreateEdmGeographySchema()); - schemas.Add("Edm.GeographyPoint", CreateEdmGeographyPointSchema(document)); + schemas.Add("Edm.GeographyPoint", CreateEdmGeographyPointSchema()); - schemas.Add("Edm.GeographyLineString", CreateEdmGeographyLineStringSchema(document)); + schemas.Add("Edm.GeographyLineString", CreateEdmGeographyLineStringSchema()); - schemas.Add("Edm.GeographyPolygon", CreateEdmGeographyPolygonSchema(document)); + schemas.Add("Edm.GeographyPolygon", CreateEdmGeographyPolygonSchema()); - schemas.Add("Edm.GeographyMultiPoint", CreateEdmGeographyMultiPointSchema(document)); + schemas.Add("Edm.GeographyMultiPoint", CreateEdmGeographyMultiPointSchema()); - schemas.Add("Edm.GeographyMultiLineString", CreateEdmGeographyMultiLineStringSchema(document)); + schemas.Add("Edm.GeographyMultiLineString", CreateEdmGeographyMultiLineStringSchema()); - schemas.Add("Edm.GeographyMultiPolygon", CreateEdmGeographyMultiPolygonSchema(document)); + schemas.Add("Edm.GeographyMultiPolygon", CreateEdmGeographyMultiPolygonSchema()); - schemas.Add("Edm.GeographyCollection", CreateEdmGeographyCollectionSchema(document)); + schemas.Add("Edm.GeographyCollection", CreateEdmGeographyCollectionSchema()); - schemas.Add("Edm.Geometry", CreateEdmGeometrySchema(document)); + schemas.Add("Edm.Geometry", CreateEdmGeometrySchema()); - schemas.Add("Edm.GeometryPoint", CreateEdmGeometryPointSchema(document)); + schemas.Add("Edm.GeometryPoint", CreateEdmGeometryPointSchema()); - schemas.Add("Edm.GeometryLineString", CreateEdmGeometryLineStringSchema(document)); + schemas.Add("Edm.GeometryLineString", CreateEdmGeometryLineStringSchema()); - schemas.Add("Edm.GeometryPolygon", CreateEdmGeometryPolygonSchema(document)); + schemas.Add("Edm.GeometryPolygon", CreateEdmGeometryPolygonSchema()); - schemas.Add("Edm.GeometryMultiPoint", CreateEdmGeometryMultiPointSchema(document)); + schemas.Add("Edm.GeometryMultiPoint", CreateEdmGeometryMultiPointSchema()); - schemas.Add("Edm.GeometryMultiLineString", CreateEdmGeometryMultiLineStringSchema(document)); + schemas.Add("Edm.GeometryMultiLineString", CreateEdmGeometryMultiLineStringSchema()); - schemas.Add("Edm.GeometryMultiPolygon", CreateEdmGeometryMultiPolygonSchema(document)); + schemas.Add("Edm.GeometryMultiPolygon", CreateEdmGeometryMultiPolygonSchema()); - schemas.Add("Edm.GeometryCollection", CreateEdmGeometryCollectionSchema(document)); + schemas.Add("Edm.GeometryCollection", CreateEdmGeometryCollectionSchema()); schemas.Add("GeoJSON.position", CreateGeoJsonPointSchema()); } @@ -76,101 +75,92 @@ public static IDictionary CreateSpatialSchemas(this ODat /// Create for Edm.Geography. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographySchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographySchema() { - return new OpenApiSchemaReference("Edm.Geometry", document); + return new OpenApiSchemaReference("Edm.Geometry"); } /// /// Create for Edm.GeographyPoint. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyPointSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyPointSchema() { - return new OpenApiSchemaReference("Edm.GeometryPoint", document); + return new OpenApiSchemaReference("Edm.GeometryPoint"); } /// /// Create for Edm.GeographyLineString. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyLineStringSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyLineStringSchema() { - return new OpenApiSchemaReference("Edm.GeometryLineString", document); + return new OpenApiSchemaReference("Edm.GeometryLineString"); } /// /// Create for Edm.GeographyPolygon. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyPolygonSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyPolygonSchema() { - return new OpenApiSchemaReference("Edm.GeometryPolygon", document); + return new OpenApiSchemaReference("Edm.GeometryPolygon"); } /// /// Create for Edm.GeographyMultiPoint. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyMultiPointSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiPointSchema() { - return new OpenApiSchemaReference("Edm.GeometryMultiPoint", document); + return new OpenApiSchemaReference("Edm.GeometryMultiPoint"); } /// /// Create for Edm.GeographyMultiLineString. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyMultiLineStringSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiLineStringSchema() { - return new OpenApiSchemaReference("Edm.GeometryMultiLineString", document); + return new OpenApiSchemaReference("Edm.GeometryMultiLineString"); } /// /// Create for Edm.GeographyMultiPolygon. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyMultiPolygonSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyMultiPolygonSchema() { - return new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document); + return new OpenApiSchemaReference("Edm.GeometryMultiPolygon"); } /// /// Create for Edm.GeographyCollection. /// /// The created . - /// The document to use to lookup references. - public static IOpenApiSchema CreateEdmGeographyCollectionSchema(OpenApiDocument document) + public static IOpenApiSchema CreateEdmGeographyCollectionSchema() { - return new OpenApiSchemaReference("Edm.GeometryCollection", document); + return new OpenApiSchemaReference("Edm.GeometryCollection"); } /// /// Create for Edm.Geometry. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometrySchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometrySchema() { return new OpenApiSchema { Type = JsonSchemaType.Object, OneOf = [ - new OpenApiSchemaReference("Edm.GeometryPoint", document), - new OpenApiSchemaReference("Edm.GeometryLineString", document), - new OpenApiSchemaReference("Edm.GeometryPolygon", document), - new OpenApiSchemaReference("Edm.GeometryMultiPoint", document), - new OpenApiSchemaReference("Edm.GeometryMultiLineString", document), - new OpenApiSchemaReference("Edm.GeometryMultiPolygon", document), - new OpenApiSchemaReference("Edm.GeometryCollection", document), + new OpenApiSchemaReference("Edm.GeometryPoint"), + new OpenApiSchemaReference("Edm.GeometryLineString"), + new OpenApiSchemaReference("Edm.GeometryPolygon"), + new OpenApiSchemaReference("Edm.GeometryMultiPoint"), + new OpenApiSchemaReference("Edm.GeometryMultiLineString"), + new OpenApiSchemaReference("Edm.GeometryMultiPolygon"), + new OpenApiSchemaReference("Edm.GeometryCollection"), ] }; } @@ -179,8 +169,7 @@ public static OpenApiSchema CreateEdmGeometrySchema(OpenApiDocument document) /// Create for Edm.GeometryPoint. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryPointSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryPointSchema() { return new OpenApiSchema { @@ -197,7 +186,7 @@ public static OpenApiSchema CreateEdmGeometryPointSchema(OpenApiDocument documen Default = "Point" } }, - { "coordinates", new OpenApiSchemaReference("GeoJSON.position", document) } + { "coordinates", new OpenApiSchemaReference("GeoJSON.position") } }, Required = new HashSet { @@ -211,8 +200,7 @@ public static OpenApiSchema CreateEdmGeometryPointSchema(OpenApiDocument documen /// Create for Edm.GeometryLineString. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryLineStringSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryLineStringSchema() { return new OpenApiSchema { @@ -230,7 +218,7 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema(OpenApiDocument do { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", document), + Items = new OpenApiSchemaReference("GeoJSON.position"), MinItems = 2 } } @@ -247,8 +235,7 @@ public static OpenApiSchema CreateEdmGeometryLineStringSchema(OpenApiDocument do /// Create for Edm.GeometryPolygon. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryPolygonSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryPolygonSchema() { return new OpenApiSchema { @@ -269,7 +256,7 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema(OpenApiDocument docum Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", document) + Items = new OpenApiSchemaReference("GeoJSON.position") }, MinItems = 4 } @@ -287,8 +274,7 @@ public static OpenApiSchema CreateEdmGeometryPolygonSchema(OpenApiDocument docum /// Create for Edm.GeometryMultiPoint. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryMultiPointSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryMultiPointSchema() { return new OpenApiSchema { @@ -306,7 +292,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema(OpenApiDocument do { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", document) + Items = new OpenApiSchemaReference("GeoJSON.position") } } }, @@ -322,8 +308,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPointSchema(OpenApiDocument do /// Create for Edm.GeometryMultiLineString. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema() { return new OpenApiSchema { @@ -344,7 +329,7 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema(OpenApiDocume Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", document) + Items = new OpenApiSchemaReference("GeoJSON.position") }, MinItems = 2 } @@ -362,8 +347,7 @@ public static OpenApiSchema CreateEdmGeometryMultiLineStringSchema(OpenApiDocume /// Create for Edm.GeometryMultiPolygon. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema() { return new OpenApiSchema { @@ -387,7 +371,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema(OpenApiDocument Items = new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("GeoJSON.position", document) + Items = new OpenApiSchemaReference("GeoJSON.position") } }, MinItems = 4 @@ -406,8 +390,7 @@ public static OpenApiSchema CreateEdmGeometryMultiPolygonSchema(OpenApiDocument /// Create for Edm.GeometryCollection. /// /// The created . - /// The document to use to lookup references. - public static OpenApiSchema CreateEdmGeometryCollectionSchema(OpenApiDocument document) + public static OpenApiSchema CreateEdmGeometryCollectionSchema() { return new OpenApiSchema { @@ -425,7 +408,7 @@ public static OpenApiSchema CreateEdmGeometryCollectionSchema(OpenApiDocument do { "coordinates", new OpenApiSchema { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference("Edm.Geometry", document) + Items = new OpenApiSchemaReference("Edm.Geometry") } } }, diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/CachedOperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/CachedOperationHandlerProvider.cs new file mode 100644 index 000000000..5fac7c1b6 --- /dev/null +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/CachedOperationHandlerProvider.cs @@ -0,0 +1,37 @@ + + +// ------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +// ------------------------------------------------------------ + +using System.Collections.Generic; +using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.OData.Common; +using Microsoft.OpenApi.OData.Edm; + +namespace Microsoft.OpenApi.OData.Operation; + +/// +/// A class to provide the . +/// +internal class CachedOperationHandlerProvider : IOperationHandlerProvider +{ + private readonly IOperationHandlerProvider _concreteProvider; + private readonly Dictionary<(ODataPathKind, OperationType), IOperationHandler> _cache = new(); + public CachedOperationHandlerProvider(IOperationHandlerProvider concreteProvider) + { + Utils.CheckArgumentNull(concreteProvider, nameof(concreteProvider)); + _concreteProvider = concreteProvider; + } + /// + public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) + { + if (!_cache.TryGetValue((pathKind, operationType), out IOperationHandler handler)) + { + handler = _concreteProvider.GetHandler(pathKind, operationType); + _cache[(pathKind, operationType)] = handler; + } + return handler; + } +} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs index c23ab894f..33bd1ffc5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyBaseOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal abstract class ComplexPropertyBaseOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected ComplexPropertyBaseOperationHandler(OpenApiDocument document) : base(document) - { - - } protected ODataComplexPropertySegment ComplexPropertySegment; /// @@ -42,7 +34,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = tagName }); - operation.Tags.Add(new OpenApiTagReference(tagName, _document)); + operation.Tags.Add(new OpenApiTagReference(tagName)); } base.SetTags(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs index b8e01cccd..4bc44f072 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyGetOperationHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyGetOperationHandler : ComplexPropertyBaseOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public ComplexPropertyGetOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -72,35 +64,35 @@ protected override void SetParameters(OpenApiOperation operation) // Capabilities.TopSupported, Capabilities.SkipSupported, Capabilities.SearchRestrictions, // Capabilities.FilterRestrictions, and Capabilities.CountRestrictions // $top - parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(ComplexPropertySegment.Property, _document); + parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(ComplexPropertySegment.Property); if (parameter != null) { operation.Parameters.Add(parameter); } // $skip - parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(ComplexPropertySegment.Property, _document); + parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(ComplexPropertySegment.Property); if (parameter != null) { operation.Parameters.Add(parameter); } // $search - parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(ComplexPropertySegment.Property, _document); + parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(ComplexPropertySegment.Property); if (parameter != null) { operation.Parameters.Add(parameter); } // $filter - parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(ComplexPropertySegment.Property, _document); + parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(ComplexPropertySegment.Property); if (parameter != null) { operation.Parameters.Add(parameter); } // $count - parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(ComplexPropertySegment.Property, _document); + parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(ComplexPropertySegment.Property); if (parameter != null) { operation.Parameters.Add(parameter); @@ -159,12 +151,12 @@ protected override void SetResponses(OpenApiOperation operation) } else { - var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName()); SetSingleResponse(operation, schema); } - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -175,7 +167,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs index 43aeafa43..b95cd1c4e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPatchOperationHandler.cs @@ -9,14 +9,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPatchOperationHandler : ComplexPropertyUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public ComplexPropertyPatchOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs index 1d6c4e93a..736931c1d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPostOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPostOperationHandler : ComplexPropertyBaseOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public ComplexPropertyPostOperationHandler(OpenApiDocument document):base(document) - { - - } /// protected override void Initialize(ODataContext context, ODataPath path) { @@ -101,7 +93,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -112,7 +104,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) @@ -138,7 +130,7 @@ private OpenApiSchema GetOpenApiSchema() return new() { Type = JsonSchemaType.Array, - Items = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document) + Items = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName()) }; } } \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs index 3ea9d2995..83241ca74 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyPutOperationHandler.cs @@ -9,14 +9,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal class ComplexPropertyPutOperationHandler : ComplexPropertyUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public ComplexPropertyPutOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs index c05aa00d3..f101f2118 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ComplexPropertyUpdateOperationHandler.cs @@ -18,15 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation; internal abstract class ComplexPropertyUpdateOperationHandler : ComplexPropertyBaseOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected ComplexPropertyUpdateOperationHandler(OpenApiDocument document) : base(document) - { - - } - private UpdateRestrictionsType _updateRestrictions; protected override void Initialize(ODataContext context, ODataPath path) @@ -79,7 +70,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); base.SetResponses(operation); } protected override void SetSecurity(OpenApiOperation operation) @@ -89,7 +80,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) @@ -112,7 +103,7 @@ protected override void AppendCustomParameters(OpenApiOperation operation) private IOpenApiSchema GetOpenApiSchema() { - var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName(), _document); + var schema = new OpenApiSchemaReference(ComplexPropertySegment.ComplexType.FullName()); if (ComplexPropertySegment.Property.Type.IsCollection()) { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs index 226f45015..7fd5fa0c9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/DollarCountGetOperationHandler.cs @@ -24,14 +24,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class DollarCountGetOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public DollarCountGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -116,7 +108,7 @@ protected override void SetTags(OpenApiOperation operation) Name = tagName }); - operation.Tags.Add(new OpenApiTagReference(tagName, _document)); + operation.Tags.Add(new OpenApiTagReference(tagName)); } string TagNameFromNavigationSourceSegment(ODataNavigationSourceSegment sourceSegment) @@ -171,10 +163,10 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference(Constants.DollarCountSchemaName, _document) + new OpenApiResponseReference(Constants.DollarCountSchemaName) } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -186,13 +178,13 @@ protected override void SetParameters(OpenApiOperation operation) IOpenApiParameter parameter; - parameter = Context.CreateSearch(TargetPath, _document) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateSearch(x, _document)).FirstOrDefault(static x => x is not null)); + parameter = Context.CreateSearch(TargetPath) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateSearch(x)).FirstOrDefault(static x => x is not null)); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath, _document) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateFilter(x, _document)).FirstOrDefault(static x => x is not null)); + parameter = Context.CreateFilter(TargetPath) ?? (annotatables.Count == 0 ? null : annotatables.Select(x => Context.CreateFilter(x)).FirstOrDefault(static x => x is not null)); if (parameter != null) { operation.Parameters.Add(parameter); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs index 7d932f7e5..2f27652d7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionImportOperationHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmActionImportOperationHandler : EdmOperationImportOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EdmActionImportOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Post; @@ -33,7 +25,7 @@ protected override void SetRequestBody(OpenApiOperation operation) // The requestBody field contains a Request Body Object describing the structure of the request body. // Its schema value follows the rules for Schema Objects for complex types, with one property per action parameter. - operation.RequestBody = Context.CreateRequestBody(actionImport, _document); + operation.RequestBody = Context.CreateRequestBody(actionImport); base.SetRequestBody(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs index 39549df1f..bb595c083 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmActionOperationHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmActionOperationHandler : EdmOperationOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EdmActionOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Post; @@ -50,11 +42,11 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - if (EdmOperation is IEdmAction action && Context.CreateRequestBody(action, _document) is OpenApiRequestBody requestBody) + if (EdmOperation is IEdmAction action && Context.CreateRequestBody(action) is OpenApiRequestBody requestBody) { if (Context.Model.OperationTargetsMultiplePaths(action)) { - operation.RequestBody = new OpenApiRequestBodyReference($"{action.Name}RequestBody", _document); + operation.RequestBody = new OpenApiRequestBodyReference($"{action.Name}RequestBody"); } else { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs index 94522cb92..b284e9791 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionImportOperationHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmFunctionImportOperationHandler : EdmOperationImportOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EdmFunctionImportOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -39,7 +31,7 @@ protected override void SetParameters(OpenApiOperation operation) if (OperationImportSegment.ParameterMappings != null) { - foreach (var param in Context.CreateParameters(functionImport.Function, _document, OperationImportSegment.ParameterMappings)) + foreach (var param in Context.CreateParameters(functionImport.Function, OperationImportSegment.ParameterMappings)) { operation.Parameters.AppendParameter(param); } @@ -48,7 +40,7 @@ protected override void SetParameters(OpenApiOperation operation) { //The parameters array contains a Parameter Object for each parameter of the function overload, // and it contains specific Parameter Objects for the allowed system query options. - foreach (var param in Context.CreateParameters(functionImport, _document)) + foreach (var param in Context.CreateParameters(functionImport)) { operation.Parameters.AppendParameter(param); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs index 559663ebf..995e3abaf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmFunctionOperationHandler.cs @@ -17,14 +17,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EdmFunctionOperationHandler : EdmOperationOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EdmFunctionOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs index 532c38e26..30b745a81 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationImportOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EdmOperationImportOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected EdmOperationImportOperationHandler(OpenApiDocument document):base(document) - { - - } private OperationRestrictionsType _operationRestriction; /// @@ -100,7 +92,7 @@ protected override void SetResponses(OpenApiOperation operation) // describing the structure of the success response by referencing an appropriate schema // in the global schemas. In addition, it contains a default name/value pair for // the OData error response referencing the global responses. - operation.Responses = Context.CreateResponses(EdmOperationImport, _document); + operation.Responses = Context.CreateResponses(EdmOperationImport); base.SetResponses(operation); } @@ -113,7 +105,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); } /// @@ -141,7 +133,7 @@ protected override void SetTags(OpenApiOperation operation) var tag = CreateTag(EdmOperationImport); tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); Context.AppendTag(tag); - operation.Tags.Add(new OpenApiTagReference(tag.Name, _document)); + operation.Tags.Add(new OpenApiTagReference(tag.Name)); base.SetTags(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index cc2148507..33419aa0b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EdmOperationOperationHandler : OperationHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use to lookup references. - protected EdmOperationOperationHandler(OpenApiDocument document) : base(document) - { - - } private OperationRestrictionsType _operationRestriction; /// @@ -154,7 +146,7 @@ protected override void SetTags(OpenApiOperation operation) Name = tagName, }; tag.Extensions.Add(Constants.xMsTocType, new OpenApiAny("container")); - operation.Tags.Add(new OpenApiTagReference(tag.Name, _document)); + operation.Tags.Add(new OpenApiTagReference(tag.Name)); Context.AppendTag(tag); @@ -210,7 +202,7 @@ protected override void SetParameters(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.Responses = Context.CreateResponses(EdmOperation, _document); + operation.Responses = Context.CreateResponses(EdmOperation); base.SetResponses(operation); } @@ -222,7 +214,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); } /// @@ -249,31 +241,31 @@ private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation op if (function.ReturnType.IsCollection()) { // $top - if (Context.CreateTop(function, _document) is {} topParameter) + if (Context.CreateTop(function) is {} topParameter) { operation.Parameters.AppendParameter(topParameter); } // $skip - if (Context.CreateSkip(function, _document) is {} skipParameter) + if (Context.CreateSkip(function) is {} skipParameter) { operation.Parameters.AppendParameter(skipParameter); } // $search - if (Context.CreateSearch(function, _document) is {} searchParameter) + if (Context.CreateSearch(function) is {} searchParameter) { operation.Parameters.AppendParameter(searchParameter); } // $filter - if (Context.CreateFilter(function, _document) is {} filterParameter) + if (Context.CreateFilter(function) is {} filterParameter) { operation.Parameters.AppendParameter(filterParameter); } // $count - if (Context.CreateCount(function, _document) is {} countParameter) + if (Context.CreateCount(function) is {} countParameter) { operation.Parameters.AppendParameter(countParameter); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs index 343e8f997..83933ba56 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs @@ -20,14 +20,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityDeleteOperationHandler : EntitySetOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntityDeleteOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Delete; @@ -96,7 +88,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, _document, true); + operation.AddErrorResponses(settings, true); base.SetResponses(operation); } @@ -107,7 +99,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs index eca54745d..be37820c8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityGetOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityGetOperationHandler : EntitySetOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntityGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -103,7 +95,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); } if (Context.Settings.ShowLinks) @@ -114,7 +106,7 @@ protected override void SetResponses(OpenApiOperation operation) if (schema == null) { - schema = new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); + schema = new OpenApiSchemaReference(EntitySet.EntityType.FullName()); } operation.Responses = new OpenApiResponses @@ -138,7 +130,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -161,7 +153,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs index b99f6d559..1110a5ad0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPatchOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityPatchOperationHandler : EntityUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntityPatchOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs index 7cb79f953..aaf1b085f 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityPutOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntityPutOperationHandler : EntityUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntityPutOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs index e4d4067c4..3c6af965c 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetGetOperationHandler.cs @@ -24,14 +24,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntitySetGetOperationHandler : EntitySetOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntitySetGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -88,35 +80,35 @@ protected override void SetParameters(OpenApiOperation operation) // Capabilities.TopSupported, Capabilities.SkipSupported, Capabilities.SearchRestrictions, // Capabilities.FilterRestrictions, and Capabilities.CountRestrictions // $top - var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(EntitySet, _document); + var parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(EntitySet); if (parameter != null) { operation.Parameters.Add(parameter); } // $skip - parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(EntitySet, _document); + parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(EntitySet); if (parameter != null) { operation.Parameters.Add(parameter); } // $search - parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(EntitySet, _document); + parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(EntitySet); if (parameter != null) { operation.Parameters.Add(parameter); } // $filter - parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(EntitySet, _document); + parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(EntitySet); if (parameter != null) { operation.Parameters.Add(parameter); } // $count - parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(EntitySet, _document); + parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(EntitySet); if (parameter != null) { operation.Parameters.Add(parameter); @@ -155,11 +147,11 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}", _document) + new OpenApiResponseReference($"{EntitySet.EntityType.FullName()}{Constants.CollectionSchemaSuffix}") } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -171,7 +163,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs index fb8bb6d28..2a71c84fe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EntitySetOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected EntitySetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// /// Gets/sets the . /// @@ -47,7 +39,7 @@ protected override void SetTags(OpenApiOperation operation) { var tagName = EntitySet.Name + "." + EntitySet.EntityType.Name; - operation.Tags.Add(new OpenApiTagReference(tagName, _document)); + operation.Tags.Add(new OpenApiTagReference(tagName)); Context.AddExtensionToTag(tagName, Constants.xMsTocType, new OpenApiAny("page"), () => new OpenApiTag() { diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs index 4167d7d3b..16987c879 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntitySetPostOperationHandler.cs @@ -24,14 +24,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class EntitySetPostOperationHandler : EntitySetOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public EntitySetPostOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Post; @@ -93,7 +85,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -105,7 +97,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) @@ -194,8 +186,8 @@ private IDictionary GetContentDescription() private IOpenApiSchema GetEntitySchema() { return Context.Settings.EnableDerivedTypesReferencesForRequestBody ? - EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document) : - new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); + EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model) : + new OpenApiSchemaReference(EntitySet.EntityType.FullName()); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs index 01568a1b0..26e6aaa74 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EntityUpdateOperationHandler.cs @@ -21,14 +21,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class EntityUpdateOperationHandler : EntitySetOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected EntityUpdateOperationHandler(OpenApiDocument document):base(document) - { - - } private UpdateRestrictionsType _updateRestrictions; protected override void Initialize(ODataContext context, ODataPath path) @@ -116,7 +108,7 @@ protected IDictionary GetContent() /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -127,7 +119,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) @@ -152,10 +144,10 @@ private IOpenApiSchema GetOpenApiSchema() { if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - return EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model, _document); + return EdmModelHelper.GetDerivedTypesReferenceSchema(EntitySet.EntityType, Context.Model); } - return new OpenApiSchemaReference(EntitySet.EntityType.FullName(), _document); + return new OpenApiSchemaReference(EntitySet.EntityType.FullName()); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs index 0c311836c..ed65dbe27 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/IOperationHandlerProvider.cs @@ -18,8 +18,7 @@ internal interface IOperationHandlerProvider /// /// The path kind. /// The operation type. - /// The Open API document to use to lookup references. /// The corresponding . - IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType, OpenApiDocument document); + IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs index fc71789a9..bcd947aa8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityDeleteOperationHandler.cs @@ -10,14 +10,6 @@ namespace Microsoft.OpenApi.OData.Operation { internal class MediaEntityDeleteOperationHandler : MediaEntityOperationalHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public MediaEntityDeleteOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Delete; @@ -93,7 +85,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, _document, true); + operation.AddErrorResponses(settings, true); base.SetResponses(operation); } @@ -104,7 +96,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestrictions.Permissions).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs index 60a95ccdc..20c10d1d3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityGetOperationHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MediaEntityGetOperationHandler : MediaEntityOperationalHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public MediaEntityGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; private ReadRestrictionsType _readRestrictions = null; @@ -104,7 +96,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -130,7 +122,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs index 422c22564..c7ac1fa47 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityOperationalHandler.cs @@ -20,14 +20,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class MediaEntityOperationalHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected MediaEntityOperationalHandler(OpenApiDocument document) : base(document) - { - - } /// /// Gets/Sets the NavigationSource segment /// @@ -96,7 +88,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = tagIdentifier }); - operation.Tags.Add(new OpenApiTagReference(tagIdentifier, _document)); + operation.Tags.Add(new OpenApiTagReference(tagIdentifier)); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs index a1b9649ab..e7f99e5ee 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MediaEntityPutOperationHandler.cs @@ -21,14 +21,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MediaEntityPutOperationHandler : MediaEntityOperationalHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public MediaEntityPutOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Put; @@ -99,13 +91,13 @@ protected override void SetResponses(OpenApiOperation operation) // Get the entity type declaring this stream property. (var entityType, _) = GetStreamElements(); - var schema = new OpenApiSchemaReference(entityType.FullName(), _document); + var schema = new OpenApiSchemaReference(entityType.FullName()); - operation.AddErrorResponses(Context.Settings, _document, addNoContent: true, schema: schema); + operation.AddErrorResponses(Context.Settings, addNoContent: true, schema: schema); } else { - operation.AddErrorResponses(Context.Settings, _document, true); + operation.AddErrorResponses(Context.Settings, true); } base.SetResponses(operation); @@ -121,7 +113,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(update.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(update.Permissions).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs index 9cba74f5d..22d600a30 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/MetadataGetOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class MetadataGetOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public MetadataGetOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -76,7 +68,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs index 864c02ca8..ad0ac7eaa 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyDeleteOperationHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyDeleteOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use to lookups references. - public NavigationPropertyDeleteOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Delete; @@ -82,7 +74,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions).ToList(); } /// @@ -92,7 +84,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, _document, true); + operation.AddErrorResponses(settings, true); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs index 6ca66c765..40801332b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyGetOperationHandler.cs @@ -25,14 +25,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyGetOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use to lookup references. - public NavigationPropertyGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -107,7 +99,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}", _document) + new OpenApiResponseReference($"{NavigationProperty.ToEntityType().FullName()}{Constants.CollectionSchemaSuffix}") } }; } @@ -118,10 +110,10 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, Context.Model); } - schema ??= new OpenApiSchemaReference(entityType.FullName(), _document); + schema ??= new OpenApiSchemaReference(entityType.FullName()); operation.Responses = new OpenApiResponses { @@ -146,7 +138,7 @@ protected override void SetResponses(OpenApiOperation operation) }; } - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -166,31 +158,31 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. - var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); + var parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(NavigationProperty, _document); + parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(NavigationProperty, _document); + parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(NavigationProperty, _document); + parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(NavigationProperty, _document); + parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); @@ -239,7 +231,7 @@ protected override void SetSecurity(OpenApiOperation operation) readBase = _readRestriction.ReadByKeyRestrictions; } - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs index 240a6e2bd..a09511cba 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class NavigationPropertyOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected NavigationPropertyOperationHandler(OpenApiDocument document):base(document) - { - - } /// /// Gets the navigation property. /// @@ -99,7 +91,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = name }); - operation.Tags.Add(new OpenApiTagReference(name, _document)); + operation.Tags.Add(new OpenApiTagReference(name)); base.SetTags(operation); } @@ -221,7 +213,7 @@ protected IDictionary GetContent(IOpenApiSchema schema protected IOpenApiSchema GetOpenApiSchema() { - return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName(), _document); + return new OpenApiSchemaReference(NavigationProperty.ToEntityType().FullName()); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs index 46eda3a6b..d018087d8 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPatchOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPatchOperationHandler : NavigationPropertyUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public NavigationPropertyPatchOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Patch; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs index 2c4d1274e..849178aab 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPostOperationHandler.cs @@ -20,14 +20,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPostOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public NavigationPropertyPostOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Post; @@ -65,7 +57,7 @@ protected override void SetRequestBody(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); } operation.RequestBody = new OpenApiRequestBody @@ -85,7 +77,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); } operation.Responses = new OpenApiResponses @@ -99,7 +91,7 @@ protected override void SetResponses(OpenApiOperation operation) } } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -111,7 +103,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs index 09699293d..31a741d08 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyPutOperationHandler.cs @@ -14,14 +14,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class NavigationPropertyPutOperationHandler : NavigationPropertyUpdateOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public NavigationPropertyPutOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Put; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs index 9daf7e5fe..35a47c932 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/NavigationPropertyUpdateOperationHandler.cs @@ -21,14 +21,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class NavigationPropertyUpdateOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected NavigationPropertyUpdateOperationHandler(OpenApiDocument document):base(document) - { - - } private UpdateRestrictionsType _updateRestriction; /// @@ -62,7 +54,7 @@ protected override void SetRequestBody(OpenApiOperation operation) OpenApiSchema schema = null; if (Context.Settings.EnableDerivedTypesReferencesForRequestBody) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(NavigationProperty.ToEntityType(), Context.Model); } operation.RequestBody = new OpenApiRequestBody @@ -78,7 +70,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -89,7 +81,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs index c51adf320..fae852cf3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/ODataTypeCastGetOperationHandler.cs @@ -26,14 +26,6 @@ namespace Microsoft.OpenApi.OData.Operation; /// internal class ODataTypeCastGetOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public ODataTypeCastGetOperationHandler(OpenApiDocument document):base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -213,12 +205,12 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(targetStructuredType, Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(targetStructuredType, Context.Model); } if (schema == null) { - schema = new OpenApiSchemaReference(TargetSchemaElement.FullName(), _document); + schema = new OpenApiSchemaReference(TargetSchemaElement.FullName()); } SetSingleResponse(operation, schema); @@ -228,7 +220,7 @@ protected override void SetResponses(OpenApiOperation operation) SetCollectionResponse(operation, TargetSchemaElement.FullName()); } - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -265,7 +257,7 @@ protected override void SetTags(OpenApiOperation operation) { Name = tagName }); - operation.Tags.Add(new OpenApiTagReference(tagName, _document)); + operation.Tags.Add(new OpenApiTagReference(tagName)); } base.SetTags(operation); @@ -342,11 +334,11 @@ private IEnumerable GetParametersForAnnotableOfMany(IEdmVocab // Need to verify that TopSupported or others should be applied to navigation source. // So, how about for the navigation property. return [ - Context.CreateTop(annotable, _document), - Context.CreateSkip(annotable, _document), - Context.CreateSearch(annotable, _document), - Context.CreateFilter(annotable, _document), - Context.CreateCount(annotable, _document), + Context.CreateTop(annotable), + Context.CreateSkip(annotable), + Context.CreateSearch(annotable), + Context.CreateFilter(annotable), + Context.CreateCount(annotable), ]; } @@ -359,7 +351,7 @@ protected override void SetSecurity(OpenApiOperation operation) ReadRestrictionsBase readBase = restriction.ReadRestrictions; - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); } protected override void SetExtensions(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs index 5d934cb4e..dd0ac2a31 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs @@ -23,16 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class OperationHandler : IOperationHandler { - protected readonly OpenApiDocument _document; - /// - /// Creates a new instance of class. - /// - /// Document to use to lookup references. - protected OperationHandler(OpenApiDocument document) - { - Utils.CheckArgumentNull(document, nameof(document)); - _document = document; - } /// public abstract OperationType OperationType { get; } @@ -174,7 +164,7 @@ protected virtual void SetRequestBody(OpenApiOperation operation) /// The . protected virtual void SetParameters(OpenApiOperation operation) { - PathParameters = Path.CreatePathParameters(Context, _document); + PathParameters = Path.CreatePathParameters(Context); if (!Context.Settings.DeclarePathParametersOnPathItem) { foreach (var parameter in PathParameters) @@ -316,7 +306,7 @@ internal void SetCollectionResponse(OpenApiOperation operation, string targetEle { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"{targetElementFullName}{Constants.CollectionSchemaSuffix}", _document) + new OpenApiResponseReference($"{targetElementFullName}{Constants.CollectionSchemaSuffix}") } }; } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs index 92c4f131a..6f6c02966 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandlerProvider.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------ -using System.Collections.Generic; using Microsoft.OpenApi.Models; using Microsoft.OpenApi.OData.Edm; @@ -15,65 +14,65 @@ namespace Microsoft.OpenApi.OData.Operation internal class OperationHandlerProvider : IOperationHandlerProvider { /// - public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType, OpenApiDocument document) + public IOperationHandler GetHandler(ODataPathKind pathKind, OperationType operationType) { return (pathKind, operationType) switch { // entity set (Get/Post) - (ODataPathKind.EntitySet, OperationType.Get) => new EntitySetGetOperationHandler(document), - (ODataPathKind.EntitySet, OperationType.Post) => new EntitySetPostOperationHandler(document), + (ODataPathKind.EntitySet, OperationType.Get) => new EntitySetGetOperationHandler(), + (ODataPathKind.EntitySet, OperationType.Post) => new EntitySetPostOperationHandler(), // entity (Get/Patch/Put/Delete) - (ODataPathKind.Entity, OperationType.Get) => new EntityGetOperationHandler(document), - (ODataPathKind.Entity, OperationType.Patch) => new EntityPatchOperationHandler(document), - (ODataPathKind.Entity, OperationType.Put) => new EntityPutOperationHandler(document), - (ODataPathKind.Entity, OperationType.Delete) => new EntityDeleteOperationHandler(document), + (ODataPathKind.Entity, OperationType.Get) => new EntityGetOperationHandler(), + (ODataPathKind.Entity, OperationType.Patch) => new EntityPatchOperationHandler(), + (ODataPathKind.Entity, OperationType.Put) => new EntityPutOperationHandler(), + (ODataPathKind.Entity, OperationType.Delete) => new EntityDeleteOperationHandler(), // singleton (Get/Patch) - (ODataPathKind.Singleton, OperationType.Get) => new SingletonGetOperationHandler(document), - (ODataPathKind.Singleton, OperationType.Patch) => new SingletonPatchOperationHandler(document), + (ODataPathKind.Singleton, OperationType.Get) => new SingletonGetOperationHandler(), + (ODataPathKind.Singleton, OperationType.Patch) => new SingletonPatchOperationHandler(), // edm operation (Get|Post) - (ODataPathKind.Operation, OperationType.Get) => new EdmFunctionOperationHandler(document), - (ODataPathKind.Operation, OperationType.Post) => new EdmActionOperationHandler(document), + (ODataPathKind.Operation, OperationType.Get) => new EdmFunctionOperationHandler(), + (ODataPathKind.Operation, OperationType.Post) => new EdmActionOperationHandler(), // edm operation import (Get|Post) - (ODataPathKind.OperationImport, OperationType.Get) => new EdmFunctionImportOperationHandler(document), - (ODataPathKind.OperationImport, OperationType.Post) => new EdmActionImportOperationHandler(document), + (ODataPathKind.OperationImport, OperationType.Get) => new EdmFunctionImportOperationHandler(), + (ODataPathKind.OperationImport, OperationType.Post) => new EdmActionImportOperationHandler(), // navigation property (Get/Patch/Put/Post/Delete) - (ODataPathKind.NavigationProperty, OperationType.Get) => new NavigationPropertyGetOperationHandler(document), - (ODataPathKind.NavigationProperty, OperationType.Patch) => new NavigationPropertyPatchOperationHandler(document), - (ODataPathKind.NavigationProperty, OperationType.Put) => new NavigationPropertyPutOperationHandler(document), - (ODataPathKind.NavigationProperty, OperationType.Post) => new NavigationPropertyPostOperationHandler(document), - (ODataPathKind.NavigationProperty, OperationType.Delete) => new NavigationPropertyDeleteOperationHandler(document), + (ODataPathKind.NavigationProperty, OperationType.Get) => new NavigationPropertyGetOperationHandler(), + (ODataPathKind.NavigationProperty, OperationType.Patch) => new NavigationPropertyPatchOperationHandler(), + (ODataPathKind.NavigationProperty, OperationType.Put) => new NavigationPropertyPutOperationHandler(), + (ODataPathKind.NavigationProperty, OperationType.Post) => new NavigationPropertyPostOperationHandler(), + (ODataPathKind.NavigationProperty, OperationType.Delete) => new NavigationPropertyDeleteOperationHandler(), // navigation property ref (Get/Post/Put/Delete) - (ODataPathKind.Ref, OperationType.Get) => new RefGetOperationHandler(document), - (ODataPathKind.Ref, OperationType.Put) => new RefPutOperationHandler(document), - (ODataPathKind.Ref, OperationType.Post) => new RefPostOperationHandler(document), - (ODataPathKind.Ref, OperationType.Delete) => new RefDeleteOperationHandler(document), + (ODataPathKind.Ref, OperationType.Get) => new RefGetOperationHandler(), + (ODataPathKind.Ref, OperationType.Put) => new RefPutOperationHandler(), + (ODataPathKind.Ref, OperationType.Post) => new RefPostOperationHandler(), + (ODataPathKind.Ref, OperationType.Delete) => new RefDeleteOperationHandler(), // media entity operation (Get|Put|Delete) - (ODataPathKind.MediaEntity, OperationType.Get) => new MediaEntityGetOperationHandler(document), - (ODataPathKind.MediaEntity, OperationType.Put) => new MediaEntityPutOperationHandler(document), - (ODataPathKind.MediaEntity, OperationType.Delete) => new MediaEntityDeleteOperationHandler(document), + (ODataPathKind.MediaEntity, OperationType.Get) => new MediaEntityGetOperationHandler(), + (ODataPathKind.MediaEntity, OperationType.Put) => new MediaEntityPutOperationHandler(), + (ODataPathKind.MediaEntity, OperationType.Delete) => new MediaEntityDeleteOperationHandler(), // $metadata operation (Get) - (ODataPathKind.Metadata, OperationType.Get) => new MetadataGetOperationHandler(document), + (ODataPathKind.Metadata, OperationType.Get) => new MetadataGetOperationHandler(), // $count operation (Get) - (ODataPathKind.DollarCount, OperationType.Get) => new DollarCountGetOperationHandler(document), + (ODataPathKind.DollarCount, OperationType.Get) => new DollarCountGetOperationHandler(), // .../namespace.typename (cast, get) - (ODataPathKind.TypeCast, OperationType.Get) => new ODataTypeCastGetOperationHandler(document), + (ODataPathKind.TypeCast, OperationType.Get) => new ODataTypeCastGetOperationHandler(), // .../entity/propertyOfComplexType (Get/Patch/Put/Delete) - (ODataPathKind.ComplexProperty, OperationType.Get) => new ComplexPropertyGetOperationHandler(document), - (ODataPathKind.ComplexProperty, OperationType.Patch) => new ComplexPropertyPatchOperationHandler(document), - (ODataPathKind.ComplexProperty, OperationType.Put) => new ComplexPropertyPutOperationHandler(document), - (ODataPathKind.ComplexProperty, OperationType.Post) => new ComplexPropertyPostOperationHandler(document), + (ODataPathKind.ComplexProperty, OperationType.Get) => new ComplexPropertyGetOperationHandler(), + (ODataPathKind.ComplexProperty, OperationType.Patch) => new ComplexPropertyPatchOperationHandler(), + (ODataPathKind.ComplexProperty, OperationType.Put) => new ComplexPropertyPutOperationHandler(), + (ODataPathKind.ComplexProperty, OperationType.Post) => new ComplexPropertyPostOperationHandler(), (_, _) => null, }; diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs index 7cb172556..9fe9673c5 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefDeleteOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefDeleteOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public RefDeleteOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Delete; private DeleteRestrictionsType _deleteRestriction; @@ -109,7 +101,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_deleteRestriction.Permissions).ToList(); } /// @@ -119,7 +111,7 @@ protected override void SetResponses(OpenApiOperation operation) OpenApiConvertSettings settings = Context.Settings.Clone(); settings.UseSuccessStatusCodeRange = false; - operation.AddErrorResponses(settings, _document, true); + operation.AddErrorResponses(settings, true); base.SetResponses(operation); } diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs index 1dc242b5d..48d3fe7e1 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefGetOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefGetOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use to lookup references. - public RefGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; private ReadRestrictionsType _readRestriction; @@ -92,7 +84,7 @@ protected override void SetResponses(OpenApiOperation operation) { { Context.Settings.UseSuccessStatusCodeRange ? Constants.StatusCodeClass2XX : Constants.StatusCode200, - new OpenApiResponseReference($"String{Constants.CollectionSchemaSuffix}", _document) + new OpenApiResponseReference($"String{Constants.CollectionSchemaSuffix}") } }; } @@ -136,7 +128,7 @@ protected override void SetResponses(OpenApiOperation operation) }; } - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -150,31 +142,31 @@ protected override void SetParameters(OpenApiOperation operation) { // Need to verify that TopSupported or others should be applied to navigaiton source. // So, how about for the navigation property. - var parameter = Context.CreateTop(TargetPath, _document) ?? Context.CreateTop(NavigationProperty, _document); + var parameter = Context.CreateTop(TargetPath) ?? Context.CreateTop(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSkip(TargetPath, _document) ?? Context.CreateSkip(NavigationProperty, _document); + parameter = Context.CreateSkip(TargetPath) ?? Context.CreateSkip(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateSearch(TargetPath, _document) ?? Context.CreateSearch(NavigationProperty, _document); + parameter = Context.CreateSearch(TargetPath) ?? Context.CreateSearch(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateFilter(TargetPath, _document) ?? Context.CreateFilter(NavigationProperty, _document); + parameter = Context.CreateFilter(TargetPath) ?? Context.CreateFilter(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); } - parameter = Context.CreateCount(TargetPath, _document) ?? Context.CreateCount(NavigationProperty, _document); + parameter = Context.CreateCount(TargetPath) ?? Context.CreateCount(NavigationProperty); if (parameter != null) { operation.Parameters.Add(parameter); @@ -196,7 +188,7 @@ protected override void SetSecurity(OpenApiOperation operation) } ReadRestrictionsBase readBase = _readRestriction; - operation.Security = Context.CreateSecurityRequirements(readBase.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(readBase.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs index faa3b99d4..7b2548ab4 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPostOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefPostOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public RefPostOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Post; private InsertRestrictionsType _insertRestriction; @@ -56,7 +48,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePostRequestBodyName, _document); + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePostRequestBodyName); base.SetRequestBody(operation); } @@ -72,7 +64,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -84,7 +76,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_insertRestriction.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs index fb4d7b190..ff2fb25ec 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/RefPutOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class RefPutOperationHandler : NavigationPropertyOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public RefPutOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Patch; private UpdateRestrictionsType _updateRestriction; @@ -56,7 +48,7 @@ protected override void SetBasicInfo(OpenApiOperation operation) /// protected override void SetRequestBody(OpenApiOperation operation) { - operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePutRequestBodyName, _document); + operation.RequestBody = new OpenApiRequestBodyReference(Constants.ReferencePutRequestBodyName); base.SetRequestBody(operation); } @@ -72,7 +64,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -83,7 +75,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestriction.Permissions).ToList(); } protected override void AppendCustomParameters(OpenApiOperation operation) diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs index 9b8b55a92..bb39b8bfe 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonGetOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class SingletonGetOperationHandler : SingletonOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public SingletonGetOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Get; @@ -90,7 +82,7 @@ protected override void SetResponses(OpenApiOperation operation) if (Context.Settings.EnableDerivedTypesReferencesForResponses) { - schema = EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document); + schema = EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model); } if (Context.Settings.ShowLinks) @@ -99,7 +91,7 @@ protected override void SetResponses(OpenApiOperation operation) entityKind: Singleton.ContainerElementKind.ToString(), path: Path, parameters: PathParameters); } - schema ??= new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); + schema ??= new OpenApiSchemaReference(Singleton.EntityType.FullName()); operation.Responses = new OpenApiResponses { @@ -123,7 +115,7 @@ protected override void SetResponses(OpenApiOperation operation) } }; - operation.AddErrorResponses(Context.Settings, _document, false); + operation.AddErrorResponses(Context.Settings, false); base.SetResponses(operation); } @@ -136,7 +128,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_readRestrictions.Permissions).ToList(); } /// diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs index dcd33ef11..cbc8971c6 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonOperationHandler.cs @@ -18,14 +18,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal abstract class SingletonOperationHandler : OperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - protected SingletonOperationHandler(OpenApiDocument document):base(document) - { - - } /// /// Gets the . /// @@ -54,7 +46,7 @@ protected override void SetTags(OpenApiOperation operation) Name = tagName }); - operation.Tags.Add(new OpenApiTagReference(tagName, _document)); + operation.Tags.Add(new OpenApiTagReference(tagName)); // Call base.SetTags() at the end of this method. base.SetTags(operation); diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs index e8cb4b945..51eebb81e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/SingletonPatchOperationHandler.cs @@ -23,14 +23,6 @@ namespace Microsoft.OpenApi.OData.Operation /// internal class SingletonPatchOperationHandler : SingletonOperationHandler { - /// - /// Initializes a new instance of class. - /// - /// The document to use to lookup references. - public SingletonPatchOperationHandler(OpenApiDocument document) : base(document) - { - - } /// public override OperationType OperationType => OperationType.Patch; @@ -86,7 +78,7 @@ protected override void SetRequestBody(OpenApiOperation operation) /// protected override void SetResponses(OpenApiOperation operation) { - operation.AddErrorResponses(Context.Settings, _document, true, GetOpenApiSchema()); + operation.AddErrorResponses(Context.Settings, true, GetOpenApiSchema()); base.SetResponses(operation); } @@ -98,7 +90,7 @@ protected override void SetSecurity(OpenApiOperation operation) return; } - operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions, _document).ToList(); + operation.Security = Context.CreateSecurityRequirements(_updateRestrictions.Permissions).ToList(); } /// @@ -123,8 +115,8 @@ protected override void AppendCustomParameters(OpenApiOperation operation) private IOpenApiSchema GetOpenApiSchema() { return Context.Settings.EnableDerivedTypesReferencesForRequestBody ? - EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model, _document) : - new OpenApiSchemaReference(Singleton.EntityType.FullName(), _document); + EdmModelHelper.GetDerivedTypesReferenceSchema(Singleton.EntityType, Context.Model) : + new OpenApiSchemaReference(Singleton.EntityType.FullName()); } } } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/CachedPathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/CachedPathItemHandlerProvider.cs new file mode 100644 index 000000000..e978c2227 --- /dev/null +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/CachedPathItemHandlerProvider.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +// ------------------------------------------------------------ + +using System.Collections.Generic; +using Microsoft.OpenApi.OData.Common; +using Microsoft.OpenApi.OData.Edm; + +namespace Microsoft.OpenApi.OData.PathItem; +/// +/// Cached path item handler provider. +/// +internal class CachedPathItemHandlerProvider : IPathItemHandlerProvider +{ + private readonly IPathItemHandlerProvider _concreteProvider; + private readonly Dictionary _cache = new(); + public CachedPathItemHandlerProvider(IPathItemHandlerProvider concreteProvider) + { + Utils.CheckArgumentNull(concreteProvider, nameof(concreteProvider)); + _concreteProvider = concreteProvider; + } + /// + public IPathItemHandler GetHandler(ODataPathKind pathKind) + { + if (!_cache.TryGetValue(pathKind, out IPathItemHandler handler)) + { + handler = _concreteProvider.GetHandler(pathKind); + _cache[pathKind] = handler; + } + return handler; + } +} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs index a3397eedb..b08a22892 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ComplexPropertyItemHandler.cs @@ -13,14 +13,6 @@ namespace Microsoft.OpenApi.OData.PathItem; internal class ComplexPropertyItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public ComplexPropertyItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.ComplexProperty; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs index f1c124d1c..91509b68d 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/DollarCountPathItemHandler.cs @@ -13,14 +13,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class DollarCountPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public DollarCountPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.DollarCount; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs index 02aef7434..0cbbb54ce 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntityPathItemHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class EntityPathItemHandler : EntitySetPathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public EntityPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.Entity; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs index 57d111362..a6f8cb70b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/EntitySetPathItemHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class EntitySetPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public EntitySetPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.EntitySet; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs index 5e6a39ffb..b1cac2e16 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/IPathItemHandlerProvider.cs @@ -17,8 +17,7 @@ internal interface IPathItemHandlerProvider /// Get the based on the path type. /// /// The path kind. - /// The Open API document to use to lookup references. /// The . - IPathItemHandler GetHandler(ODataPathKind pathKind, OpenApiDocument document); + IPathItemHandler GetHandler(ODataPathKind pathKind); } } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs index 48613a57c..17dd2d7f1 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MediaEntityPathItemHandler.cs @@ -15,14 +15,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class MediaEntityPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public MediaEntityPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.MediaEntity; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs index 28d974e63..d76496bb7 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/MetadataPathItemHandler.cs @@ -13,14 +13,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class MetadataPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public MetadataPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.Metadata; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs index 890f24eef..45f18fc5a 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/NavigationPropertyPathItemHandler.cs @@ -22,14 +22,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class NavigationPropertyPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public NavigationPropertyPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.NavigationProperty; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs index 13f1b406d..becbb2d65 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs @@ -15,14 +15,6 @@ namespace Microsoft.OpenApi.OData.PathItem; /// internal class ODataTypeCastPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public ODataTypeCastPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.TypeCast; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs index e26511d5e..b447fa1c9 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationImportPathItemHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class OperationImportPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public OperationImportPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.OperationImport; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs index 775816da8..484e8cd02 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/OperationPathItemHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class OperationPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public OperationPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.Operation; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs index e71b6d371..914003cf2 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandler.cs @@ -18,16 +18,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal abstract class PathItemHandler : IPathItemHandler { - private readonly OpenApiDocument _document; - /// - /// Initializes a new instance of the class. - /// - /// The document to use to lookup references. - protected PathItemHandler(OpenApiDocument document) - { - Utils.CheckArgumentNull(document, nameof(document)); - _document = document; - } /// /// Gets the handler path kind. /// @@ -120,7 +110,7 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio } IOperationHandlerProvider provider = Context.OperationHandlerProvider; - IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType, _document); + IOperationHandler operationHandler = provider.GetHandler(Path.Kind, operationType); item.AddOperation(operationType, operationHandler.CreateOperation(Context, Path)); } @@ -130,7 +120,7 @@ protected virtual void AddOperation(OpenApiPathItem item, OperationType operatio /// The . protected virtual void SetParameters(OpenApiPathItem item) { - foreach (var parameter in Path.CreatePathParameters(Context, _document)) + foreach (var parameter in Path.CreatePathParameters(Context)) { item.Parameters.AppendParameter(parameter); } diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/PathItemHandlerProvider.cs index 90c82c47a..9815a0db7 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 @@ -14,44 +13,44 @@ namespace Microsoft.OpenApi.OData.PathItem internal class PathItemHandlerProvider : IPathItemHandlerProvider { /// - public IPathItemHandler GetHandler(ODataPathKind pathKind, OpenApiDocument document) + public IPathItemHandler GetHandler(ODataPathKind pathKind) { return pathKind switch { // EntitySet - ODataPathKind.EntitySet => new EntitySetPathItemHandler(document), + ODataPathKind.EntitySet => new EntitySetPathItemHandler(), // Entity - ODataPathKind.Entity => new EntityPathItemHandler(document), + ODataPathKind.Entity => new EntityPathItemHandler(), // Singleton - ODataPathKind.Singleton => new SingletonPathItemHandler(document), + ODataPathKind.Singleton => new SingletonPathItemHandler(), // Navigation property - ODataPathKind.NavigationProperty => new NavigationPropertyPathItemHandler(document), + ODataPathKind.NavigationProperty => new NavigationPropertyPathItemHandler(), // Edm Operation - ODataPathKind.Operation => new OperationPathItemHandler(document), + ODataPathKind.Operation => new OperationPathItemHandler(), // Edm OperationImport - ODataPathKind.OperationImport => new OperationImportPathItemHandler(document), + ODataPathKind.OperationImport => new OperationImportPathItemHandler(), // Edm Ref - ODataPathKind.Ref => new RefPathItemHandler(document), + ODataPathKind.Ref => new RefPathItemHandler(), // Media Entity - ODataPathKind.MediaEntity => new MediaEntityPathItemHandler(document), + ODataPathKind.MediaEntity => new MediaEntityPathItemHandler(), // $Metadata - ODataPathKind.Metadata => new MetadataPathItemHandler(document), + ODataPathKind.Metadata => new MetadataPathItemHandler(), // $count - ODataPathKind.DollarCount => new DollarCountPathItemHandler(document), + ODataPathKind.DollarCount => new DollarCountPathItemHandler(), // ~/groups/{id}/members/microsoft.graph.user - ODataPathKind.TypeCast => new ODataTypeCastPathItemHandler(document), + ODataPathKind.TypeCast => new ODataTypeCastPathItemHandler(), // ~/users/{id}/mailboxSettings - ODataPathKind.ComplexProperty => new ComplexPropertyItemHandler(document), + ODataPathKind.ComplexProperty => new ComplexPropertyItemHandler(), // Unknown _ => null, diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs index 6b2450925..c5d59673b 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/RefPathItemHandler.cs @@ -19,14 +19,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class RefPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public RefPathItemHandler(OpenApiDocument document) : base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.Ref; diff --git a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs index 5715c8cba..7e38a3912 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/PathItem/SingletonPathItemHandler.cs @@ -16,14 +16,6 @@ namespace Microsoft.OpenApi.OData.PathItem /// internal class SingletonPathItemHandler : PathItemHandler { - /// - /// Initializes a new instance of the class. - /// - /// The document to use for references lookup. - public SingletonPathItemHandler(OpenApiDocument document): base(document) - { - - } /// protected override ODataPathKind HandleKind => ODataPathKind.Singleton; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs index 860780d67..576677d2b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Common/OpenApiOperationExtensionsTests.cs @@ -25,7 +25,7 @@ public void AddsErrorResponses(bool addNoContent, bool errorAsDefault) var operation = new OpenApiOperation(); // Act - operation.AddErrorResponses(settings, new(), addNoContent); + operation.AddErrorResponses(settings, addNoContent); // Assert Assert.NotNull(operation.Responses); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs index 886868d91..6898c61ed 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiErrorSchemaGeneraratorTests.cs @@ -22,7 +22,7 @@ public void AddsEmptyInnerErrorWhenNoComplexTypeIsProvided() }; ODataContext context = new(model, settings); - var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context, new()); + var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.Empty(schema.Properties); @@ -37,7 +37,7 @@ public void AddsInnerErrorPropertiesWhenComplexTypeIsProvided() }; ODataContext context = new(model, settings); - var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context, new()); + var schema = OpenApiErrorSchemaGenerator.CreateInnerErrorSchema(context); Assert.Equal(JsonSchemaType.Object, schema.Type); Assert.NotEmpty(schema.Properties); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs index 3301782b5..d819da8fc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiParameterGeneratorTests.cs @@ -158,7 +158,7 @@ public async Task CreateKeyParametersForSingleKeyWorks(bool prefix) ODataKeySegment keySegment = new ODataKeySegment(customer); // Act - var parameters = context.CreateKeyParameters(keySegment, new()); + var parameters = context.CreateKeyParameters(keySegment); // Assert Assert.NotNull(parameters); @@ -218,7 +218,7 @@ public async Task CreateKeyParametersForCompositeKeyWorks(bool prefix) ODataKeySegment keySegment = new ODataKeySegment(customer); // Act - var parameters = context.CreateKeyParameters(keySegment, new()); + var parameters = context.CreateKeyParameters(keySegment); // Assert Assert.NotNull(parameters); @@ -279,7 +279,7 @@ public async Task CreateKeyParametersForAlternateKeyWithSinglePropertyWorks() }; // Act - var parameters = context.CreateKeyParameters(keySegment, new()); + var parameters = context.CreateKeyParameters(keySegment); var altParameter = parameters.Last(); // Assert @@ -326,7 +326,7 @@ public async Task CreateKeyParametersForAlternateKeyWithMultiplePropertiesWorks( }; // Act - var parameters = context.CreateKeyParameters(keySegment, new()); + var parameters = context.CreateKeyParameters(keySegment); var altParameter1 = parameters.First(); var altParameter2 = parameters.Last(); @@ -575,9 +575,9 @@ public async Task CreateParametersWorks() Assert.NotNull(function3); // Act - var parameters1 = context.CreateParameters(function1, new()); - var parameters2 = context.CreateParameters(function2, new()); - var parameters3 = context.CreateParameters(function3, new()); + var parameters1 = context.CreateParameters(function1); + var parameters2 = context.CreateParameters(function2); + var parameters3 = context.CreateParameters(function3); // Assert Assert.NotNull(parameters1); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs index c778f904d..acc14c881 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiRequestBodyGeneratorTests.cs @@ -59,7 +59,7 @@ public void CreateRequestBodyForActionImportThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateRequestBody(actionImport: null, new())); + Assert.Throws("context", () => context.CreateRequestBody(actionImport: null)); } [Fact] @@ -69,7 +69,7 @@ public void CreateRequestBodyForActionImportThrowArgumentNullActionImport() ODataContext context = new ODataContext(EdmModelHelper.BasicEdmModel); // Act & Assert - Assert.Throws("actionImport", () => context.CreateRequestBody(actionImport: null, new())); + Assert.Throws("actionImport", () => context.CreateRequestBody(actionImport: null)); } [Fact] @@ -79,7 +79,7 @@ public void CreateRequestBodyForActionImportReturnCorrectRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_actionImport, new()); + var requestBody = context.CreateRequestBody(_actionImport); // Assert Assert.NotNull(requestBody); @@ -105,7 +105,7 @@ public async Task CanSerializeAsJsonFromTheCreatedRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_actionImport, new()); + var requestBody = context.CreateRequestBody(_actionImport); // Assert string json = await requestBody.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); @@ -140,7 +140,7 @@ public void CreateRequestBodyForActionReturnCorrectRequestBody() ODataContext context = new ODataContext(_model); // Act - var requestBody = context.CreateRequestBody(_action, new()); + var requestBody = context.CreateRequestBody(_action); // Assert Assert.NotNull(requestBody); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs index 0a780099c..d45a3001e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiResponseGeneratorTests.cs @@ -27,7 +27,7 @@ public class OpenApiResponseGeneratorTest public void GetResponseReturnsNullResponseObject(string input) { // Arrange & Act - var response = input.GetResponse(new()); + var response = input.GetResponse(); // Assert Assert.Null(response); @@ -39,7 +39,7 @@ public void GetResponseReturnsNullResponseObject(string input) public void GetResponseReturnsResponseObject(string input) { // Arrange & Act - var response = input.GetResponse(new()); + var response = input.GetResponse(); // Assert Assert.NotNull(response); @@ -144,7 +144,7 @@ public void CreateResponseForoperationImportThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateResponses(operationImport: null, new())); + Assert.Throws("context", () => context.CreateResponses(operationImport: null)); } [Fact] @@ -154,7 +154,7 @@ public void CreateResponseForoperationImportThrowArgumentNullOperationImport() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("operationImport", () => context.CreateResponses(operationImport: null, new())); + Assert.Throws("operationImport", () => context.CreateResponses(operationImport: null)); } [Fact] @@ -164,7 +164,7 @@ public void CreateResponseForOperationThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateResponses(operation: null, new())); + Assert.Throws("context", () => context.CreateResponses(operation: null)); } [Fact] @@ -174,7 +174,7 @@ public void CreateResponseForOperationThrowArgumentNullOperation() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("operation", () => context.CreateResponses(operation: null, new())); + Assert.Throws("operation", () => context.CreateResponses(operation: null)); } [Theory] @@ -200,14 +200,14 @@ public void CreateResponseForEdmFunctionReturnCorrectResponses(bool isFunctionIm IEdmOperationImport operationImport = model.EntityContainer.OperationImports().First(o => o.Name == operationName); Assert.NotNull(operationImport); // guard ODataPath path = new ODataPath(new ODataOperationImportSegment(operationImport)); - responses = context.CreateResponses(operationImport, new()); + responses = context.CreateResponses(operationImport); } else { IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == operationName); Assert.NotNull(operation); // guard ODataPath path = new ODataPath(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation, new()); + responses = context.CreateResponses(operation); } // Assert @@ -259,8 +259,8 @@ public void CreateResponseForEdmFunctionOfStreamReturnTypeReturnsCorrectResponse Assert.NotNull(operation2); ODataPath path1 = new(new ODataOperationSegment(operation1)); ODataPath path2 = new(new ODataOperationSegment(operation2)); - OpenApiResponses responses1 = context.CreateResponses(operation1, new()); - OpenApiResponses responses2 = context.CreateResponses(operation2, new()); + OpenApiResponses responses1 = context.CreateResponses(operation1); + OpenApiResponses responses2 = context.CreateResponses(operation2); // Assert for operation1 --> getMailboxUsageStorage Assert.NotNull(responses1); @@ -300,14 +300,14 @@ public void CreateResponseForEdmActionReturnCorrectResponses(string actionName, IEdmOperationImport operationImport = model.EntityContainer.OperationImports().First(o => o.Name == actionName); Assert.NotNull(operationImport); // guard ODataPath path = new ODataPath(new ODataOperationImportSegment(operationImport)); - responses = context.CreateResponses(operationImport, new()); + responses = context.CreateResponses(operationImport); } else { IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == actionName); Assert.NotNull(operation); // guard ODataPath path = new ODataPath(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation, new()); + responses = context.CreateResponses(operation); } // Assert @@ -336,7 +336,7 @@ public void CreateResponseForEdmActionWhenErrorResponsesAsDefaultIsSet(string ac IEdmOperation operation = model.SchemaElements.OfType().First(o => o.Name == actionName); Assert.NotNull(operation); // guard ODataPath path = new(new ODataOperationSegment(operation)); - responses = context.CreateResponses(operation, new()); + responses = context.CreateResponses(operation); // Assert Assert.NotNull(responses); @@ -368,7 +368,7 @@ public async Task CreateResponseForDeltaEdmFunctionReturnCorrectResponses(bool e IEdmFunction operation = model.SchemaElements.OfType().First(o => o.Name == "delta" && o.Parameters.First().Type.FullName() == "Collection(microsoft.graph.application)"); Assert.NotNull(operation); // guard - OpenApiResponses responses = context.CreateResponses(operation, new()); + OpenApiResponses responses = context.CreateResponses(operation); string json = await responses.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs index 9774886f2..b5637cf48 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs @@ -163,7 +163,7 @@ public void CreateStructuredTypeSchemaThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateStructuredTypeSchema(structuredType: null, new())); + Assert.Throws("context", () => context.CreateStructuredTypeSchema(structuredType: null)); } [Fact] @@ -173,7 +173,7 @@ public void CreateStructuredTypeSchemaThrowArgumentNullEnumType() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act & Assert - Assert.Throws("structuredType", () => context.CreateStructuredTypeSchema(structuredType: null, new())); + Assert.Throws("structuredType", () => context.CreateStructuredTypeSchema(structuredType: null)); } [Fact] @@ -193,8 +193,8 @@ public async Task CreateStructuredTypeSchemaForEntityTypeWithDiscriminatorValueE Assert.NotNull(derivedEntity); // Act - var schema = context.CreateStructuredTypeSchema(entity, new()); - var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity, new()); + var schema = context.CreateStructuredTypeSchema(entity); + var derivedSchema = context.CreateStructuredTypeSchema(derivedEntity); var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); // Assert @@ -283,7 +283,7 @@ public async Task CreateStructuredTypeSchemaForComplexTypeWithDiscriminatorValue Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex, new()); + var schema = context.CreateStructuredTypeSchema(complex); string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -362,7 +362,7 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns Assert.NotNull(entity); // Guard // Act - OpenApiSchema schema = context.CreateStructuredTypeSchema(entity, new()); + OpenApiSchema schema = context.CreateStructuredTypeSchema(entity); string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -455,7 +455,7 @@ public async Task CreateComplexTypeWithoutBaseSchemaReturnCorrectSchema() Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex, new()); + var schema = context.CreateStructuredTypeSchema(complex); // Assert Assert.NotNull(schema); @@ -508,7 +508,7 @@ public async Task CreateComplexTypeWithBaseSchemaReturnCorrectSchema() Assert.NotNull(complex); // Guard // Act - var schema = context.CreateStructuredTypeSchema(complex, new()); + var schema = context.CreateStructuredTypeSchema(complex); // Assert Assert.NotNull(schema); @@ -599,7 +599,7 @@ public async Task CreateEntityTypeWithoutBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity, new()); + var schema = context.CreateStructuredTypeSchema(entity); // Assert Assert.NotNull(schema); @@ -660,7 +660,7 @@ public async Task CreateEntityTypeWithBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity, new()); + var schema = context.CreateStructuredTypeSchema(entity); // Assert Assert.NotNull(schema); @@ -735,7 +735,7 @@ public void CreateEntityTypeWithCrossReferenceBaseSchemaReturnCorrectSchema() Assert.NotNull(entity); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entity, new()); + var schema = context.CreateStructuredTypeSchema(entity); // Assert Assert.NotNull(schema); @@ -785,7 +785,7 @@ public async Task CreateStructuredTypeSchemaForEntityTypeWithDefaultValueForOdat Assert.NotNull(entityType); // Guard // Act - var schema = context.CreateStructuredTypeSchema(entityType, new()); + var schema = context.CreateStructuredTypeSchema(entityType); string json = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); // Assert @@ -872,7 +872,7 @@ public async Task CreatePropertySchemaForNonNullableEnumPropertyReturnSchema(Ope IEdmProperty property = new EdmStructuralProperty(entitType, "ColorEnumValue", new EdmEnumTypeReference(enumType, false)); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); Assert.NotNull(schema); string json = await schema.SerializeAsJsonAsync(specVersion); @@ -909,7 +909,7 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp IEdmProperty property = new EdmStructuralProperty(entityType, "ColorEnumValue", new EdmEnumTypeReference(enumType, true), "yellow"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); Assert.NotNull(schema); string json = await schema.SerializeAsJsonAsync(specVersion); _output.WriteLine(json); @@ -971,7 +971,7 @@ public async Task CreatePropertySchemaWithComputedAnnotationReturnsCorrectSchema IEdmProperty property = entityType.Properties().FirstOrDefault(x => x.Name == "duration"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); Assert.NotNull(schema); var json = JsonNode.Parse(await schema.SerializeAsJsonAsync(specVersion)); @@ -1006,12 +1006,11 @@ public void GetDerivedTypesReferenceSchemaReturnsDerivedTypesReferencesInSchemaI { // Arrange IEdmModel edmModel = EdmModelHelper.GraphBetaModel; - OpenApiDocument openApiDocument = new(); IEdmEntityType entityType = edmModel.SchemaElements.OfType().First(c => c.Name == "directoryObject"); OpenApiSchema schema = null; // Act - schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel, openApiDocument); + schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel); int derivedTypesCount = edmModel.FindAllDerivedTypes(entityType).OfType().Count() + 1; // + 1 the base type // Assert @@ -1024,12 +1023,11 @@ public void GetDerivedTypesReferenceSchemaReturnsNullSchemaIfNotExist() { // Arrange IEdmModel edmModel = EdmModelHelper.GraphBetaModel; - OpenApiDocument openApiDocument = new(); IEdmEntityType entityType = edmModel.SchemaElements.OfType().First(c => c.Name == "administrativeUnit"); OpenApiSchema schema = null; // Act - schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel, openApiDocument); + schema = Common.EdmModelHelper.GetDerivedTypesReferenceSchema(entityType, edmModel); // Assert Assert.Null(schema); @@ -1047,7 +1045,7 @@ public async Task NonNullableBooleanPropertyWithDefaultValueWorks() entitType, "BooleanValue", EdmCoreModel.Instance.GetBoolean(false), "false"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); // Assert Assert.NotNull(schema); @@ -1072,7 +1070,7 @@ public async Task NonNullableBinaryPropertyWithBothMaxLengthAndDefaultValueWorks entitType, "BinaryValue", binaryType, "T0RhdGE"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); // Assert Assert.NotNull(schema); @@ -1097,7 +1095,7 @@ public async Task NonNullableIntegerPropertyWithDefaultValueWorks() entitType, "IntegerValue", EdmCoreModel.Instance.GetInt32(false), "-128"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); // Assert Assert.NotNull(schema); @@ -1123,7 +1121,7 @@ public async Task NonNullableDoublePropertyWithDefaultStringWorks() entitType, "DoubleValue", EdmCoreModel.Instance.GetDouble(false), "3.1415926535897931"); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); // Assert Assert.NotNull(schema); @@ -1165,7 +1163,7 @@ public async Task NonNullableUntypedPropertyWorks() entityType, "UntypedProperty", EdmCoreModel.Instance.GetUntyped()); // Act - var schema = context.CreatePropertySchema(property, new()); + var schema = context.CreatePropertySchema(property); // Assert Assert.NotNull(schema); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs index 7699e3d27..70772d6db 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSpatialTypeSchemaGeneratorTest.cs @@ -23,7 +23,7 @@ public void CreateSpatialSchemasThrowArgumentNullContext() ODataContext context = null; // Act & Assert - Assert.Throws("context", () => context.CreateSpatialSchemas(new())); + Assert.Throws("context", context.CreateSpatialSchemas); } [Fact] @@ -33,7 +33,7 @@ public void CreateSpatialSchemasReturnEmptyForCoreModel() ODataContext context = new ODataContext(EdmCoreModel.Instance); // Act - var schemas = context.CreateSpatialSchemas(new()); + var schemas = context.CreateSpatialSchemas(); // Assert Assert.NotNull(schemas); @@ -52,7 +52,7 @@ public void CreateSpatialSchemasReturnFullSpatialSchemasForModelWithEdmSpatialTy ODataContext context = new ODataContext(model); // Act - var schemas = context.CreateSpatialSchemas(new()); + var schemas = context.CreateSpatialSchemas(); // Assert Assert.NotNull(schemas); @@ -86,7 +86,7 @@ public void CreateSpatialSchemasReturnFullSpatialSchemasForModelWithEdmSpatialTy public async Task CreateEdmGeographySchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographySchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographySchema(); Assert.NotNull(schema); // guard // Act @@ -102,7 +102,7 @@ public async Task CreateEdmGeographySchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPointSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPointSchema(); Assert.NotNull(schema); // guard // Act @@ -118,7 +118,7 @@ public async Task CreateEdmGeographyPointSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyLineStringSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyLineStringSchema(); Assert.NotNull(schema); // guard // Act @@ -134,7 +134,7 @@ public async Task CreateEdmGeographyLineStringSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPolygonSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyPolygonSchema(); Assert.NotNull(schema); // guard // Act @@ -150,7 +150,7 @@ public async Task CreateEdmGeographyPolygonSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPointSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPointSchema(); Assert.NotNull(schema); // guard // Act @@ -166,7 +166,7 @@ public async Task CreateEdmGeographyMultiPointSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiLineStringSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiLineStringSchema(); Assert.NotNull(schema); // guard // Act @@ -182,7 +182,7 @@ public async Task CreateEdmGeographyMultiLineStringSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPolygonSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyMultiPolygonSchema(); Assert.NotNull(schema); // guard // Act @@ -198,7 +198,7 @@ public async Task CreateEdmGeographyMultiPolygonSchemaSerializeAsJsonWorks() public async Task CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyCollectionSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeographyCollectionSchema(); Assert.NotNull(schema); // guard // Act @@ -214,7 +214,7 @@ public async Task CreateEdmGeographyCollectionSchemaSerializeAsJsonWorks() public async Task CreateEdmGeometrySchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometrySchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometrySchema(); Assert.NotNull(schema); // guard // Act @@ -253,7 +253,7 @@ public async Task CreateEdmGeometrySchemaSerializeAsJsonWorks() public async Task CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yaml { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPointSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPointSchema(); Assert.NotNull(schema); // guard // Act @@ -279,7 +279,7 @@ public async Task CreateEdmGeometryPointSchemaSerializeAsYamlWorks() // test yam public async Task CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryLineStringSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryLineStringSchema(); Assert.NotNull(schema); // guard // Act @@ -313,7 +313,7 @@ public async Task CreateEdmGeometryLineStringSchemaSerializeAsJsonWorks() public async Task CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPolygonSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryPolygonSchema(); Assert.NotNull(schema); // guard // Act @@ -350,7 +350,7 @@ public async Task CreateEdmGeometryPolygonSchemaSerializeAsJsonWorks() public async Task CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPointSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPointSchema(); Assert.NotNull(schema); // guard // Act @@ -383,7 +383,7 @@ public async Task CreateEdmGeometryMultiPointSchemaSerializeAsJsonWorks() public async Task CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() // Test yaml { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiLineStringSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiLineStringSchema(); Assert.NotNull(schema); // guard // Act @@ -411,7 +411,7 @@ public async Task CreateEdmGeometryMultiLineStringSchemaSerializeAsYamlWorks() / public async Task CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPolygonSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryMultiPolygonSchema(); Assert.NotNull(schema); // guard // Act @@ -451,7 +451,7 @@ public async Task CreateEdmGeometryMultiPolygonSchemaSerializeAsJsonWorks() public async Task CreateEdmGeometryCollectionSchemaSerializeAsJsonWorks() { // Arrange - var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryCollectionSchema(new()); + var schema = OpenApiSpatialTypeSchemaGenerator.CreateEdmGeometryCollectionSchema(); Assert.NotNull(schema); // guard // Act diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs index 2f784fb9b..1290934e8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyGetOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyGetOperationHandlerTests { - private readonly ComplexPropertyGetOperationHandler _operationHandler = new(new()); + private readonly ComplexPropertyGetOperationHandler _operationHandler = new(); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs index a7ea353a9..c1679481a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPatchOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPatchOperationHandlerTests { - private readonly ComplexPropertyPatchOperationHandler _operationHandler = new(new()); + private readonly ComplexPropertyPatchOperationHandler _operationHandler = new(); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs index 908f0b6df..20abd2110 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPostOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPostOperationHandlerTests { - private readonly ComplexPropertyPostOperationHandler _operationHandler = new(new()); + private readonly ComplexPropertyPostOperationHandler _operationHandler = new(); [Fact] public void CreateComplexPropertyPostOperationThrowsForSingle() { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs index a6edc48e6..84f7e9fa2 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ComplexPropertyPutOperationHandlerTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests; public class ComplexPropertyPutOperationHandlerTests { - private readonly ComplexPropertyPutOperationHandler _operationHandler = new(new()); + private readonly ComplexPropertyPutOperationHandler _operationHandler = new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs index 8d2f39871..b7ba20554 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/DollarCountGetOperationHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests public class DollarCountGetOperationHandlerTests { private readonly OpenApiDocument openApiDocument = new(); - private DollarCountGetOperationHandler _operationHandler => new(openApiDocument); + private static DollarCountGetOperationHandler _operationHandler => new(); public DollarCountGetOperationHandlerTests() { openApiDocument.AddComponent("search", new OpenApiParameter {Name = "search", In = ParameterLocation.Query, Schema = new OpenApiSchema {Type = JsonSchemaType.String}}); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs index 0122ce86e..9fa4495e5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionImportOperationHandlerTests.cs @@ -4,7 +4,6 @@ // ------------------------------------------------------------ using System.Linq; -using System.Reflection.Metadata; using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.OData.Edm; @@ -20,7 +19,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests public class EdmActionImportOperationHandlerTests { private readonly OpenApiDocument openApiDocument = new(); - private EdmActionImportOperationHandler _operationHandler => new EdmActionImportOperationHandler(openApiDocument); + private static EdmActionImportOperationHandler _operationHandler => new(); public EdmActionImportOperationHandlerTests() { openApiDocument.AddComponent("Delegated (work or school account)", new OpenApiSecurityScheme { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index d606dae4d..b16a58f9f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -31,7 +31,7 @@ public EdmActionOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private EdmActionOperationHandler _operationHandler => new(_openApiDocument); + private static EdmActionOperationHandler _operationHandler => new(); [Fact] public void CreateOperationForEdmActionReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs index b4cc26ac7..f63fd4eef 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionImportOperationHandlerTests.cs @@ -29,7 +29,7 @@ public EdmFunctionImportOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private EdmFunctionImportOperationHandler _operationHandler => new(_openApiDocument); + private static EdmFunctionImportOperationHandler _operationHandler => new(); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index 12847cf54..119172dfc 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -31,7 +31,7 @@ public EdmFunctionOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EdmFunctionOperationHandler _operationHandler => new(_openApiDocument); + private static EdmFunctionOperationHandler _operationHandler => new(); #region OperationHandlerTests [Fact] public void SetsDeprecationInformation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs index 89809b42d..cd6ffef99 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityDeleteOperationHandlerTests.cs @@ -27,7 +27,7 @@ public EntityDeleteOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private EntityDeleteOperationHandler _operationHandler => new (_openApiDocument); + private static EntityDeleteOperationHandler _operationHandler => new (); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs index 91de64618..aa847e07c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityGetOperationHandlerTests.cs @@ -29,7 +29,7 @@ public EntityGetOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EntityGetOperationHandler _operationHandler => new (_openApiDocument); + private static EntityGetOperationHandler _operationHandler => new (); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs index 8371132c5..059e022be 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPatchOperationHandlerTests.cs @@ -28,7 +28,7 @@ public EntityPatchOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EntityPatchOperationHandler _operationHandler => new (_openApiDocument); + private static EntityPatchOperationHandler _operationHandler => new (); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs index 26a9ac763..fe506becd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntityPutOperationHandlerTests.cs @@ -28,7 +28,7 @@ public EntityPutOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EntityPutOperationHandler _operationHandler => new(_openApiDocument); + private static EntityPutOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs index db027e21c..2aa31da5a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetGetOperationHandlerTests.cs @@ -33,7 +33,7 @@ public EntitySetGetOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EntitySetGetOperationHandler _operationHandler => new(_openApiDocument); + private static EntitySetGetOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs index c731a3056..8ab7caae5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs @@ -32,7 +32,7 @@ public EntitySetPostOperationHandlerTests() } private readonly OpenApiDocument _openApiDocument = new(); - private EntitySetPostOperationHandler _operationHandler => new(_openApiDocument); + private static EntitySetPostOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs index 78a879287..e539f6460 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityDeleteOperationHandlerTests.cs @@ -17,13 +17,9 @@ namespace Microsoft.OpenApi.OData.Operation.Tests { public class MediaEntityDeleteOperationHandlerTests { - public MediaEntityDeleteOperationHandlerTests() - { - _operationHandler = new MediaEntityDeleteOperationHandler(_openApiDocument); - } private readonly OpenApiDocument _openApiDocument = new(); - private readonly MediaEntityDeleteOperationHandler _operationHandler; + private static MediaEntityDeleteOperationHandler _operationHandler => new(); [Fact] public void CreateMediaEntityPropertyDeleteOperationWithTargetPathAnnotationsReturnsCorrectOperation() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs index 9eff3a36c..04c937a91 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityGetOperationHandlerTests.cs @@ -19,7 +19,7 @@ public class MediaEntityGetOperationHandlerTests { public MediaEntityGetOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs index 77f45cf7c..2f66bccd3 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/MediaEntityPutOperationHandlerTests.cs @@ -19,7 +19,7 @@ public class MediaEntityPutOperationHandlerTests { public MediaEntityPutOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly MediaEntityPutOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs index e2bde0a1d..d00cad9b9 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyDeleteOperationHandlerTests.cs @@ -17,7 +17,7 @@ public class NavigationPropertyDeleteOperationHandlerTests { public NavigationPropertyDeleteOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly NavigationPropertyDeleteOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs index 4b41a9f36..12030b39a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyGetOperationHandlerTests.cs @@ -29,7 +29,7 @@ public NavigationPropertyGetOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private NavigationPropertyGetOperationHandler _operationHandler => new(_openApiDocument); + private static NavigationPropertyGetOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs index 2789ff49b..eb01c06ce 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPatchOperationHandlerTests.cs @@ -28,7 +28,7 @@ public NavigationPropertyPatchOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private NavigationPropertyPatchOperationHandler _operationHandler => new(_openApiDocument); + private static NavigationPropertyPatchOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs index 423d2e38d..30243d367 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPostOperationHandlerTests.cs @@ -28,7 +28,7 @@ public NavigationPropertyPostOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private NavigationPropertyPostOperationHandler _operationHandler => new(_openApiDocument); + private static NavigationPropertyPostOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs index e2c7dcc84..ae629ef31 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/NavigationPropertyPutOperationHandlerTests.cs @@ -28,7 +28,7 @@ public NavigationPropertyPutOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private NavigationPropertyPutOperationHandler _operationHandler => new(_openApiDocument); + private static NavigationPropertyPutOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs index a229279ba..92544d7c8 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/ODataTypeCastGetOperationHandlerTests.cs @@ -44,7 +44,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); @@ -108,7 +108,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForCollectionN var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); @@ -166,7 +166,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySet(b var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); @@ -225,7 +225,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForEntitySetId var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); @@ -287,7 +287,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); @@ -344,7 +344,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleton(b var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); @@ -396,7 +396,7 @@ public void CreateODataTypeCastGetOperationReturnsCorrectOperationForSingleNavig var document = new OpenApiDocument(); context.AddSchemasToDocument(document); - ODataTypeCastGetOperationHandler operationHandler = new (document); + ODataTypeCastGetOperationHandler operationHandler = new (); // Act var operation = operationHandler.CreateOperation(context, path); document.Tags = context.CreateTags(); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs index 2e3f3289f..985fad60f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/OperationHandlerProviderTests.cs @@ -39,11 +39,10 @@ public class OperationHandlerProviderTests public void GetHandlerReturnsCorrectOperationHandlerType(ODataPathKind pathKind, OperationType operationType, Type handlerType) { // Arrange - OpenApiDocument openApiDocument = new(); OperationHandlerProvider provider = new OperationHandlerProvider(); // Act - IOperationHandler hander = provider.GetHandler(pathKind, operationType, openApiDocument); + IOperationHandler hander = provider.GetHandler(pathKind, operationType); // Assert Assert.Same(handlerType, hander.GetType()); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs index 2c35873cc..0d29d5c5a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefDeleteOperationHandlerTests.cs @@ -17,7 +17,7 @@ public class RefDeleteOperationHandlerTests { public RefDeleteOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly RefDeleteOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs index 9fc114f3f..1d1fc2b43 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefGetOperationHandlerTests.cs @@ -17,7 +17,7 @@ public class RefGetOperationHandlerTests { public RefGetOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly RefGetOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs index d6c617d9f..706094c85 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPostOperationHandlerTests.cs @@ -18,7 +18,7 @@ public class RefPostOperationHandlerTests { public RefPostOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly RefPostOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs index e565ca0b0..78193fe55 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/RefPutOperationHandlerTests.cs @@ -18,7 +18,7 @@ public class RefPutOperationHandlerTests { public RefPutOperationHandlerTests() { - _operationHandler = new (_openApiDocument); + _operationHandler = new (); } private readonly OpenApiDocument _openApiDocument = new(); private readonly RefPutOperationHandler _operationHandler; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs index c27cdafd5..346b21cdf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs @@ -32,7 +32,7 @@ public SingletonGetOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private SingletonGetOperationHandler _operationHandler => new(_openApiDocument); + private static SingletonGetOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs index 6901a363c..96fe72111 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonPatchOperationHandlerTests.cs @@ -31,7 +31,7 @@ public SingletonPatchOperationHandlerTests() }); } private readonly OpenApiDocument _openApiDocument = new(); - private SingletonPatchOperationHandler _operationHandler => new(_openApiDocument); + private static SingletonPatchOperationHandler _operationHandler => new(); [Theory] [InlineData(true, true)] diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs index 7b8f6447d..ea6b3ccdf 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ComplexPropertyPathItemHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests; public class ComplexPropertyPathItemHandlerTests { - private readonly ComplexPropertyItemHandler _pathItemHandler = new(new()); + private readonly ComplexPropertyItemHandler _pathItemHandler = new(); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs index 47a5a9d31..073c82199 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class EntityPathItemHandlerTests { - private EntityPathItemHandler _pathItemHandler = new MyEntityPathItemHandler(new()); + private EntityPathItemHandler _pathItemHandler = new MyEntityPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() @@ -292,10 +292,6 @@ public void CreateEntityPathItemAddsCustomAttributeValuesToPathExtensions() internal class MyEntityPathItemHandler : EntityPathItemHandler { - public MyEntityPathItemHandler(OpenApiDocument document) : base(document) - { - - } protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { item.AddOperation(operationType, new OpenApiOperation()); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs index 290f53751..f431a7df0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class EntitySetPathItemHandlerTests { - private EntitySetPathItemHandler _pathItemHandler = new MyEntitySetPathItemHandler(new()); + private EntitySetPathItemHandler _pathItemHandler = new MyEntitySetPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() @@ -214,7 +214,7 @@ public static IEdmModel GetEdmModel(string annotation, string target = "\"NS.Def } } - internal class MyEntitySetPathItemHandler(OpenApiDocument document) : EntitySetPathItemHandler(document) + internal class MyEntitySetPathItemHandler() : EntitySetPathItemHandler() { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs index d7496a20b..d336ca44f 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class MediaEntityPathItemHandlerTests { - private readonly MediaEntityPathItemHandler _pathItemHandler = new MyMediaEntityPathItemHandler(new()); + private readonly MediaEntityPathItemHandler _pathItemHandler = new MyMediaEntityPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() @@ -313,7 +313,7 @@ private IEdmModel GetEdmModel(string annotation, string targetPathAnnotation = " } } - internal class MyMediaEntityPathItemHandler(OpenApiDocument document) : MediaEntityPathItemHandler(document) + internal class MyMediaEntityPathItemHandler() : MediaEntityPathItemHandler() { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs index f3a0aa86a..32806097b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class NavigationPropertyPathItemHandlerTest { - private NavigationPropertyPathItemHandler _pathItemHandler = new NavigationPropertyPathItemHandler(new()); + private NavigationPropertyPathItemHandler _pathItemHandler = new NavigationPropertyPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs index e3ccdec56..5d895365c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/ODataTypeCastPathItemHandlerTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class ODataTypeCastPathItemHandlerTests { - private readonly ODataTypeCastPathItemHandler _pathItemHandler = new(new()); + private readonly ODataTypeCastPathItemHandler _pathItemHandler = new(); [Fact] public void CreateODataTypeCastPathItemAddsCustomAttributeValuesToPathExtensions() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs index 280885a34..a10fb1e5a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class OperationImportPathItemHandlerTest { - private OperationImportPathItemHandler _pathItemHandler = new MyOperationImportPathItemHandler(new()); + private OperationImportPathItemHandler _pathItemHandler = new MyOperationImportPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() @@ -187,7 +187,7 @@ public static IEdmModel GetEdmModel(string annotation) } } - internal class MyOperationImportPathItemHandler(OpenApiDocument document) : OperationImportPathItemHandler(document) + internal class MyOperationImportPathItemHandler() : OperationImportPathItemHandler() { protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs index 3167d196f..6af67477c 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class OperationPathItemHandlerTest { - private OperationPathItemHandler _pathItemHandler = new OperationPathItemHandler(new()); + private OperationPathItemHandler _pathItemHandler = new OperationPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs index 1754701aa..8a8aca68a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/PathItemHandlerProviderTests.cs @@ -28,10 +28,9 @@ public void GetHandlerReturnsCorrectHandlerType(ODataPathKind pathKind, Type han { // Arrange PathItemHandlerProvider provider = new PathItemHandlerProvider(); - OpenApiDocument openApiDocument = new OpenApiDocument(); // Act - IPathItemHandler hander = provider.GetHandler(pathKind, openApiDocument); + IPathItemHandler hander = provider.GetHandler(pathKind); // Assert Assert.Same(handlerType, hander.GetType()); @@ -42,10 +41,9 @@ public void GetHandlerReturnsNullForUnknownPathKind() { // Arrange PathItemHandlerProvider provider = new PathItemHandlerProvider(); - OpenApiDocument openApiDocument = new OpenApiDocument(); // Act - IPathItemHandler hander = provider.GetHandler(ODataPathKind.Unknown, openApiDocument); + IPathItemHandler hander = provider.GetHandler(ODataPathKind.Unknown); // Assert Assert.Null(hander); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs index 48baaf766..878570465 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class RefPathItemHandlerTest { - private RefPathItemHandler _pathItemHandler = new RefPathItemHandler(new()); + private RefPathItemHandler _pathItemHandler = new RefPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs index b94e63efc..0c2ecc1fd 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests { public class SingletonPathItemHandlerTest { - private SingletonPathItemHandler _pathItemHandler = new MySingletonPathItemHandler(new()); + private SingletonPathItemHandler _pathItemHandler = new MySingletonPathItemHandler(); [Fact] public void CreatePathItemThrowsForNullContext() @@ -191,10 +191,6 @@ private IEdmModel GetEdmModel(string annotation) internal class MySingletonPathItemHandler : SingletonPathItemHandler { - public MySingletonPathItemHandler(OpenApiDocument document) : base(document) - { - - } protected override void AddOperation(OpenApiPathItem item, OperationType operationType) { item.AddOperation(operationType, new OpenApiOperation());