Rename the operationId for operation import
This commit is contained in:
parent
6377ee0d47
commit
1d7e7e0823
|
@ -589,7 +589,7 @@
|
|||
"Airports"
|
||||
],
|
||||
"summary": "Invoke functionImport GetNearestAirport",
|
||||
"operationId": "OperationImport-GetNearestAirport",
|
||||
"operationId": "FunctionImport.GetNearestAirport",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "lat",
|
||||
|
@ -667,7 +667,7 @@
|
|||
"People"
|
||||
],
|
||||
"summary": "Invoke functionImport GetPersonWithMostFriends",
|
||||
"operationId": "OperationImport-GetPersonWithMostFriends",
|
||||
"operationId": "FunctionImport.GetPersonWithMostFriends",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
|
@ -3798,7 +3798,7 @@
|
|||
"ResetDataSource"
|
||||
],
|
||||
"summary": "Invoke actionImport ResetDataSource",
|
||||
"operationId": "OperationImport.ResetDataSource",
|
||||
"operationId": "ActionImport.ResetDataSource",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
|
|
|
@ -534,7 +534,7 @@
|
|||
"Airports"
|
||||
],
|
||||
"summary": "Invoke functionImport GetNearestAirport",
|
||||
"operationId": "OperationImport-GetNearestAirport",
|
||||
"operationId": "FunctionImport.GetNearestAirport",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -570,7 +570,7 @@
|
|||
"People"
|
||||
],
|
||||
"summary": "Invoke functionImport GetPersonWithMostFriends",
|
||||
"operationId": "OperationImport-GetPersonWithMostFriends",
|
||||
"operationId": "FunctionImport.GetPersonWithMostFriends",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -3294,7 +3294,7 @@
|
|||
"ResetDataSource"
|
||||
],
|
||||
"summary": "Invoke actionImport ResetDataSource",
|
||||
"operationId": "OperationImport.ResetDataSource",
|
||||
"operationId": "ActionImport.ResetDataSource",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Microsoft.OpenApi.OData.Operation
|
|||
{
|
||||
if (EdmOperationImport.IsActionImport())
|
||||
{
|
||||
operation.OperationId = "OperationImport." + EdmOperationImport.Name;
|
||||
operation.OperationId = "ActionImport." + EdmOperationImport.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -53,11 +53,11 @@ namespace Microsoft.OpenApi.OData.Operation
|
|||
if (Context.Model.IsOperationImportOverload(EdmOperationImport))
|
||||
{
|
||||
string hash = pathItemName.GetHashSHA256();
|
||||
operation.OperationId = "OperationImport-" + EdmOperationImport.Name + "-" + hash.Substring(0, 4);
|
||||
operation.OperationId = "FunctionImport." + EdmOperationImport.Name + "-" + hash.Substring(0, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
operation.OperationId = "OperationImport-" + EdmOperationImport.Name;
|
||||
operation.OperationId = "FunctionImport." + EdmOperationImport.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests
|
|||
|
||||
if (enableOperationId)
|
||||
{
|
||||
Assert.Equal("OperationImport.MyAction", operation.OperationId);
|
||||
Assert.Equal("ActionImport.MyAction", operation.OperationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests
|
|||
|
||||
if (enableOperationId)
|
||||
{
|
||||
Assert.Equal("OperationImport-MyFunction", operation.OperationId);
|
||||
Assert.Equal("FunctionImport.MyFunction", operation.OperationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ namespace Microsoft.OpenApi.OData.Operation.Tests
|
|||
|
||||
if (enableOperationId)
|
||||
{
|
||||
Assert.Equal("OperationImport-MyFunction-3e3f", operation.OperationId);
|
||||
Assert.Equal("FunctionImport.MyFunction-3e3f", operation.OperationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -535,7 +535,7 @@
|
|||
"Airports"
|
||||
],
|
||||
"summary": "Invoke functionImport GetNearestAirport",
|
||||
"operationId": "OperationImport-GetNearestAirport",
|
||||
"operationId": "FunctionImport.GetNearestAirport",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -573,7 +573,7 @@
|
|||
"People"
|
||||
],
|
||||
"summary": "Invoke functionImport GetPersonWithMostFriends",
|
||||
"operationId": "OperationImport-GetPersonWithMostFriends",
|
||||
"operationId": "FunctionImport.GetPersonWithMostFriends",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
|
@ -3489,7 +3489,7 @@
|
|||
"ResetDataSource"
|
||||
],
|
||||
"summary": "Invoke actionImport ResetDataSource",
|
||||
"operationId": "OperationImport.ResetDataSource",
|
||||
"operationId": "ActionImport.ResetDataSource",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
|
|
|
@ -357,7 +357,7 @@ paths:
|
|||
tags:
|
||||
- Airports
|
||||
summary: Invoke functionImport GetNearestAirport
|
||||
operationId: OperationImport-GetNearestAirport
|
||||
operationId: FunctionImport.GetNearestAirport
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
|
@ -382,7 +382,7 @@ paths:
|
|||
tags:
|
||||
- People
|
||||
summary: Invoke functionImport GetPersonWithMostFriends
|
||||
operationId: OperationImport-GetPersonWithMostFriends
|
||||
operationId: FunctionImport.GetPersonWithMostFriends
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -2452,7 +2452,7 @@ paths:
|
|||
tags:
|
||||
- ResetDataSource
|
||||
summary: Invoke actionImport ResetDataSource
|
||||
operationId: OperationImport.ResetDataSource
|
||||
operationId: ActionImport.ResetDataSource
|
||||
responses:
|
||||
'204':
|
||||
description: Success
|
||||
|
|
|
@ -589,7 +589,7 @@
|
|||
"Airports"
|
||||
],
|
||||
"summary": "Invoke functionImport GetNearestAirport",
|
||||
"operationId": "OperationImport-GetNearestAirport",
|
||||
"operationId": "FunctionImport.GetNearestAirport",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "lat",
|
||||
|
@ -667,7 +667,7 @@
|
|||
"People"
|
||||
],
|
||||
"summary": "Invoke functionImport GetPersonWithMostFriends",
|
||||
"operationId": "OperationImport-GetPersonWithMostFriends",
|
||||
"operationId": "FunctionImport.GetPersonWithMostFriends",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
|
@ -3987,7 +3987,7 @@
|
|||
"ResetDataSource"
|
||||
],
|
||||
"summary": "Invoke actionImport ResetDataSource",
|
||||
"operationId": "OperationImport.ResetDataSource",
|
||||
"operationId": "ActionImport.ResetDataSource",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
|
|
|
@ -387,7 +387,7 @@ paths:
|
|||
tags:
|
||||
- Airports
|
||||
summary: Invoke functionImport GetNearestAirport
|
||||
operationId: OperationImport-GetNearestAirport
|
||||
operationId: FunctionImport.GetNearestAirport
|
||||
parameters:
|
||||
- name: lat
|
||||
in: path
|
||||
|
@ -430,7 +430,7 @@ paths:
|
|||
tags:
|
||||
- People
|
||||
summary: Invoke functionImport GetPersonWithMostFriends
|
||||
operationId: OperationImport-GetPersonWithMostFriends
|
||||
operationId: FunctionImport.GetPersonWithMostFriends
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
|
@ -2725,7 +2725,7 @@ paths:
|
|||
tags:
|
||||
- ResetDataSource
|
||||
summary: Invoke actionImport ResetDataSource
|
||||
operationId: OperationImport.ResetDataSource
|
||||
operationId: ActionImport.ResetDataSource
|
||||
responses:
|
||||
'204':
|
||||
description: Success
|
||||
|
|
Loading…
Reference in a new issue