-
-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathIssue3952.java
More file actions
63 lines (60 loc) · 1.92 KB
/
Copy pathIssue3952.java
File metadata and controls
63 lines (60 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package issues.i3952;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import io.jooby.openapi.OpenAPIResult;
import io.jooby.openapi.OpenAPITest;
import io.swagger.v3.oas.models.SpecVersion;
public class Issue3952 {
@OpenAPITest(value = App3952.class, version = SpecVersion.V31)
public void shouldParseNestedPath(OpenAPIResult result) {
assertThat(result.toYaml())
.isEqualToIgnoringNewLines(
"""
openapi: 3.1.0
info:
title: 3952 API
description: 3952 API description
version: "1.0"
paths:
/api/getThing:
post:
summary: Get a thing
operationId: getThing
parameters:
- name: x-api-key
in: header
description: API Key
required: true
schema:
type: string
- name: x-bool
in: header
description: Boolean key
schema:
type: boolean
- name: x-number
in: header
description: Number key
schema:
type: number
- name: x-integer
in: header
description: Int key
required: true
schema:
type: integer
format: int32
responses:
"200":
description: Success
content:
application/json:
schema:
type: string
""");
}
}