Modify the codes

This commit is contained in:
Sam Xu 2018-09-18 14:35:57 -07:00
parent 57b66cb983
commit 5348ea25f2
12 changed files with 264 additions and 74 deletions

View file

@ -278,8 +278,10 @@ namespace Microsoft.OpenApi.OData.Capabilities
/// <returns>The capabilities restrictions or null.</returns>
private static ICapablitiesRestrictions GetCapabilities(this IEdmModel model, IEdmVocabularyAnnotatable target, CapabilitesTermKind kind)
{
Utils.CheckArgumentNull(model, nameof(model));
Utils.CheckArgumentNull(target, nameof(target));
if (model == null || target == null)
{
return null;
}
lock (_objectLock)
{

View file

@ -35,6 +35,11 @@ namespace Microsoft.OpenApi.OData.Common
/// </summary>
public static string StatusCodeDefault = "default";
/// <summary>
/// Edm model error extension key.
/// </summary>
public static string xMsEdmModelError = "x-ms-edm-error-";
/// <summary>
/// extension for toc (table of content) type
/// </summary>

View file

@ -25,9 +25,9 @@ namespace Microsoft.OpenApi.OData.Edm
internal class ODataContext
{
private IDictionary<IEdmTypeReference, IEdmOperation> _boundOperations;
private IEnumerable<ODataPath> _allPaths = null;
private bool _keyAsSegmentSupported = false;
private IList<OpenApiTag> _tags = new List<OpenApiTag>();
private ODataPathProvider _pathProvider;
public HttpRequestProvider _httpRequestProvider;
public AuthorizationProvider _authorizationProvider;
@ -50,12 +50,10 @@ namespace Microsoft.OpenApi.OData.Edm
Model = model ?? throw Error.ArgumentNull(nameof(model));
Settings = settings ?? throw Error.ArgumentNull(nameof(settings));
EdmModelVisitor visitor = new EdmModelVisitor();
EdmSpatialTypeVisitor visitor = new EdmSpatialTypeVisitor();
visitor.Visit(model);
IsSpatialTypeUsed = visitor.IsSpatialTypeUsed;
_pathProvider = new ODataPathProvider(model);
OperationHanderProvider = new OperationHandlerProvider();
PathItemHanderProvider = new PathItemHandlerProvider();
@ -104,7 +102,18 @@ namespace Microsoft.OpenApi.OData.Edm
/// <summary>
/// Gets the <see cref="ODataPath"/>s.
/// </summary>
public IEnumerable<ODataPath> Paths => _pathProvider.CreatePaths();
public IEnumerable<ODataPath> AllPaths
{
get
{
if (_allPaths == null)
{
_allPaths = LoadAllODataPaths();
}
return _allPaths;
}
}
/// <summary>
/// Gets the boolean value indicating to support key as segment.
@ -233,5 +242,26 @@ namespace Microsoft.OpenApi.OData.Edm
}
_tags.Add(tagItem);
}
/// <summary>
/// Gets all OData paths
/// </summary>
/// <returns>All acceptable OData path.</returns>
private IEnumerable<ODataPath> LoadAllODataPaths()
{
ODataPathProvider pathProvider = new ODataPathProvider(Model);
IEnumerable<ODataPath> allPaths = pathProvider.CreatePaths();
foreach (var path in allPaths)
{
if ((path.Kind == ODataPathKind.Operation && !Settings.EnableOperationPath) ||
(path.Kind == ODataPathKind.OperationImport && !Settings.EnableOperationImportPath) ||
(path.Kind == ODataPathKind.NavigationProperty && !Settings.EnableNavigationPropertyPath))
{
continue;
}
yield return path;
}
}
}
}

View file

