diff --git a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs index 72ebb225..751e2600 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs @@ -1,94 +1,94 @@ -// ------------------------------------------------------------ -// 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 Microsoft.OData.Edm; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.OData.Common; -using Microsoft.OpenApi.OData.Edm; -using Microsoft.OpenApi.OData.Generator; -using Microsoft.OpenApi.OData.Vocabulary.Capabilities; -using Microsoft.OpenApi.OData.Vocabulary.Core; - -namespace Microsoft.OpenApi.OData.Operation -{ - /// - /// Base class for operation of . - /// - internal abstract class EdmOperationOperationHandler : OperationHandler - { - private OperationRestrictionsType _operationRestriction; - - /// - /// Gets the navigation source. - /// - protected IEdmNavigationSource NavigationSource { get; private set; } - - /// - /// Gets the Edm operation. - /// - protected IEdmOperation EdmOperation { get; private set; } - - /// - /// Gets the OData operation segment. - /// - protected ODataOperationSegment OperationSegment { get; private set; } - - /// - /// Gets a value indicating whether the path has type cast segment or not. - /// - protected bool HasTypeCast { get; private set; } - - /// - protected override void Initialize(ODataContext context, ODataPath path) +// ------------------------------------------------------------ +// 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 Microsoft.OData.Edm; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.OData.Common; +using Microsoft.OpenApi.OData.Edm; +using Microsoft.OpenApi.OData.Generator; +using Microsoft.OpenApi.OData.Vocabulary.Capabilities; +using Microsoft.OpenApi.OData.Vocabulary.Core; + +namespace Microsoft.OpenApi.OData.Operation +{ + /// + /// Base class for operation of . + /// + internal abstract class EdmOperationOperationHandler : OperationHandler + { + private OperationRestrictionsType _operationRestriction; + + /// + /// Gets the navigation source. + /// + protected IEdmNavigationSource NavigationSource { get; private set; } + + /// + /// Gets the Edm operation. + /// + protected IEdmOperation EdmOperation { get; private set; } + + /// + /// Gets the OData operation segment. + /// + protected ODataOperationSegment OperationSegment { get; private set; } + + /// + /// Gets a value indicating whether the path has type cast segment or not. + /// + protected bool HasTypeCast { get; private set; } + + /// + protected override void Initialize(ODataContext context, ODataPath path) { - base.Initialize(context, path); - - // It's bound operation, the first segment must be the navigaiton source. - ODataNavigationSourceSegment navigationSourceSegment = path.FirstSegment as ODataNavigationSourceSegment; - NavigationSource = navigationSourceSegment.NavigationSource; - - OperationSegment = path.LastSegment as ODataOperationSegment; - EdmOperation = OperationSegment.Operation; - - HasTypeCast = path.Segments.Any(s => s is ODataTypeCastSegment); - + base.Initialize(context, path); + + // It's bound operation, the first segment must be the navigaiton source. + ODataNavigationSourceSegment navigationSourceSegment = path.FirstSegment as ODataNavigationSourceSegment; + NavigationSource = navigationSourceSegment.NavigationSource; + + OperationSegment = path.LastSegment as ODataOperationSegment; + EdmOperation = OperationSegment.Operation; + + HasTypeCast = path.Segments.Any(s => s is ODataTypeCastSegment); + _operationRestriction = Context.Model.GetRecord(TargetPath, CapabilitiesConstants.OperationRestrictions); var operationRestrictions = Context.Model.GetRecord(EdmOperation, CapabilitiesConstants.OperationRestrictions); _operationRestriction?.MergePropertiesIfNull(operationRestrictions); - _operationRestriction ??= operationRestrictions; - } - - /// - protected override void SetBasicInfo(OpenApiOperation operation) - { - // Summary - operation.Summary = "Invoke " + (EdmOperation.IsAction() ? "action " : "function ") + EdmOperation.Name; - - // Description - operation.Description = Context.Model.GetDescriptionAnnotation(TargetPath) ?? Context.Model.GetDescriptionAnnotation(EdmOperation); - - // OperationId - if (Context.Settings.EnableOperationId) - { - // When the key segment is available, - // its EntityType name will be used - // in the operationId to avoid potential - // duplicates in entity vs entityset functions/actions - - List identifiers = new(); - foreach (ODataSegment segment in Path.Segments) - { - if (segment is ODataKeySegment keySegment) - { - if (!keySegment.IsAlternateKey) - { - identifiers.Add(segment.EntityType.Name); - continue; + _operationRestriction ??= operationRestrictions; + } + + /// + protected override void SetBasicInfo(OpenApiOperation operation) + { + // Summary + operation.Summary = "Invoke " + (EdmOperation.IsAction() ? "action " : "function ") + EdmOperation.Name; + + // Description + operation.Description = Context.Model.GetDescriptionAnnotation(TargetPath) ?? Context.Model.GetDescriptionAnnotation(EdmOperation); + + // OperationId + if (Context.Settings.EnableOperationId) + { + // When the key segment is available, + // its EntityType name will be used + // in the operationId to avoid potential + // duplicates in entity vs entityset functions/actions + + List identifiers = new(); + foreach (ODataSegment segment in Path.Segments) + { + if (segment is ODataKeySegment keySegment) + { + if (!keySegment.IsAlternateKey) + { + identifiers.Add(segment.EntityType.Name); + continue; } // We'll consider alternate keys in the operation id to eliminate potential duplicates with operation id of primary path @@ -100,175 +100,203 @@ protected override void SetBasicInfo(OpenApiOperation operation) { identifiers.Add(keySegment.Identifier); } - } - else - { + } + else + { identifiers.Add(segment.Identifier); - } - } - - string operationId = string.Join(".", identifiers); - - if (EdmOperation.IsAction()) - { - operation.OperationId = operationId; - } - else - { - if (Path.LastSegment is ODataOperationSegment operationSegment && - Context.Model.IsOperationOverload(operationSegment.Operation)) - { - operation.OperationId = operationId + "-" + Path.LastSegment.GetPathHash(Context.Settings); - } - else - { - operation.OperationId = operationId; - } - } - } - - base.SetBasicInfo(operation); - } - - /// - protected override void SetTags(OpenApiOperation operation) - { - string value = EdmOperation.IsAction() ? "Actions" : "Functions"; - OpenApiTag tag = new OpenApiTag - { - Name = NavigationSource.Name + "." + value, - }; - tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("container")); - operation.Tags.Add(tag); - - Context.AppendTag(tag); - - base.SetTags(operation); - } - - /// - protected override void SetParameters(OpenApiOperation operation) - { - base.SetParameters(operation); - - if (EdmOperation.IsFunction()) - { - IEdmFunction function = (IEdmFunction)EdmOperation; - AppendSystemQueryOptions(function, operation); - } - } - - /// - protected override void SetResponses(OpenApiOperation operation) - { - operation.Responses = Context.CreateResponses(EdmOperation); - base.SetResponses(operation); - } - - /// - protected override void SetSecurity(OpenApiOperation operation) - { - if (_operationRestriction == null || _operationRestriction.Permissions == null) - { - return; - } - - operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); - } - - /// - protected override void AppendCustomParameters(OpenApiOperation operation) - { - if (_operationRestriction == null) - { - return; - } - - if (_operationRestriction.CustomHeaders != null) - { - AppendCustomParameters(operation, _operationRestriction.CustomHeaders, ParameterLocation.Header); - } - - if (_operationRestriction.CustomQueryOptions != null) - { - AppendCustomParameters(operation, _operationRestriction.CustomQueryOptions, ParameterLocation.Query); - } - } - - private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation operation) - { - if (function.ReturnType.IsCollection()) - { - // $top - if (Context.CreateTop(function) is OpenApiParameter topParameter) - { - operation.Parameters.AppendParameter(topParameter); - } - - // $skip - if (Context.CreateSkip(function) is OpenApiParameter skipParameter) - { - operation.Parameters.AppendParameter(skipParameter); - } - - // $search - if (Context.CreateSearch(function) is OpenApiParameter searchParameter) - { - operation.Parameters.AppendParameter(searchParameter); - } - - // $filter - if (Context.CreateFilter(function) is OpenApiParameter filterParameter) - { - operation.Parameters.AppendParameter(filterParameter); - } - - // $count - if (Context.CreateCount(function) is OpenApiParameter countParameter) - { - operation.Parameters.AppendParameter(countParameter); - } - - if (function.ReturnType?.Definition?.AsElementType() is IEdmEntityType entityType) - { - // $select - if (Context.CreateSelect(function, entityType) is OpenApiParameter selectParameter) - { - operation.Parameters.AppendParameter(selectParameter); - } - - // $orderby - if (Context.CreateOrderBy(function, entityType) is OpenApiParameter orderbyParameter) - { - operation.Parameters.AppendParameter(orderbyParameter); - } - - // $expand - if (Context.CreateExpand(function, entityType) is OpenApiParameter expandParameter) - { - operation.Parameters.AppendParameter(expandParameter); - } - } - } - } - - /// - protected override void SetCustomLinkRelType() - { - if (Context.Settings.CustomHttpMethodLinkRelMapping != null && EdmOperation != null) - { - LinkRelKey key = EdmOperation.IsAction() ? LinkRelKey.Action : LinkRelKey.Function; - Context.Settings.CustomHttpMethodLinkRelMapping.TryGetValue(key, out string linkRelValue); - CustomLinkRel = linkRelValue; - } - } - - /// - protected override void SetExternalDocs(OpenApiOperation operation) - { - if (Context.Settings.ShowExternalDocs) - { - var externalDocs = Context.Model.GetLinkRecord(TargetPath, CustomLinkRel) ?? + } + } + + string operationId = string.Join(".", identifiers); + + if (EdmOperation.IsAction()) + { + operation.OperationId = operationId; + } + else + { + if (Path.LastSegment is ODataOperationSegment operationSegment && + Context.Model.IsOperationOverload(operationSegment.Operation)) + { + operation.OperationId = operationId + "-" + Path.LastSegment.GetPathHash(Context.Settings); + } + else + { + operation.OperationId = operationId; + } + } + } + + base.SetBasicInfo(operation); + } + + /// + protected override void SetTags(OpenApiOperation operation) + { + GenerateTagName(out string tagName); + OpenApiTag tag = new() + { + Name = tagName, + }; + tag.Extensions.Add(Constants.xMsTocType, new OpenApiString("container")); + operation.Tags.Add(tag); + + Context.AppendTag(tag); + + base.SetTags(operation); + } + + /// + /// Genrates the tag name for the operation. + /// + /// The generated tag name. + /// The number of segments to skip. + private void GenerateTagName(out string tagName, int skip = 1) + { + var targetSegment = Path.Segments.Reverse().Skip(skip).FirstOrDefault(); + + switch (targetSegment) + { + case ODataNavigationPropertySegment: + tagName = EdmModelHelper.GenerateNavigationPropertyPathTagName(Path, Context); + break; + case ODataOperationSegment: + case ODataOperationImportSegment: + // Previous segmment could be a navigation property or a navigation source segment + case ODataKeySegment: + skip += 1; + GenerateTagName(out tagName, skip); + break; + // ODataNavigationSourceSegment + default: + tagName = NavigationSource.Name + "." + NavigationSource.EntityType().Name; + break; + } + } + + /// + protected override void SetParameters(OpenApiOperation operation) + { + base.SetParameters(operation); + + if (EdmOperation.IsFunction()) + { + IEdmFunction function = (IEdmFunction)EdmOperation; + AppendSystemQueryOptions(function, operation); + } + } + + /// + protected override void SetResponses(OpenApiOperation operation) + { + operation.Responses = Context.CreateResponses(EdmOperation); + base.SetResponses(operation); + } + + /// + protected override void SetSecurity(OpenApiOperation operation) + { + if (_operationRestriction == null || _operationRestriction.Permissions == null) + { + return; + } + + operation.Security = Context.CreateSecurityRequirements(_operationRestriction.Permissions).ToList(); + } + + /// + protected override void AppendCustomParameters(OpenApiOperation operation) + { + if (_operationRestriction == null) + { + return; + } + + if (_operationRestriction.CustomHeaders != null) + { + AppendCustomParameters(operation, _operationRestriction.CustomHeaders, ParameterLocation.Header); + } + + if (_operationRestriction.CustomQueryOptions != null) + { + AppendCustomParameters(operation, _operationRestriction.CustomQueryOptions, ParameterLocation.Query); + } + } + + private void AppendSystemQueryOptions(IEdmFunction function, OpenApiOperation operation) + { + if (function.ReturnType.IsCollection()) + { + // $top + if (Context.CreateTop(function) is OpenApiParameter topParameter) + { + operation.Parameters.AppendParameter(topParameter); + } + + // $skip + if (Context.CreateSkip(function) is OpenApiParameter skipParameter) + { + operation.Parameters.AppendParameter(skipParameter); + } + + // $search + if (Context.CreateSearch(function) is OpenApiParameter searchParameter) + { + operation.Parameters.AppendParameter(searchParameter); + } + + // $filter + if (Context.CreateFilter(function) is OpenApiParameter filterParameter) + { + operation.Parameters.AppendParameter(filterParameter); + } + + // $count + if (Context.CreateCount(function) is OpenApiParameter countParameter) + { + operation.Parameters.AppendParameter(countParameter); + } + + if (function.ReturnType?.Definition?.AsElementType() is IEdmEntityType entityType) + { + // $select + if (Context.CreateSelect(function, entityType) is OpenApiParameter selectParameter) + { + operation.Parameters.AppendParameter(selectParameter); + } + + // $orderby + if (Context.CreateOrderBy(function, entityType) is OpenApiParameter orderbyParameter) + { + operation.Parameters.AppendParameter(orderbyParameter); + } + + // $expand + if (Context.CreateExpand(function, entityType) is OpenApiParameter expandParameter) + { + operation.Parameters.AppendParameter(expandParameter); + } + } + } + } + + /// + protected override void SetCustomLinkRelType() + { + if (Context.Settings.CustomHttpMethodLinkRelMapping != null && EdmOperation != null) + { + LinkRelKey key = EdmOperation.IsAction() ? LinkRelKey.Action : LinkRelKey.Function; + Context.Settings.CustomHttpMethodLinkRelMapping.TryGetValue(key, out string linkRelValue); + CustomLinkRel = linkRelValue; + } + } + + /// + protected override void SetExternalDocs(OpenApiOperation operation) + { + if (Context.Settings.ShowExternalDocs) + { + var externalDocs = Context.Model.GetLinkRecord(TargetPath, CustomLinkRel) ?? Context.Model.GetLinkRecord(EdmOperation, CustomLinkRel); if (externalDocs != null) @@ -278,24 +306,24 @@ protected override void SetExternalDocs(OpenApiOperation operation) Description = CoreConstants.ExternalDocsDescription, Url = externalDocs.Href }; - } - } - } - - // - protected override void SetExtensions(OpenApiOperation operation) - { - if (Context.Settings.EnablePagination && EdmOperation.ReturnType?.TypeKind() == EdmTypeKind.Collection) - { - OpenApiObject extension = new OpenApiObject - { - { "nextLinkName", new OpenApiString("@odata.nextLink")}, - { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} - }; - - operation.Extensions.Add(Constants.xMsPageable, extension); - } - base.SetExtensions(operation); - } - } -} + } + } + } + + // + protected override void SetExtensions(OpenApiOperation operation) + { + if (Context.Settings.EnablePagination && EdmOperation.ReturnType?.TypeKind() == EdmTypeKind.Collection) + { + OpenApiObject extension = new OpenApiObject + { + { "nextLinkName", new OpenApiString("@odata.nextLink")}, + { "operationName", new OpenApiString(Context.Settings.PageableOperationName)} + }; + + operation.Extensions.Add(Constants.xMsPageable, extension); + } + base.SetExtensions(operation); + } + } +} diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs index 03d87da1..dca92aeb 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmActionOperationHandlerTests.cs @@ -40,7 +40,7 @@ public void CreateOperationForEdmActionReturnsCorrectOperation() Assert.Equal("Details of the shared trip.", operation.Description); Assert.NotNull(operation.Tags); var tag = Assert.Single(operation.Tags); - Assert.Equal("People.Actions", tag.Name); + Assert.Equal("People.Person", tag.Name); Assert.NotNull(operation.Parameters); Assert.Single(operation.Parameters); @@ -79,7 +79,7 @@ public void CreateOperationForEdmActionReturnsCorrectOperationHierarchicalClass( Assert.Equal($"Invoke action {actionName}", operation.Summary); Assert.NotNull(operation.Tags); var tag = Assert.Single(operation.Tags); - Assert.Equal($"{entitySetName}.Actions", tag.Name); + Assert.Equal($"{entitySetName}.AccountApiModel", tag.Name); Assert.NotNull(operation.Parameters); Assert.Single(operation.Parameters); diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index de817a52..4244b225 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -100,7 +100,7 @@ public void CreateOperationForEdmFunctionReturnsCorrectOperation(bool useHTTPSta Assert.Equal("Invoke function GetFavoriteAirline", operation.Summary); Assert.NotNull(operation.Tags); var tag = Assert.Single(operation.Tags); - Assert.Equal("People.Functions", tag.Name); + Assert.Equal("People.Person", tag.Name); Assert.NotNull(operation.Parameters); Assert.Single(operation.Parameters); @@ -138,7 +138,7 @@ public void CreateOperationForEdmFunctionReturnsCorrectOperationHierarchicalClas Assert.Equal("Collection of contract attachments.", operation.Description); Assert.NotNull(operation.Tags); var tag = Assert.Single(operation.Tags); - Assert.Equal($"{entitySetName}.Functions", tag.Name); + Assert.Equal($"{entitySetName}.AccountApiModel", tag.Name); Assert.NotNull(operation.Parameters); Assert.Equal(6, operation.Parameters.Count); // id, top, skip, count, search, filter 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 7bcc154c..599a8381 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 @@ -591,7 +591,7 @@ "/Documents({Id})/Default.Upload": { "post": { "tags": [ - "Documents.Actions" + "Documents.DocumentDto" ], "summary": "Invoke action Upload", "operationId": "Documents.DocumentDto.Upload", @@ -3519,7 +3519,7 @@ "/Tasks({Id})/Default.Upload": { "post": { "tags": [ - "Tasks.Actions" + "Tasks.DocumentDto" ], "summary": "Invoke action Upload", "operationId": "Tasks.DocumentDto.Upload", @@ -6274,10 +6274,6 @@ "name": "Documents.DocumentDto", "x-ms-docs-toc-type": "page" }, - { - "name": "Documents.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "Documents.RevisionDto", "x-ms-docs-toc-type": "page" @@ -6318,10 +6314,6 @@ "name": "Tasks.DocumentDto", "x-ms-docs-toc-type": "page" }, - { - "name": "Tasks.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "Tasks.RevisionDto", "x-ms-docs-toc-type": "page" 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 e69a85f5..daca60d1 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 @@ -413,7 +413,7 @@ paths: '/Documents({Id})/Default.Upload': post: tags: - - Documents.Actions + - Documents.DocumentDto summary: Invoke action Upload operationId: Documents.DocumentDto.Upload parameters: @@ -2495,7 +2495,7 @@ paths: '/Tasks({Id})/Default.Upload': post: tags: - - Tasks.Actions + - Tasks.DocumentDto summary: Invoke action Upload operationId: Tasks.DocumentDto.Upload parameters: @@ -4544,8 +4544,6 @@ tags: x-ms-docs-toc-type: page - name: Documents.DocumentDto x-ms-docs-toc-type: page - - name: Documents.Actions - x-ms-docs-toc-type: container - name: Documents.RevisionDto x-ms-docs-toc-type: page - name: Documents.DocumentTagRelDto @@ -4566,8 +4564,6 @@ tags: x-ms-docs-toc-type: page - name: Tasks.DocumentDto x-ms-docs-toc-type: page - - name: Tasks.Actions - x-ms-docs-toc-type: container - name: Tasks.RevisionDto x-ms-docs-toc-type: page - name: Tasks.DocumentTagRelDto 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 35f3f7e3..2733a9eb 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 @@ -663,7 +663,7 @@ "description": "Provides operations to call the Upload method.", "post": { "tags": [ - "Documents.Actions" + "Documents.DocumentDto" ], "summary": "Invoke action Upload", "operationId": "Documents.DocumentDto.Upload", @@ -3940,7 +3940,7 @@ "description": "Provides operations to call the Upload method.", "post": { "tags": [ - "Tasks.Actions" + "Tasks.DocumentDto" ], "summary": "Invoke action Upload", "operationId": "Tasks.DocumentDto.Upload", @@ -7479,10 +7479,6 @@ "name": "Documents.DocumentDto", "x-ms-docs-toc-type": "page" }, - { - "name": "Documents.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "Documents.RevisionDto", "x-ms-docs-toc-type": "page" @@ -7523,10 +7519,6 @@ "name": "Tasks.DocumentDto", "x-ms-docs-toc-type": "page" }, - { - "name": "Tasks.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "Tasks.RevisionDto", "x-ms-docs-toc-type": "page" 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 22f1882e..6818ba56 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 @@ -460,7 +460,7 @@ paths: description: Provides operations to call the Upload method. post: tags: - - Documents.Actions + - Documents.DocumentDto 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.Actions + - Tasks.DocumentDto summary: Invoke action Upload operationId: Tasks.DocumentDto.Upload parameters: @@ -5382,8 +5382,6 @@ tags: x-ms-docs-toc-type: page - name: Documents.DocumentDto x-ms-docs-toc-type: page - - name: Documents.Actions - x-ms-docs-toc-type: container - name: Documents.RevisionDto x-ms-docs-toc-type: page - name: Documents.DocumentTagRelDto @@ -5404,8 +5402,6 @@ tags: x-ms-docs-toc-type: page - name: Tasks.DocumentDto x-ms-docs-toc-type: page - - name: Tasks.Actions - x-ms-docs-toc-type: container - name: Tasks.RevisionDto x-ms-docs-toc-type: page - name: Tasks.DocumentTagRelDto 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 3e3f587b..317fb222 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 @@ -7215,7 +7215,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", @@ -7696,7 +7696,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "Me.GetFavoriteAirline", @@ -7722,7 +7722,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "Me.GetFriendsTrips", @@ -7799,7 +7799,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "Me.GetPeersForTrip", @@ -10930,7 +10930,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -11287,7 +11287,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", @@ -11768,7 +11768,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -11800,7 +11800,7 @@ "/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "Me.UpdatePersonLastName", @@ -12245,7 +12245,7 @@ "/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Trips.Trip.GetInvolvedPeople", @@ -15601,7 +15601,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "NewComePeople.Person.GetFavoriteAirline", @@ -15630,7 +15630,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "NewComePeople.Person.GetFriendsTrips", @@ -15715,7 +15715,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "NewComePeople.Person.GetPeersForTrip", @@ -15747,7 +15747,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -15794,7 +15794,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -15827,7 +15827,7 @@ "/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "NewComePeople.Person.UpdatePersonLastName", @@ -16275,7 +16275,7 @@ "/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "NewComePeople.Person.Trips.Trip.GetInvolvedPeople", @@ -23947,7 +23947,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", @@ -24492,7 +24492,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": { "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "People.Person.GetFavoriteAirline", @@ -24528,7 +24528,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": { "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "People.Person.GetFriendsTrips", @@ -24613,7 +24613,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip": { "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "People.Person.GetPeersForTrip", @@ -28312,7 +28312,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire": { "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -28717,7 +28717,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", @@ -29262,7 +29262,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": { "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -29302,7 +29302,7 @@ "/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": { "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "People.Person.UpdatePersonLastName", @@ -29836,7 +29836,7 @@ "/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": { "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Trips.Trip.GetInvolvedPeople", @@ -31835,18 +31835,10 @@ "name": "Me.Trip", "x-ms-docs-toc-type": "page" }, - { - "name": "Me.Functions", - "x-ms-docs-toc-type": "container" - }, { "name": "Me.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, - { - "name": "Me.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "NewComePeople.Person", "x-ms-docs-toc-type": "page" @@ -31859,14 +31851,6 @@ "name": "NewComePeople.Person.Location", "x-ms-docs-toc-type": "page" }, - { - "name": "NewComePeople.Functions", - "x-ms-docs-toc-type": "container" - }, - { - "name": "NewComePeople.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "NewComePeople.Trip", "x-ms-docs-toc-type": "page" @@ -31891,18 +31875,10 @@ "name": "People.Trip", "x-ms-docs-toc-type": "page" }, - { - "name": "People.Functions", - "x-ms-docs-toc-type": "container" - }, { "name": "People.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, - { - "name": "People.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.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml index 89ee6536..9a191775 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 @@ -4849,7 +4849,7 @@ paths: '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople produces: @@ -5174,7 +5174,7 @@ paths: /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline(): get: tags: - - Me.Functions + - Me.Person summary: Invoke function GetFavoriteAirline operationId: Me.GetFavoriteAirline responses: @@ -5193,7 +5193,7 @@ paths: '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': get: tags: - - Me.Functions + - Me.Person summary: Invoke function GetFriendsTrips operationId: Me.GetFriendsTrips parameters: @@ -5241,7 +5241,7 @@ paths: /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip: post: tags: - - Me.Actions + - Me.Person summary: Invoke action GetPeersForTrip operationId: Me.GetPeersForTrip parameters: @@ -7352,7 +7352,7 @@ paths: /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire: post: tags: - - Me.Actions + - Me.Person summary: Invoke action Hire description: Hires someone for the company. operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -7602,7 +7602,7 @@ paths: '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople produces: @@ -7927,7 +7927,7 @@ paths: /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip: post: tags: - - Me.Actions + - Me.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: Me.ShareTrip @@ -7949,7 +7949,7 @@ paths: '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': get: tags: - - Me.Functions + - Me.Person summary: Invoke function UpdatePersonLastName operationId: Me.UpdatePersonLastName parameters: @@ -8262,7 +8262,7 @@ paths: '/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Trips.Trip.GetInvolvedPeople produces: @@ -10502,7 +10502,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()': get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function GetFavoriteAirline operationId: NewComePeople.Person.GetFavoriteAirline parameters: @@ -10522,7 +10522,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function GetFriendsTrips operationId: NewComePeople.Person.GetFriendsTrips parameters: @@ -10576,7 +10576,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip': post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action GetPeersForTrip operationId: NewComePeople.Person.GetPeersForTrip parameters: @@ -10597,7 +10597,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire': post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action Hire description: Hires someone for the company. operationId: NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -10629,7 +10629,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip': post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: NewComePeople.Person.ShareTrip @@ -10651,7 +10651,7 @@ paths: '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function UpdatePersonLastName operationId: NewComePeople.Person.UpdatePersonLastName parameters: @@ -10959,7 +10959,7 @@ paths: '/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - NewComePeople.Functions + - NewComePeople.Trip summary: Invoke function GetInvolvedPeople operationId: NewComePeople.Person.Trips.Trip.GetInvolvedPeople produces: @@ -16203,7 +16203,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople produces: @@ -16576,7 +16576,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()': get: tags: - - People.Functions + - People.Person summary: Invoke function GetFavoriteAirline operationId: People.Person.GetFavoriteAirline parameters: @@ -16602,7 +16602,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')': get: tags: - - People.Functions + - People.Person summary: Invoke function GetFriendsTrips operationId: People.Person.GetFriendsTrips parameters: @@ -16656,7 +16656,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPeersForTrip': post: tags: - - People.Actions + - People.Person summary: Invoke action GetPeersForTrip operationId: People.Person.GetPeersForTrip parameters: @@ -19189,7 +19189,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Hire': post: tags: - - People.Actions + - People.Person summary: Invoke action Hire description: Hires someone for the company. operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -19475,7 +19475,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople produces: @@ -19848,7 +19848,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip': post: tags: - - People.Actions + - People.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: People.Person.ShareTrip @@ -19876,7 +19876,7 @@ paths: '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')': get: tags: - - People.Functions + - People.Person summary: Invoke function UpdatePersonLastName operationId: People.Person.UpdatePersonLastName parameters: @@ -20256,7 +20256,7 @@ paths: '/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()': get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Trips.Trip.GetInvolvedPeople produces: @@ -21577,22 +21577,14 @@ tags: x-ms-docs-toc-type: page - name: Me.Trip x-ms-docs-toc-type: page - - name: Me.Functions - x-ms-docs-toc-type: container - name: Me.Trips.PlanItem x-ms-docs-toc-type: page - - name: Me.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.Functions - x-ms-docs-toc-type: container - - name: NewComePeople.Actions - x-ms-docs-toc-type: container - name: NewComePeople.Trip x-ms-docs-toc-type: page - name: NewComePeople.Trips.PlanItem @@ -21605,11 +21597,7 @@ tags: x-ms-docs-toc-type: page - name: People.Trip x-ms-docs-toc-type: page - - name: People.Functions - x-ms-docs-toc-type: container - name: People.Trips.PlanItem x-ms-docs-toc-type: page - - name: People.Actions - x-ms-docs-toc-type: container - 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.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json index d89fdd91..2c015301 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -7973,7 +7973,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", @@ -8514,7 +8514,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "Me.GetFavoriteAirline", @@ -8540,7 +8540,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "Me.GetFriendsTrips", @@ -8634,7 +8634,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "Me.GetPeersForTrip", @@ -12050,7 +12050,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -12445,7 +12445,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", @@ -12986,7 +12986,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "Me.Actions" + "Me.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -13016,7 +13016,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "Me.Functions" + "Me.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "Me.UpdatePersonLastName", @@ -13496,7 +13496,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "Me.Functions" + "Me.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "Me.Trips.Trip.GetInvolvedPeople", @@ -17305,7 +17305,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "NewComePeople.Person.GetFavoriteAirline", @@ -17336,7 +17336,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "NewComePeople.Person.GetFriendsTrips", @@ -17440,7 +17440,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "NewComePeople.Person.GetPeersForTrip", @@ -17474,7 +17474,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -17530,7 +17530,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "NewComePeople.Actions" + "NewComePeople.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -17565,7 +17565,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "NewComePeople.Person.UpdatePersonLastName", @@ -18070,7 +18070,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "NewComePeople.Functions" + "NewComePeople.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "NewComePeople.Person.Trips.Trip.GetInvolvedPeople", @@ -26693,7 +26693,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople", @@ -27314,7 +27314,7 @@ "description": "Provides operations to call the GetFavoriteAirline method.", "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function GetFavoriteAirline", "operationId": "People.Person.GetFavoriteAirline", @@ -27352,7 +27352,7 @@ "description": "Provides operations to call the GetFriendsTrips method.", "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function GetFriendsTrips", "operationId": "People.Person.GetFriendsTrips", @@ -27456,7 +27456,7 @@ "description": "Provides operations to call the GetPeersForTrip method.", "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action GetPeersForTrip", "operationId": "People.Person.GetPeersForTrip", @@ -31598,7 +31598,7 @@ "description": "Provides operations to call the Hire method.", "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action Hire", "description": "Hires someone for the company.", @@ -32057,7 +32057,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople", @@ -32678,7 +32678,7 @@ "description": "Provides operations to call the ShareTrip method.", "post": { "tags": [ - "People.Actions" + "People.Person" ], "summary": "Invoke action ShareTrip", "description": "Details of the shared trip.", @@ -32720,7 +32720,7 @@ "description": "Provides operations to call the UpdatePersonLastName method.", "get": { "tags": [ - "People.Functions" + "People.Person" ], "summary": "Invoke function UpdatePersonLastName", "operationId": "People.Person.UpdatePersonLastName", @@ -33311,7 +33311,7 @@ "description": "Provides operations to call the GetInvolvedPeople method.", "get": { "tags": [ - "People.Functions" + "People.Trip" ], "summary": "Invoke function GetInvolvedPeople", "operationId": "People.Person.Trips.Trip.GetInvolvedPeople", @@ -35858,18 +35858,10 @@ "name": "Me.Trip", "x-ms-docs-toc-type": "page" }, - { - "name": "Me.Functions", - "x-ms-docs-toc-type": "container" - }, { "name": "Me.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, - { - "name": "Me.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "NewComePeople.Person", "x-ms-docs-toc-type": "page" @@ -35882,14 +35874,6 @@ "name": "NewComePeople.Person.Location", "x-ms-docs-toc-type": "page" }, - { - "name": "NewComePeople.Functions", - "x-ms-docs-toc-type": "container" - }, - { - "name": "NewComePeople.Actions", - "x-ms-docs-toc-type": "container" - }, { "name": "NewComePeople.Trip", "x-ms-docs-toc-type": "page" @@ -35914,18 +35898,10 @@ "name": "People.Trip", "x-ms-docs-toc-type": "page" }, - { - "name": "People.Functions", - "x-ms-docs-toc-type": "container" - }, { "name": "People.Trips.PlanItem", "x-ms-docs-toc-type": "page" }, - { - "name": "People.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.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml index 25510e86..430334ab 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -5331,7 +5331,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople parameters: @@ -5697,7 +5697,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - Me.Functions + - Me.Person summary: Invoke function GetFavoriteAirline operationId: Me.GetFavoriteAirline responses: @@ -5716,7 +5716,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - Me.Functions + - Me.Person summary: Invoke function GetFriendsTrips operationId: Me.GetFriendsTrips parameters: @@ -5777,7 +5777,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - Me.Actions + - Me.Person summary: Invoke action GetPeersForTrip operationId: Me.GetPeersForTrip requestBody: @@ -8075,7 +8075,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - Me.Actions + - Me.Person summary: Invoke action Hire description: Hires someone for the company. operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -8348,7 +8348,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople parameters: @@ -8714,7 +8714,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - Me.Actions + - Me.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: Me.ShareTrip @@ -8736,7 +8736,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - Me.Functions + - Me.Person summary: Invoke function UpdatePersonLastName operationId: Me.UpdatePersonLastName parameters: @@ -9071,7 +9071,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - Me.Functions + - Me.Trip summary: Invoke function GetInvolvedPeople operationId: Me.Trips.Trip.GetInvolvedPeople parameters: @@ -11594,7 +11594,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function GetFavoriteAirline operationId: NewComePeople.Person.GetFavoriteAirline parameters: @@ -11615,7 +11615,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function GetFriendsTrips operationId: NewComePeople.Person.GetFriendsTrips parameters: @@ -11683,7 +11683,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action GetPeersForTrip operationId: NewComePeople.Person.GetPeersForTrip parameters: @@ -11706,7 +11706,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action Hire description: Hires someone for the company. operationId: NewComePeople.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -11741,7 +11741,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - NewComePeople.Actions + - NewComePeople.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: NewComePeople.Person.ShareTrip @@ -11765,7 +11765,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - NewComePeople.Functions + - NewComePeople.Person summary: Invoke function UpdatePersonLastName operationId: NewComePeople.Person.UpdatePersonLastName parameters: @@ -12106,7 +12106,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - NewComePeople.Functions + - NewComePeople.Trip summary: Invoke function GetInvolvedPeople operationId: NewComePeople.Person.Trips.Trip.GetInvolvedPeople parameters: @@ -17931,7 +17931,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee.Trips.Trip.GetInvolvedPeople parameters: @@ -18353,7 +18353,7 @@ paths: description: Provides operations to call the GetFavoriteAirline method. get: tags: - - People.Functions + - People.Person summary: Invoke function GetFavoriteAirline operationId: People.Person.GetFavoriteAirline parameters: @@ -18380,7 +18380,7 @@ paths: description: Provides operations to call the GetFriendsTrips method. get: tags: - - People.Functions + - People.Person summary: Invoke function GetFriendsTrips operationId: People.Person.GetFriendsTrips parameters: @@ -18448,7 +18448,7 @@ paths: description: Provides operations to call the GetPeersForTrip method. post: tags: - - People.Actions + - People.Person summary: Invoke action GetPeersForTrip operationId: People.Person.GetPeersForTrip parameters: @@ -21247,7 +21247,7 @@ paths: description: Provides operations to call the Hire method. post: tags: - - People.Actions + - People.Person summary: Invoke action Hire description: Hires someone for the company. operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Hire @@ -21564,7 +21564,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager.Trips.Trip.GetInvolvedPeople parameters: @@ -21986,7 +21986,7 @@ paths: description: Provides operations to call the ShareTrip method. post: tags: - - People.Actions + - People.Person summary: Invoke action ShareTrip description: Details of the shared trip. operationId: People.Person.ShareTrip @@ -22016,7 +22016,7 @@ paths: description: Provides operations to call the UpdatePersonLastName method. get: tags: - - People.Functions + - People.Person summary: Invoke function UpdatePersonLastName operationId: People.Person.UpdatePersonLastName parameters: @@ -22429,7 +22429,7 @@ paths: description: Provides operations to call the GetInvolvedPeople method. get: tags: - - People.Functions + - People.Trip summary: Invoke function GetInvolvedPeople operationId: People.Person.Trips.Trip.GetInvolvedPeople parameters: @@ -24065,22 +24065,14 @@ tags: x-ms-docs-toc-type: page - name: Me.Trip x-ms-docs-toc-type: page - - name: Me.Functions - x-ms-docs-toc-type: container - name: Me.Trips.PlanItem x-ms-docs-toc-type: page - - name: Me.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.Functions - x-ms-docs-toc-type: container - - name: NewComePeople.Actions - x-ms-docs-toc-type: container - name: NewComePeople.Trip x-ms-docs-toc-type: page - name: NewComePeople.Trips.PlanItem @@ -24093,11 +24085,7 @@ tags: x-ms-docs-toc-type: page - name: People.Trip x-ms-docs-toc-type: page - - name: People.Functions - x-ms-docs-toc-type: container - name: People.Trips.PlanItem x-ms-docs-toc-type: page - - name: People.Actions - x-ms-docs-toc-type: container - name: ResetDataSource x-ms-docs-toc-type: container \ No newline at end of file