Skip to content

Commit 6621033

Browse files
author
Konrad Jamrozik
committed
ongoing
1 parent e9c9600 commit 6621033

File tree

3 files changed

+149
-0
lines changed

3 files changed

+149
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
</PropertyGroup>
1010

1111

12+
<ItemGroup>
13+
<None Remove="Resource\Swagger\new\enum_as_string.json" />
14+
<None Remove="Resource\Swagger\new\parameter_order_change_global.json" />
15+
<None Remove="Resource\Swagger\old\enum_as_string.json" />
16+
<None Remove="Resource\Swagger\old\parameter_order_change_global.json" />
17+
</ItemGroup>
1218

1319
<ItemGroup>
1420
<Content Include="Resource\Swagger\new\added_path.json" />
@@ -24,6 +30,9 @@
2430
<Content Include="Resource\Swagger\new\operation_check_03.json" />
2531
<Content Include="Resource\Swagger\new\operation_check_04.json" />
2632
<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>
2736
<Content Include="Resource\Swagger\new\param_check_01.json" />
2837
<Content Include="Resource\Swagger\new\removed_definition.json" />
2938
<Content Include="Resource\Swagger\new\removed_operation.json" />
@@ -50,6 +59,12 @@
5059
<Content Include="Resource\Swagger\new\version_check_04.json" />
5160
<Content Include="Resource\Swagger\old\added_readonly_required_property.json" />
5261
<Content Include="Resource\Swagger\old\added_required_property.json" />
62+
<Content Include="Resource\Swagger\old\added_required_property.json">
63+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
64+
</Content>
65+
<Content Include="Resource\Swagger\old\parameter_order_change_global.json">
66+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
67+
</Content>
5368
<Content Include="Resource\Swagger\old\recursive_model.json" />
5469
<Content Include="Resource\Swagger\old\changed_operation_id.json" />
5570
<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)