Skip to content

Commit

Permalink
Merge pull request #604 from benjamin-confino/434-openapi-attribute
Browse files Browse the repository at this point in the history
Update tests to check for openapi version 3.1.x
  • Loading branch information
MikeEdgar authored May 10, 2024
2 parents ce4b240 + 4b4513b commit 632268f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static WebArchive createDeployment() {
@Test(dataProvider = "formatProvider")
public void testVersion(String type) {
ValidatableResponse vr = callEndpoint(type);
vr.body("openapi", startsWith("3.0."));
vr.body("openapi", startsWith("3.1."));
}

@Test(dataProvider = "formatProvider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static WebArchive createDeployment() {
@Test(dataProvider = "formatProvider")
public void testVersion(String type) {
ValidatableResponse vr = callEndpoint(type);
vr.body("openapi", startsWith("3.0."));
vr.body("openapi", startsWith("3.1."));
}

@Test(dataProvider = "formatProvider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class OASConfigScanClassBase extends AppTestBase {
@Test(dataProvider = "formatProvider")
public void testScanClass(String type) throws InterruptedException {
vr = callEndpoint(type);
vr.body("openapi", startsWith("3.0."));
vr.body("openapi", startsWith("3.1."));
vr.body("paths", aMapWithSize(5));
vr.body("paths", hasKey("/reviews"));
vr.body("paths", hasKey("/reviews/{id}"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static WebArchive createDeployment() {
@Test(dataProvider = "formatProvider")
public void testScanDisable(String type) throws InterruptedException {
vr = callEndpoint(type);
vr.body("openapi", startsWith("3.0."));
vr.body("openapi", startsWith("3.1."));
vr.body("info", notNullValue());
vr.body("info.title", notNullValue());
vr.body("info.version", notNullValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void testDefaultResponseType() {
.assertThat()
.statusCode(200)
.and()
.body("openapi", startsWith("3.0."));
.body("openapi", startsWith("3.1."));
}

@Test(dataProvider = "formatProvider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static WebArchive createDeployment() {
public void testStaticDocument(String type) {
ValidatableResponse vr = callEndpoint(type);

vr.body("openapi", startsWith("3.0."));
vr.body("openapi", startsWith("3.1."));

vr.body("servers", hasSize(1));
vr.body("servers.find{ it.description == 'MySimpleAPI' }.url",
Expand Down
4 changes: 2 additions & 2 deletions tck/src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

openapi: 3.0.2
openapi: 3.1.0
info:
title: Callback Example
version: 1.0.0
Expand Down Expand Up @@ -73,4 +73,4 @@ paths:
'204':
description: |
Your server should return this HTTP status code if no longer interested
in further updates
in further updates
4 changes: 2 additions & 2 deletions tck/src/main/resources/simpleapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.2
openapi: 3.1.0
servers:
- description: MySimpleAPI
url: https:///MySimpleAPI/1.0.0
Expand Down Expand Up @@ -163,4 +163,4 @@ components:
type: string
examples:
- 408-867-5309
type: object
type: object

0 comments on commit 632268f

Please sign in to comment.