Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to check for openapi version 3.1.x #604

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading