Skip to content

Commit 5651050

Browse files
author
Konrad Jamrozik
committed
ongoing
1 parent edeaf8a commit 5651050

File tree

3 files changed

+142
-0
lines changed

3 files changed

+142
-0
lines changed

openapi-diff/src/modeler/AutoRest.Swagger.Tests/AutoRest.Swagger.Tests.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<ItemGroup>
1212
<None Remove="Resource\Swagger\new\enum_as_string.json" />
13+
<None Remove="Resource\Swagger\new\parameter_order_change_global.json" />
1314
<None Remove="Resource\Swagger\old\enum_as_string.json" />
15+
<None Remove="Resource\Swagger\old\parameter_order_change_global.json" />
1416
</ItemGroup>
1517

1618
<ItemGroup>
@@ -28,6 +30,9 @@
2830
<Content Include="Resource\Swagger\new\operation_check_03.json" />
2931
<Content Include="Resource\Swagger\new\operation_check_04.json" />
3032
<Content Include="Resource\Swagger\new\operation_check_05.json" />
33+
<Content Include="Resource\Swagger\new\parameter_order_change_global.json">
34+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
35+
</Content>
3136
<Content Include="Resource\Swagger\new\param_check_01.json" />
3237
<Content Include="Resource\Swagger\new\removed_definition.json" />
3338
<Content Include="Resource\Swagger\new\removed_operation.json" />
@@ -55,6 +60,9 @@
5560
<Content Include="Resource\Swagger\old\added_required_property.json">
5661
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
5762
</Content>
63+
<Content Include="Resource\Swagger\old\parameter_order_change_global.json">
64+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
65+
</Content>
5866
<Content Include="Resource\Swagger\old\recursive_model.json" />
5967
<Content Include="Resource\Swagger\old\changed_operation_id.json" />
6068
<Content Include="Resource\Swagger\old\added_path.json" />
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"swagger": 2.0,
3+
"info": {
4+
"title": "required_parameter",
5+
"version": "1.0"
6+
},
7+
"host": "localhost:8000",
8+
"schemes": [ "http", "https" ],
9+
"paths": {
10+
"/api/Parameters": {
11+
"get": {
12+
"tag": [ "Parameters" ],
13+
"operationId": "Parameters_Get",
14+
"produces": [
15+
"text/plain"
16+
],
17+
"parameters": [
18+
{
19+
"$ref": "#/parameters/MethodLocationParam1"
20+
},
21+
{
22+
"$ref": "#/parameters/ImplicitLocationParam"
23+
},
24+
{
25+
"$ref": "#/parameters/MethodLocationParam2"
26+
},
27+
{
28+
"$ref": "#/parameters/ClientLocationParam"
29+
}
30+
]
31+
}
32+
}
33+
},
34+
"parameters": {
35+
"ImplicitLocationParam": {
36+
"name": "implicit_location_param",
37+
"in": "query",
38+
"required": true,
39+
"type": "string",
40+
"description": "Implicit x-ms-parameter-location param"
41+
},
42+
"ClientLocationParam": {
43+
"name": "current_location_param",
44+
"in": "query",
45+
"required": true,
46+
"type": "string",
47+
"description": "client x-ms-parameter-location param",
48+
"x-ms-parameter-location": "client"
49+
},
50+
"MethodLocationParam1": {
51+
"name": "method_location_param_1",
52+
"in": "query",
53+
"required": true,
54+
"type": "string",
55+
"description": "method x-ms-parameter-location param 1",
56+
"x-ms-parameter-location": "method"
57+
},
58+
"MethodLocationParam2": {
59+
"name": "method_location_param_2",
60+
"in": "query",
61+
"required": true,
62+
"type": "string",
63+
"description": "method x-ms-parameter-location param 2",
64+
"x-ms-parameter-location": "method"
65+
}
66+
}
67+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"swagger": 2.0,
3+
"info": {
4+
"title": "required_parameter",
5+
"version": "1.0"
6+
},
7+
"host": "localhost:8000",
8+
"schemes": [ "http", "https" ],
9+
"paths": {
10+
"/api/Parameters": {
11+
"get": {
12+
"tag": [ "Parameters" ],
13+
"operationId": "Parameters_Get",
14+
"produces": [
15+
"text/plain"
16+
],
17+
"parameters": [
18+
{
19+
"$ref": "#/parameters/ImplicitLocationParam"
20+
},
21+
{
22+
"$ref": "#/parameters/MethodLocationParam1"
23+
},
24+
{
25+
"$ref": "#/parameters/ClientLocationParam"
26+
},
27+
{
28+
"$ref": "#/parameters/MethodLocationParam2"
29+
}
30+
]
31+
}
32+
}
33+
},
34+
"parameters": {
35+
"ImplicitLocationParam": {
36+
"name": "implicit_location_param",
37+
"in": "query",
38+
"required": true,
39+
"type": "string",
40+
"description": "Implicit x-ms-parameter-location param"
41+
},
42+
"ClientLocationParam": {
43+
"name": "current_location_param",
44+
"in": "query",
45+
"required": true,
46+
"type": "string",
47+
"description": "client x-ms-parameter-location param",
48+
"x-ms-parameter-location": "client"
49+
},
50+
"MethodLocationParam1": {
51+
"name": "method_location_param_1",
52+
"in": "query",
53+
"required": true,
54+
"type": "string",
55+
"description": "method x-ms-parameter-location param 1",
56+
"x-ms-parameter-location": "method"
57+
},
58+
"MethodLocationParam2": {
59+
"name": "method_location_param_2",
60+
"in": "query",
61+
"required": true,
62+
"type": "string",
63+
"description": "method x-ms-parameter-location param 2",
64+
"x-ms-parameter-location": "method"
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)