Skip to content

Commit f43a170

Browse files
committed
add test samples generated with PUT update operation
1 parent 3d7c2c8 commit f43a170

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
@@ -91,7 +91,15 @@
9191
<Property Name="Name" Type="Edm.String" />
9292
<Property Name="IcaoCode" Type="Edm.String" Nullable="false" />
9393
<Property Name="IataCode" Type="Edm.String" />
94-
<Property Name="Location" Type="Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" />
94+
<Property Name="Location" Type="Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation">
95+
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
96+
<Record>
97+
<PropertyValue Property="UpdateMethod">
98+
<EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
99+
</PropertyValue>
100+
</Record>
101+
</Annotation>
102+
</Property>
95103
</EntityType>
96104
<ComplexType Name="Location">
97105
<Property Name="Address" Type="Edm.String" />
@@ -287,6 +295,13 @@
287295
<PropertyPath>Name</PropertyPath>
288296
</Collection>
289297
</Annotation>
298+
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
299+
<Record>
300+
<PropertyValue Property="UpdateMethod">
301+
<EnumMember>Org.OData.Capabilities.V1.HttpMethod/PUT</EnumMember>
302+
</PropertyValue>
303+
</Record>
304+
</Annotation>
290305
</EntitySet>
291306
<EntitySet Name="Airports" EntityType="Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport">
292307
<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)