@ -37,15 +37,8 @@ namespace Microsoft.OpenApi.OData
/// <returns>The converted Open API document object, <see cref="OpenApiDocument"/>.</returns>
public static OpenApiDocument ConvertToOpenApi(this IEdmModel model, OpenApiConvertSettings settings)
{
if (model == null)
{
throw Error.ArgumentNull(nameof(model));
}
if (settings == null)
{
settings = new OpenApiConvertSettings(); // default
}
Utils.CheckArgumentNull(model, nameof(model));
Utils.CheckArgumentNull(settings, nameof(settings));
if (settings.VerifyEdmModel)
{
@ -56,7 +49,7 @@ namespace Microsoft.OpenApi.OData
int index = 1;
foreach (var error in errors)
{
document.Extensions.Add("x-edm-error-" + index++, new OpenApiString(error.ToString()));
document.Extensions.Add(Constants.xMsEdmModelError + index++, new OpenApiString(error.ToString()));
}
return document;

View file

@ -8,9 +8,9 @@ using Microsoft.OData.Edm;
namespace Microsoft.OpenApi.OData.Generator
{
/// <summary>
/// Edm model visitor
/// Visit the <see cref="IEdmModel"/> to test the Spatial types are used or not.
/// </summary>
internal class EdmModelVisitor
internal class EdmSpatialTypeVisitor
{
/// <summary>
/// Gets the value indicating Edm spatial type using in the Edm model.
@ -23,13 +23,13 @@ namespace Microsoft.OpenApi.OData.Generator
/// <param name="model">The Edm model.</param>
public void Visit(IEdmModel model)
{
IsSpatialTypeUsed = false;
if (model == null)
{
return;
}
IsSpatialTypeUsed = false;
foreach (var element in model.SchemaElements)
{
switch (element.SchemaElementKind)

View file

@ -31,15 +31,10 @@ namespace Microsoft.OpenApi.OData.Generator
return pathItems;
}
foreach (ODataPath path in context.Paths)
OpenApiConvertSettings settings = context.Settings.Clone();
settings.EnableKeyAsSegment = context.KeyAsSegment;
foreach (ODataPath path in context.AllPaths)
{
if ((path.Kind == ODataPathKind.Operation && !context.Settings.EnableOperationPath) ||
(path.Kind == ODataPathKind.OperationImport && !context.Settings.EnableOperationImportPath) ||
(path.Kind == ODataPathKind.NavigationProperty && !context.Settings.EnableNavigationPropertyPath))
{
continue;
}
IPathItemHandler handler = context.PathItemHanderProvider.GetHandler(path.Kind);
if (handler == null)
{

View file

@ -47,21 +47,11 @@ namespace Microsoft.OpenApi.OData
/// </summary>
public bool EnableNavigationPropertyPath { get; set; } = true;
/// <summary>
/// Gets/set a value indicating the navigation property depth.
/// </summary>
public int NavigationPropertyDepth { get; set; } = 2;
/// <summary>
/// Gets/set a value indicating the tags name depth.
/// </summary>
public int TagDepth { get; set; } = 4;
/// <summary>
/// Gets/set a value indicating whether we count key segment as a depth.
/// </summary>
public bool CountKeySegmentAsDepth { get; set; } = true;
/// <summary>
/// Gets/set a value indicating whether we prefix entity type name before single key.
/// </summary>
@ -83,5 +73,25 @@ namespace Microsoft.OpenApi.OData
/// otherwise keep number without quotes.
/// </summary>
public bool IEEE754Compatible { get; set; }
internal OpenApiConvertSettings Clone()
{
var newSettings = new OpenApiConvertSettings();
newSettings.ServiceRoot = this.ServiceRoot;
newSettings.Version = this.Version;
newSettings.EnableKeyAsSegment = this.EnableKeyAsSegment;
newSettings.EnableUnqualifiedCall = this.EnableUnqualifiedCall;
newSettings.EnableOperationPath = this.EnableOperationPath;
newSettings.EnableOperationImportPath = this.EnableOperationImportPath;
newSettings.EnableNavigationPropertyPath = this.EnableNavigationPropertyPath;
newSettings.TagDepth = this.TagDepth;
newSettings.PrefixEntityTypeNameBeforeKey = this.PrefixEntityTypeNameBeforeKey;
newSettings.EnableOperationId = this.EnableOperationId;
newSettings.VerifyEdmModel = this.VerifyEdmModel;
newSettings.IEEE754Compatible = this.IEEE754Compatible;
return newSettings;
}
}
}

View file

@ -114,7 +114,7 @@ namespace Microsoft.OpenApi.OData.PathItem
protected override void SetExtensions(OpenApiPathItem item)
{
IList<ODataPath> samePaths = new List<ODataPath>();
foreach (var path in Context.Paths.Where(p => p.Kind == ODataPathKind.NavigationProperty && p != Path))
foreach (var path in Context.AllPaths.Where(p => p.Kind == ODataPathKind.NavigationProperty && p != Path))
{
bool lastIsKeySegment = path.LastSegment is ODataKeySegment;
if (LastSegmentIsKeySegment != lastIsKeySegment)
@ -144,9 +144,11 @@ namespace Microsoft.OpenApi.OData.PathItem
if (samePaths.Any())
{
OpenApiArray array = new OpenApiArray();
foreach(var p in samePaths)
OpenApiConvertSettings settings = Context.Settings.Clone();
settings.EnableKeyAsSegment = Context.KeyAsSegment;
foreach (var p in samePaths)
{
array.Add(new OpenApiString(p.GetPathItemName(Context.Settings)));
array.Add(new OpenApiString(p.GetPathItemName(settings)));
}
item.Extensions.Add(Constants.xMsDosGroupPath, array);

View file

@ -59,7 +59,7 @@ namespace Microsoft.OpenApi.OData.PathItem
IEdmNavigationSource currentNavSource = navigationSourceSegment.NavigationSource;
IList<ODataPath> samePaths = new List<ODataPath>();
foreach (var path in Context.Paths.Where(p => p.Kind == ODataPathKind.Operation && p != Path))
foreach (var path in Context.AllPaths.Where(p => p.Kind == ODataPathKind.Operation && p != Path))
{
navigationSourceSegment = path.FirstSegment as ODataNavigationSourceSegment;
if (currentNavSource != navigationSourceSegment.NavigationSource)
@ -79,9 +79,11 @@ namespace Microsoft.OpenApi.OData.PathItem
if (samePaths.Any())
{
OpenApiArray array = new OpenApiArray();
OpenApiConvertSettings settings = Context.Settings.Clone();
settings.EnableKeyAsSegment = Context.KeyAsSegment;
foreach (var p in samePaths)
{
array.Add(new OpenApiString(p.GetPathItemName(Context.Settings)));
array.Add(new OpenApiString(p.GetPathItemName(settings)));
}
item.Extensions.Add(Constants.xMsDosGroupPath, array);

View file

@ -132,6 +132,7 @@ namespace Microsoft.OpenApi.OData.Tests
private static string WriteEdmModelAsOpenApi(IEdmModel model, OpenApiFormat target,
OpenApiConvertSettings settings = null)
{
settings = settings ?? new OpenApiConvertSettings();
var document = model.ConvertToOpenApi(settings);
Assert.NotNull(document); // guard

View file

@ -488,7 +488,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Friends"
]
},
"/People/{UserName}/Friends/{UserName}": {
"get": {
@ -581,7 +584,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Friends/{UserName}"
]
},
"/People/{UserName}/BestFriend": {
"get": {
@ -664,7 +670,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/BestFriend"
]
},
"/People/{UserName}/Trips": {
"get": {
@ -785,7 +794,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Trips"
]
},
"/People/{UserName}/Trips/{TripId}": {
"get": {
@ -874,7 +886,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Trips/{TripId}"
]
},
"/Airlines": {
"get": {
@ -1915,7 +1930,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Friends"
]
},
"/NewComePeople/{UserName}/Friends/{UserName}": {
"get": {
@ -2008,7 +2026,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Friends/{UserName}"
]
},
"/NewComePeople/{UserName}/BestFriend": {
"get": {
@ -2091,7 +2112,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/BestFriend"
]
},
"/NewComePeople/{UserName}/Trips": {
"get": {
@ -2212,7 +2236,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Trips"
]
},
"/NewComePeople/{UserName}/Trips/{TripId}": {
"get": {
@ -2301,7 +2328,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Trips/{TripId}"
]
},
"/Me": {
"get": {
@ -2525,7 +2555,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/Me/Friends"
]
},
"/Me/Friends/{UserName}": {
"get": {
@ -2608,7 +2641,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/Me/Friends/{UserName}"
]
},
"/Me/BestFriend": {
"get": {
@ -2681,7 +2717,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/Me/BestFriend"
]
},
"/Me/Trips": {
"get": {
@ -2792,7 +2831,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/Me/Trips"
]
},
"/Me/Trips/{TripId}": {
"get": {
@ -2871,7 +2913,10 @@
}
},
"x-ms-docs-operation-type": "operation"
}
},
"x-ms-docs-grouped-path": [
"/Me/Trips/{TripId}"
]
},
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": {
"get": {
@ -2913,7 +2958,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()"
]
},
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": {
"get": {
@ -2955,7 +3003,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()"
]
},
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()": {
"get": {
@ -2985,7 +3036,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()"
]
},
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
"get": {
@ -3038,7 +3092,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})"
]
},
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
"get": {
@ -3091,7 +3148,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})"
]
},
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
"get": {
@ -3134,7 +3194,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})"
]
},
"/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": {
"get": {
@ -3192,7 +3255,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()"
]
},
"/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": {
"get": {
@ -3250,7 +3316,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()"
]
},
"/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()": {
"get": {
@ -3298,7 +3367,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()"
]
},
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
"get": {
@ -3344,7 +3416,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})"
]
},
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
"get": {
@ -3390,7 +3465,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})"
]
},
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
"get": {
@ -3426,7 +3504,10 @@
}
},
"x-ms-docs-operation-type": "function"
}
},
"x-ms-docs-grouped-path": [
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})"
]
},
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": {
"post": {
@ -3478,7 +3559,10 @@
}
},
"x-ms-docs-operation-type": "action"
}
},
"x-ms-docs-grouped-path": [
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip"
]
},
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": {
"post": {
@ -3530,7 +3614,10 @@
}
},
"x-ms-docs-operation-type": "action"
}
},
"x-ms-docs-grouped-path": [
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip"
]
},
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip": {
"post": {
@ -3570,7 +3657,10 @@
}
},
"x-ms-docs-operation-type": "action"
}
},
"x-ms-docs-grouped-path": [
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip"
]
},
"/GetPersonWithMostFriends()": {
"get": {

View file

@ -342,6 +342,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/People/{UserName}/Friends'
'/People/{UserName}/Friends/{UserName}':
get:
tags:
@ -409,6 +411,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/People/{UserName}/Friends/{UserName}'
'/People/{UserName}/BestFriend':
get:
tags:
@ -469,6 +473,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/People/{UserName}/BestFriend'
'/People/{UserName}/Trips':
get:
tags:
@ -552,6 +558,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/People/{UserName}/Trips'
'/People/{UserName}/Trips/{TripId}':
get:
tags:
@ -615,6 +623,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/People/{UserName}/Trips/{TripId}'
/Airlines:
get:
tags:
@ -1317,6 +1327,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Friends'
'/NewComePeople/{UserName}/Friends/{UserName}':
get:
tags:
@ -1384,6 +1396,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Friends/{UserName}'
'/NewComePeople/{UserName}/BestFriend':
get:
tags:
@ -1444,6 +1458,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/BestFriend'
'/NewComePeople/{UserName}/Trips':
get:
tags:
@ -1527,6 +1543,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Trips'
'/NewComePeople/{UserName}/Trips/{TripId}':
get:
tags:
@ -1590,6 +1608,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Trips/{TripId}'
/Me:
get:
tags:
@ -1750,6 +1770,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- /Me/Friends
'/Me/Friends/{UserName}':
get:
tags:
@ -1810,6 +1832,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/Me/Friends/{UserName}'
/Me/BestFriend:
get:
tags:
@ -1863,6 +1887,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- /Me/BestFriend
/Me/Trips:
get:
tags:
@ -1939,6 +1965,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- /Me/Trips
'/Me/Trips/{TripId}':
get:
tags:
@ -1995,6 +2023,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
x-ms-docs-grouped-path:
- '/Me/Trips/{TripId}'
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()':
get:
tags:
@ -2021,6 +2051,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()'
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()':
get:
tags:
@ -2047,6 +2079,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()'
/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline():
get:
tags:
@ -2065,6 +2099,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFavoriteAirline()
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
get:
tags:
@ -2098,6 +2134,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})'
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
get:
tags:
@ -2131,6 +2169,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})'
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
get:
tags:
@ -2157,6 +2197,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})'
'/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()':
get:
tags:
@ -2195,6 +2237,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/People/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()'
'/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()':
get:
tags:
@ -2233,6 +2277,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()'
'/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()':
get:
tags:
@ -2264,6 +2310,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/Me/Trips/{TripId}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetInvolvedPeople()'
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
get:
tags:
@ -2294,6 +2342,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})'
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
get:
tags:
@ -2324,6 +2374,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})'
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
get:
tags:
@ -2347,6 +2399,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: function
x-ms-docs-grouped-path:
- '/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})'
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip':
post:
tags:
@ -2382,6 +2436,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: action
x-ms-docs-grouped-path:
- '/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip'
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip':
post:
tags:
@ -2417,6 +2473,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: action
x-ms-docs-grouped-path:
- '/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip'
/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip:
post:
tags:
@ -2444,6 +2502,8 @@ paths:
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: action
x-ms-docs-grouped-path:
- /Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.ShareTrip
/GetPersonWithMostFriends():
get:
tags: