Skip to content

Commit d286883

Browse files
committed
add test samples generated with PUT update operation
1 parent 87a3eca commit d286883

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OData.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@
8181
<Property Name="Name" Type="Edm.String" />
8282
<Property Name="IcaoCode" Type="Edm.String" Nullable="false" />
8383
<Property Name="IataCode" Type="Edm.String" />
84-
<Property Name="Location" Type="Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" />
84+
<Property Name="Location" Type="Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation">
85+
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
86+
<Record>
87+
<PropertyValue Property="UpdateMethod">
88+
<EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
89+
</PropertyValue>
90+
</Record>
91+
</Annotation>
92+
</Property>
8593
</EntityType>
8694
<ComplexType Name="Location">
8795
<Property Name="Address" Type="Edm.String" />
@@ -254,6 +262,13 @@
254262
<PropertyPath>Name</PropertyPath>
255263
</Collection>
256264
</Annotation>
265+
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
266+
<Record>
267+
<PropertyValue Property="UpdateMethod">
268+
<EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
269+
</PropertyValue>
270+
</Record>
271+
</Annotation>
257272
</EntitySet>
258273
<EntitySet Name="Airports" EntityType="Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport">
259274
<NavigationPropertyBinding Path="Location/EmergencyAuthority" Target="People" />

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
},
181181
"x-ms-docs-operation-type": "operation"
182182
},
183-
"patch": {
183+
"put": {
184184
"tags": [
185185
"Airlines.Airline"
186186
],
@@ -573,7 +573,7 @@
573573
}
574574
}
575575
},
576-
"patch": {
576+
"put": {
577577
"summary": "Update property Location value.",
578578
"operationId": "Location.AirportLocation.UpdateAirportLocation",
579579
"consumes": [

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ paths:
118118
default:
119119
$ref: '#/responses/error'
120120
x-ms-docs-operation-type: operation
121-
patch:
121+
put:
122122
tags:
123123
- Airlines.Airline
124124
summary: Update entity in Airlines
@@ -384,7 +384,7 @@ paths:
384384
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation'
385385
default:
386386
$ref: '#/responses/error'
387-
patch:
387+
put:
388388
summary: Update property Location value.
389389
operationId: Location.AirportLocation.UpdateAirportLocation
390390
consumes:

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
},
208208
"x-ms-docs-operation-type": "operation"
209209
},
210-
"patch": {
210+
"put": {
211211
"tags": [
212212
"Airlines.Airline"
213213
],
@@ -648,7 +648,7 @@
648648
}
649649
}
650650
},
651-
"patch": {
651+
"put": {
652652
"summary": "Update property Location value.",
653653
"operationId": "Location.AirportLocation.UpdateAirportLocation",
654654
"parameters": [

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ paths:
136136
default:
137137
$ref: '#/components/responses/error'
138138
x-ms-docs-operation-type: operation
139-
patch:
139+
put:
140140
tags:
141141
- Airlines.Airline
142142
summary: Update entity in Airlines
@@ -433,7 +433,7 @@ paths:
433433
$ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation'
434434
default:
435435
$ref: '#/components/responses/error'
436-
patch:
436+
put:
437437
summary: Update property Location value.
438438
operationId: Location.AirportLocation.UpdateAirportLocation
439439
parameters:

0 commit comments

Comments
 (0)