Skip to content

Commit 632268f

Browse files
authored
Merge pull request #604 from benjamin-confino/434-openapi-attribute
Update tests to check for openapi version 3.1.x
2 parents ce4b240 + 4b4513b commit 632268f

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

tck/src/main/java/org/eclipse/microprofile/openapi/tck/AirlinesAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static WebArchive createDeployment() {
6161
@Test(dataProvider = "formatProvider")
6262
public void testVersion(String type) {
6363
ValidatableResponse vr = callEndpoint(type);
64-
vr.body("openapi", startsWith("3.0."));
64+
vr.body("openapi", startsWith("3.1."));
6565
}
6666

6767
@Test(dataProvider = "formatProvider")

tck/src/main/java/org/eclipse/microprofile/openapi/tck/ModelReaderAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static WebArchive createDeployment() {
5555
@Test(dataProvider = "formatProvider")
5656
public void testVersion(String type) {
5757
ValidatableResponse vr = callEndpoint(type);
58-
vr.body("openapi", startsWith("3.0."));
58+
vr.body("openapi", startsWith("3.1."));
5959
}
6060

6161
@Test(dataProvider = "formatProvider")

tck/src/main/java/org/eclipse/microprofile/openapi/tck/OASConfigScanClassBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class OASConfigScanClassBase extends AppTestBase {
3333
@Test(dataProvider = "formatProvider")
3434
public void testScanClass(String type) throws InterruptedException {
3535
vr = callEndpoint(type);
36-
vr.body("openapi", startsWith("3.0."));
36+
vr.body("openapi", startsWith("3.1."));
3737
vr.body("paths", aMapWithSize(5));
3838
vr.body("paths", hasKey("/reviews"));
3939
vr.body("paths", hasKey("/reviews/{id}"));

tck/src/main/java/org/eclipse/microprofile/openapi/tck/OASConfigScanDisableTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static WebArchive createDeployment() {
4040
@Test(dataProvider = "formatProvider")
4141
public void testScanDisable(String type) throws InterruptedException {
4242
vr = callEndpoint(type);
43-
vr.body("openapi", startsWith("3.0."));
43+
vr.body("openapi", startsWith("3.1."));
4444
vr.body("info", notNullValue());
4545
vr.body("info.title", notNullValue());
4646
vr.body("info.version", notNullValue());

tck/src/main/java/org/eclipse/microprofile/openapi/tck/PetStoreAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public void testDefaultResponseType() {
194194
.assertThat()
195195
.statusCode(200)
196196
.and()
197-
.body("openapi", startsWith("3.0."));
197+
.body("openapi", startsWith("3.1."));
198198
}
199199

200200
@Test(dataProvider = "formatProvider")

tck/src/main/java/org/eclipse/microprofile/openapi/tck/StaticDocumentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static WebArchive createDeployment() {
4747
public void testStaticDocument(String type) {
4848
ValidatableResponse vr = callEndpoint(type);
4949

50-
vr.body("openapi", startsWith("3.0."));
50+
vr.body("openapi", startsWith("3.1."));
5151

5252
vr.body("servers", hasSize(1));
5353
vr.body("servers.find{ it.description == 'MySimpleAPI' }.url",

tck/src/main/resources/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
openapi: 3.0.2
15+
openapi: 3.1.0
1616
info:
1717
title: Callback Example
1818
version: 1.0.0
@@ -73,4 +73,4 @@ paths:
7373
'204':
7474
description: |
7575
Your server should return this HTTP status code if no longer interested
76-
in further updates
76+
in further updates

tck/src/main/resources/simpleapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.0.2
1+
openapi: 3.1.0
22
servers:
33
- description: MySimpleAPI
44
url: https:///MySimpleAPI/1.0.0
@@ -163,4 +163,4 @@ components:
163163
type: string
164164
examples:
165165
- 408-867-5309
166-
type: object
166+
type: object

0 commit comments

Comments
 (0)