Compare commits
4 commits
master
...
bugfix/mis
Author | SHA1 | Date | |
---|---|---|---|
1bb0a3feca | |||
faa8df1365 | |||
f31925bd64 | |||
9f6a60e5ad |
35
src/Microsoft.OpenApi.OData.Reader/Edm/EdmTypeExtensions.cs
Normal file
35
src/Microsoft.OpenApi.OData.Reader/Edm/EdmTypeExtensions.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
// ------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
using Microsoft.OData.Edm;
|
||||
|
||||
namespace Microsoft.OpenApi.OData.Edm
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for <see cref="IEdmType"/>
|
||||
/// </summary>
|
||||
public static class EdmTypeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines wether a path parameter should be wrapped in quotes based on the type of the parameter.
|
||||
/// </summary>
|
||||
/// <param name="edmType">The type of the parameter.</param>
|
||||
public static bool ShouldPathParameterBeQuoted(this IEdmType edmType)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return edmType.TypeKind switch
|
||||
{
|
||||
EdmTypeKind.Enum => true,
|
||||
EdmTypeKind.Primitive when edmType.IsString() || edmType.IsTemporal() => true,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -77,13 +77,7 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
}
|
||||
else
|
||||
{
|
||||
IList<string> keyStrings = new List<string>();
|
||||
foreach (var key in KeyMappings)
|
||||
{
|
||||
keyStrings.Add(key.Key + "={" + key.Value + "}");
|
||||
}
|
||||
|
||||
return String.Join(",", keyStrings);
|
||||
return string.Join(",", KeyMappings.Select(x => x.Key + "='{" + x.Value + "}'"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,7 +103,8 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
foreach (var keyProperty in keys)
|
||||
{
|
||||
string name = Utils.GetUniqueName(keyProperty.Name, parameters);
|
||||
keyStrings.Add(keyProperty.Name + "={" + name + "}");
|
||||
var quote = keyProperty.Type.Definition.ShouldPathParameterBeQuoted() ? "'" : string.Empty;
|
||||
keyStrings.Add($"{keyProperty.Name}={quote}{{{name}}}{quote}");
|
||||
}
|
||||
|
||||
return String.Join(",", keyStrings);
|
||||
|
|
|
@ -83,7 +83,8 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
}
|
||||
else
|
||||
{
|
||||
return p.Name + "={" + uniqueName + "}";
|
||||
var quote = p.Type.Definition.ShouldPathParameterBeQuoted() ? "'" : string.Empty;
|
||||
return $"{p.Name}={quote}{{{uniqueName}}}{quote}";
|
||||
}
|
||||
})));
|
||||
|
||||
|
|
|
@ -148,7 +148,8 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
}
|
||||
else
|
||||
{
|
||||
return p.Name + "={" + uniqueName + "}";
|
||||
var quote = p.Type.Definition.ShouldPathParameterBeQuoted() ? "'" : string.Empty;
|
||||
return p.Name + $"={quote}{{{uniqueName}}}{quote}";
|
||||
}
|
||||
})));
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
Singleton,
|
||||
|
||||
/// <summary>
|
||||
/// Represents an operation (function or action) path, for example: ~/users/NS.findRooms(roomId={roomId})
|
||||
/// Represents an operation (function or action) path, for example: ~/users/NS.findRooms(roomId='{roomId}')
|
||||
/// </summary>
|
||||
Operation,
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
{
|
||||
// Non-Contained
|
||||
// Single-Valued: ~/entityset/{key}/single-valued-Nav/$ref
|
||||
// Collection-valued: ~/entityset/{key}/collection-valued-Nav/$ref?$id ={navKey}
|
||||
// Collection-valued: ~/entityset/{key}/collection-valued-Nav/$ref?$id='{navKey}'
|
||||
CreateRefPath(currentPath);
|
||||
|
||||
if (targetsMany)
|
||||
|
|
|
@ -136,7 +136,8 @@ namespace Microsoft.OpenApi.OData.Generator
|
|||
|
||||
if (parameterNameMapping != null)
|
||||
{
|
||||
parameter.Description = $"Usage: {edmParameter.Name}={{{parameterNameMapping[edmParameter.Name]}}}";
|
||||
var quote = edmParameter.Type.Definition.ShouldPathParameterBeQuoted() ? "'" : string.Empty;
|
||||
parameter.Description = $"Usage: {edmParameter.Name}={quote}{{{parameterNameMapping[edmParameter.Name]}}}{quote}";
|
||||
}
|
||||
|
||||
parameters.Add(parameter);
|
||||
|
@ -203,7 +204,8 @@ namespace Microsoft.OpenApi.OData.Generator
|
|||
|
||||
if (keySegment.KeyMappings != null)
|
||||
{
|
||||
parameter.Description = parameter.Description + $", {keyProperty.Name}={{{parameter.Name}}}";
|
||||
var quote = keyProperty.Type.Definition.ShouldPathParameterBeQuoted() ? "'" : string.Empty;
|
||||
parameter.Description += $", {keyProperty.Name}={quote}{{{parameter.Name}}}{quote}";
|
||||
}
|
||||
|
||||
parameter.Extensions.Add(Constants.xMsKeyType, new OpenApiString(entityType.Name));
|
||||
|
|
|
@ -3,6 +3,8 @@ abstract Microsoft.OpenApi.OData.Edm.ODataSegment.Identifier.get -> string
|
|||
abstract Microsoft.OpenApi.OData.Edm.ODataSegment.Kind.get -> Microsoft.OpenApi.OData.Edm.ODataSegmentKind
|
||||
Microsoft.OpenApi.OData.Common.Utils
|
||||
Microsoft.OpenApi.OData.Edm.EdmModelExtensions
|
||||
Microsoft.OpenApi.OData.Edm.EdmTypeExtensions
|
||||
static Microsoft.OpenApi.OData.Edm.EdmTypeExtensions.ShouldPathParameterBeQuoted(this Microsoft.OData.Edm.IEdmType edmType) -> bool
|
||||
Microsoft.OpenApi.OData.Edm.IODataPathProvider
|
||||
Microsoft.OpenApi.OData.Edm.IODataPathProvider.CanFilter(Microsoft.OData.Edm.IEdmElement element) -> bool
|
||||
Microsoft.OpenApi.OData.Edm.IODataPathProvider.GetPaths(Microsoft.OData.Edm.IEdmModel model, Microsoft.OpenApi.OData.OpenApiConvertSettings settings) -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OData.Edm.ODataPath>
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Microsoft.OpenApi.OData.Edm.Tests
|
|||
};
|
||||
|
||||
// Assert
|
||||
Assert.Equal("firstName={firstName},lastName={lastName}", segment.GetPathItemName(settings));
|
||||
Assert.Equal("firstName='{firstName}',lastName='{lastName}'", segment.GetPathItemName(settings));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace Microsoft.OpenApi.OData.Edm.Tests
|
|||
var segment = new ODataOperationImportSegment(_functionImport);
|
||||
|
||||
// Assert
|
||||
Assert.Equal("MyFunction(firstName={firstName},lastName={lastName})",
|
||||
Assert.Equal("MyFunction(firstName='{firstName}',lastName='{lastName}')",
|
||||
segment.GetPathItemName(new OpenApiConvertSettings()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,9 +98,9 @@ namespace Microsoft.OpenApi.OData.Edm.Tests
|
|||
|
||||
[Theory]
|
||||
[InlineData(true, true, "{param}")]
|
||||
[InlineData(true, false, "NS.MyFunction(param={param})")]
|
||||
[InlineData(false, true, "NS.MyFunction(param={param})")]
|
||||
[InlineData(false, false, "NS.MyFunction(param={param})")]
|
||||
[InlineData(true, false, "NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, true, "NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, false, "NS.MyFunction(param='{param}')")]
|
||||
public void GetPathItemNameReturnsCorrectFunctionLiteralForEscapedFunction(bool isEscapedFunction, bool enableEscapeFunctionCall, string expected)
|
||||
{
|
||||
// Arrange & Act
|
||||
|
@ -121,9 +121,9 @@ namespace Microsoft.OpenApi.OData.Edm.Tests
|
|||
|
||||
[Theory]
|
||||
[InlineData(true, true, "{param}:")]
|
||||
[InlineData(true, false, "NS.MyFunction(param={param})")]
|
||||
[InlineData(false, true, "NS.MyFunction(param={param})")]
|
||||
[InlineData(false, false, "NS.MyFunction(param={param})")]
|
||||
[InlineData(true, false, "NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, true, "NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, false, "NS.MyFunction(param='{param}')")]
|
||||
public void GetPathItemNameReturnsCorrectFunctionLiteralForEscapedComposableFunction(bool isEscapedFunction, bool enableEscapeFunctionCall, string expected)
|
||||
{
|
||||
// Arrange & Act
|
||||
|
|
|
@ -249,10 +249,10 @@ namespace Microsoft.OpenApi.OData.Edm.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(true, true, "/Customers/FirstName={FirstName},LastName={LastName}")]
|
||||
[InlineData(true, false, "/Customers/FirstName={FirstName},LastName={LastName}")]
|
||||
[InlineData(false, true, "/Customers(FirstName={FirstName},LastName={LastName})")]
|
||||
[InlineData(false, false, "/Customers(FirstName={FirstName},LastName={LastName})")]
|
||||
[InlineData(true, true, "/Customers/FirstName='{FirstName}',LastName='{LastName}'")]
|
||||
[InlineData(true, false, "/Customers/FirstName='{FirstName}',LastName='{LastName}'")]
|
||||
[InlineData(false, true, "/Customers(FirstName='{FirstName}',LastName='{LastName}')")]
|
||||
[InlineData(false, false, "/Customers(FirstName='{FirstName}',LastName='{LastName}')")]
|
||||
public void GetPathItemNameReturnsCorrectStringWithMultipleKeySegment(bool keyAsSegment, bool prefix, string expected)
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -75,12 +75,12 @@ namespace Microsoft.OpenApi.OData.Generator.Tests
|
|||
[InlineData(true, true, true, "/Customers({ID}):/{param}:")]
|
||||
[InlineData(true, true, false, "/Customers({ID}):/{param}")]
|
||||
|
||||
[InlineData(true, false, true, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(true, false, false, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(false, true, true, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(false, true, false, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(false, false, true, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(false, false, false, "/Customers({ID})/NS.MyFunction(param={param})")]
|
||||
[InlineData(true, false, true, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
[InlineData(true, false, false, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, true, true, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, true, false, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, false, true, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
[InlineData(false, false, false, "/Customers({ID})/NS.MyFunction(param='{param}')")]
|
||||
public void CreatePathItemsReturnsForEscapeFunctionModel(bool enableEscaped, bool hasEscapedAnnotation, bool isComposable, string expected)
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests
|
|||
|
||||
if (enableOperationId)
|
||||
{
|
||||
Assert.Equal("FunctionImport.MyFunction-3e3f", operation.OperationId);
|
||||
Assert.Equal("FunctionImport.MyFunction-cc1c", operation.OperationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -229,7 +229,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests
|
|||
|
||||
if (enableOperationId)
|
||||
{
|
||||
Assert.Equal("Customers.Customer.MyFunction-28ae", operation.OperationId);
|
||||
Assert.Equal("Customers.Customer.MyFunction-df74", operation.OperationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models",
|
||||
|
@ -1206,7 +1206,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Me.Functions"
|
||||
|
@ -1220,7 +1220,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "userName",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -1350,7 +1350,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Me.Functions"
|
||||
|
@ -1364,7 +1364,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "lastName",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -2949,7 +2949,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NewComePeople.Functions"
|
||||
|
@ -2971,7 +2971,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "userName",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -3117,7 +3117,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NewComePeople.Functions"
|
||||
|
@ -3139,7 +3139,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "lastName",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -4842,7 +4842,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"People.Functions"
|
||||
|
@ -4864,7 +4864,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "userName",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -5010,7 +5010,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"People.Functions"
|
||||
|
@ -5032,7 +5032,7 @@
|
|||
{
|
||||
"in": "path",
|
||||
"name": "lastName",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
swagger: '2.0'
|
||||
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
|
||||
|
@ -822,7 +822,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- Me.Functions
|
||||
|
@ -833,7 +833,7 @@ paths:
|
|||
parameters:
|
||||
- in: path
|
||||
name: userName
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
@ -919,7 +919,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- Me.Functions
|
||||
|
@ -930,7 +930,7 @@ paths:
|
|||
parameters:
|
||||
- in: path
|
||||
name: lastName
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
@ -2038,7 +2038,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- NewComePeople.Functions
|
||||
|
@ -2055,7 +2055,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- in: path
|
||||
name: userName
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
@ -2153,7 +2153,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- NewComePeople.Functions
|
||||
|
@ -2170,7 +2170,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- in: path
|
||||
name: lastName
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
@ -3364,7 +3364,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- People.Functions
|
||||
|
@ -3381,7 +3381,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- in: path
|
||||
name: userName
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
@ -3479,7 +3479,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- People.Functions
|
||||
|
@ -3496,7 +3496,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- in: path
|
||||
name: lastName
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"title": "OData Service for namespace Microsoft.OData.Service.Sample.TrippinInMemory.Models",
|
||||
|
@ -1370,7 +1370,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Me.Functions"
|
||||
|
@ -1381,7 +1381,7 @@
|
|||
{
|
||||
"name": "userName",
|
||||
"in": "path",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
@ -1522,7 +1522,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Me.Functions"
|
||||
|
@ -1533,7 +1533,7 @@
|
|||
{
|
||||
"name": "lastName",
|
||||
"in": "path",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
@ -3304,7 +3304,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NewComePeople.Functions"
|
||||
|
@ -3325,7 +3325,7 @@
|
|||
{
|
||||
"name": "userName",
|
||||
"in": "path",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
@ -3490,7 +3490,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NewComePeople.Functions"
|
||||
|
@ -3511,7 +3511,7 @@
|
|||
{
|
||||
"name": "lastName",
|
||||
"in": "path",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
@ -5427,7 +5427,7 @@
|
|||
"x-ms-docs-operation-type": "function"
|
||||
}
|
||||
},
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})": {
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName='{userName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"People.Functions"
|
||||
|
@ -5448,7 +5448,7 @@
|
|||
{
|
||||
"name": "userName",
|
||||
"in": "path",
|
||||
"description": "Usage: userName={userName}",
|
||||
"description": "Usage: userName='{userName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
@ -5613,7 +5613,7 @@
|
|||
"x-ms-docs-operation-type": "action"
|
||||
}
|
||||
},
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})": {
|
||||
"/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName='{lastName}')": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"People.Functions"
|
||||
|
@ -5634,7 +5634,7 @@
|
|||
{
|
||||
"name": "lastName",
|
||||
"in": "path",
|
||||
"description": "Usage: lastName={lastName}",
|
||||
"description": "Usage: lastName='{lastName}'",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
openapi: 3.0.1
|
||||
openapi: 3.0.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
|
||||
|
@ -914,7 +914,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- Me.Functions
|
||||
|
@ -923,7 +923,7 @@ paths:
|
|||
parameters:
|
||||
- name: userName
|
||||
in: path
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
@ -1012,7 +1012,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/Me/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- Me.Functions
|
||||
|
@ -1021,7 +1021,7 @@ paths:
|
|||
parameters:
|
||||
- name: lastName
|
||||
in: path
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
@ -2238,7 +2238,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- NewComePeople.Functions
|
||||
|
@ -2254,7 +2254,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- name: userName
|
||||
in: path
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
@ -2359,7 +2359,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/NewComePeople/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- NewComePeople.Functions
|
||||
|
@ -2375,7 +2375,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- name: lastName
|
||||
in: path
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
@ -3691,7 +3691,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: function
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName={userName})':
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetFriendsTrips(userName=''{userName}'')':
|
||||
get:
|
||||
tags:
|
||||
- People.Functions
|
||||
|
@ -3707,7 +3707,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- name: userName
|
||||
in: path
|
||||
description: 'Usage: userName={userName}'
|
||||
description: 'Usage: userName=''{userName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
@ -3812,7 +3812,7 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/error'
|
||||
x-ms-docs-operation-type: action
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName={lastName})':
|
||||
'/People/{UserName}/Microsoft.OData.Service.Sample.TrippinInMemory.Models.UpdatePersonLastName(lastName=''{lastName}'')':
|
||||
get:
|
||||
tags:
|
||||
- People.Functions
|
||||
|
@ -3828,7 +3828,7 @@ paths:
|
|||
x-ms-docs-key-type: Person
|
||||
- name: lastName
|
||||
in: path
|
||||
description: 'Usage: lastName={lastName}'
|
||||
description: 'Usage: lastName=''{lastName}'''
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
|
Loading…
Reference in a new issue