Skip to content

Commit 5ffe2f6

Browse files
committed
add 3.2 test files
1 parent 138d434 commit 5ffe2f6

File tree

20 files changed

+357
-0
lines changed

20 files changed

+357
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
items:
22
- inputs/openapi30.yaml
33
- inputs/openapi31.yaml
4+
- inputs/openapi32.yaml
45
- inputs/mapping.yaml
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
openapi: 3.2.0
2+
info:
3+
title: test endpoint http method mapping
4+
version: 1.0.0
5+
paths:
6+
/endpoint:
7+
delete:
8+
tags:
9+
- endpoint
10+
responses:
11+
"204":
12+
description: empty
13+
get:
14+
tags:
15+
- endpoint
16+
responses:
17+
"204":
18+
description: empty
19+
head:
20+
tags:
21+
- endpoint
22+
responses:
23+
"204":
24+
description: empty
25+
options:
26+
tags:
27+
- endpoint
28+
responses:
29+
"204":
30+
description: empty
31+
patch:
32+
tags:
33+
- endpoint
34+
responses:
35+
"204":
36+
description: empty
37+
post:
38+
tags:
39+
- endpoint
40+
responses:
41+
"204":
42+
description: empty
43+
put:
44+
tags:
45+
- endpoint
46+
responses:
47+
"204":
48+
description: empty
49+
trace:
50+
tags:
51+
- endpoint
52+
responses:
53+
"204":
54+
description: empty
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
items:
22
- inputs/openapi30.yaml
33
- inputs/openapi31.yaml
4+
- inputs/openapi32.yaml
45
- inputs/mapping.yaml
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
openapi: 3.2.0
2+
info:
3+
title: test complex parameters
4+
version: 1.0.0
5+
paths:
6+
/endpoint-object:
7+
get:
8+
description: |-
9+
< should be mapped to a `Props` pojo
10+
/endpoint-object?prop1=foo&prop2=bar
11+
parameters:
12+
- name: props
13+
description: query parameter object
14+
in: query
15+
schema:
16+
$ref: "#/components/schemas/Props"
17+
responses:
18+
"204":
19+
description: empty
20+
/endpoint-map:
21+
get:
22+
description: < should be mapped to a `Map` (from mapping)
23+
parameters:
24+
- name: props
25+
description: query parameter object
26+
in: query
27+
schema:
28+
$ref: "#/components/schemas/Props"
29+
responses:
30+
"204":
31+
description: empty
32+
components:
33+
schemas:
34+
Props:
35+
type: object
36+
properties:
37+
prop1:
38+
type: string
39+
prop2:
40+
type: string
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
items:
22
- inputs/openapi30.yaml
33
- inputs/openapi31.yaml
4+
- inputs/openapi32.yaml
45
- inputs/mapping.yaml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
openapi: 3.2.0
2+
info:
3+
title: test enum parameters
4+
version: 1.0.0
5+
paths:
6+
/endpoint:
7+
get:
8+
tags:
9+
- enum
10+
parameters:
11+
- name: foo
12+
description: enum parameter
13+
in: query
14+
required: true
15+
schema:
16+
$ref: "#/components/schemas/Foo"
17+
responses:
18+
"204":
19+
description: empty
20+
components:
21+
schemas:
22+
Foo:
23+
type: string
24+
enum:
25+
- foo
26+
- foo-2
27+
- foo-foo
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
items:
22
- inputs/openapi30.yaml
33
- inputs/openapi31.yaml
4+
- inputs/openapi32.yaml
45
- inputs/mapping.yaml
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
openapi: 3.2.0
2+
info:
3+
title: Spring Page/Pageable API
4+
version: 1.0.0
5+
paths:
6+
/page:
7+
get:
8+
parameters:
9+
- in: query
10+
name: pageable
11+
required: false
12+
schema:
13+
$ref: "#/components/schemas/Pageable"
14+
responses:
15+
"200":
16+
description: none
17+
content:
18+
application/json:
19+
schema:
20+
$ref: "#/components/schemas/StringPage"
21+
/page-inline:
22+
get:
23+
parameters:
24+
- in: query
25+
name: pageable
26+
required: false
27+
schema:
28+
type: object
29+
properties:
30+
page:
31+
type: integer
32+
size:
33+
type: integer
34+
responses:
35+
"200":
36+
description: none
37+
content:
38+
application/json:
39+
schema:
40+
type: object
41+
allOf:
42+
- $ref: "#/components/schemas/Page"
43+
- $ref: "#/components/schemas/StringContent"
44+
components:
45+
schemas:
46+
Pageable:
47+
description: minimal Pageable query parameters
48+
type: object
49+
properties:
50+
page:
51+
type: integer
52+
size:
53+
type: integer
54+
Page:
55+
description: minimal Page response without content property
56+
type: object
57+
properties:
58+
number:
59+
type: integer
60+
size:
61+
type: integer
62+
StringContent:
63+
description: specific content List of the Page response
64+
type: object
65+
properties:
66+
content:
67+
type: array
68+
items:
69+
type: string
70+
StringPage:
71+
description: typed Page
72+
type: object
73+
allOf:
74+
- $ref: "#/components/schemas/Page"
75+
- $ref: "#/components/schemas/StringContent"

src/testInt/resources/tests/params-path-simple-data-types/inputs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ items:
22
- inputs/mapping.yaml
33
- inputs/openapi30.yaml
44
- inputs/openapi31.yaml
5+
- inputs/openapi32.yaml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
openapi: 3.2.0
2+
info:
3+
title: test simple path parameters
4+
version: 1.0.0
5+
paths:
6+
/endpoint/{foo}:
7+
get:
8+
tags:
9+
- endpoint
10+
parameters:
11+
- name: foo
12+
description: "path, required, string"
13+
in: path
14+
required: true
15+
schema:
16+
type: string
17+
responses:
18+
"204":
19+
description: empty

0 commit comments

Comments
 (0)