Skip to content

Commit

Permalink
Update to support OpenAPI 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese committed Dec 1, 2023
1 parent 3f7e3ad commit 7ab7edf
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<openapi-generator-version>7.0.1</openapi-generator-version>
<openapi-generator-version>7.2.0-SNAPSHOT</openapi-generator-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.13.2</junit-version>
<testng.version>7.8.0</testng.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void testComponentExamples() throws IOException, ParseException {
TestUtils.assertFileExists(path);
// verify response body comes from components/examples
TestUtils.assertFileContains(path, "\"name\": \"Example request for Get User\"");
TestUtils.assertFileContains(path, "\"raw\": \"{\\n \\\"id\\\" : 777,\\n \\\"firstName\\\" : \\\"Alotta\\\",\\n \\\"lastName\\\" : \\\"Rotta\\\",\\n ");
TestUtils.assertFileContains(path, "\"raw\": \"{\\n \\\"id\\\": 777,\\n \\\"firstName\\\": \\\"Alotta\\\",\\n \\\"lastName\\\": \\\"Rotta\\\",\\n ");
}

@Test
Expand Down Expand Up @@ -457,7 +457,7 @@ public void testJsonExampleIncludingValueWithCommas() throws IOException, ParseE
Path path = Paths.get(output + "/postman.json");
TestUtils.assertFileExists(path);
// check value with commas within quotes
TestUtils.assertFileContains(path, "\\\"acceptHeader\\\" : \\\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\\\"");
TestUtils.assertFileContains(path, "\\\"acceptHeader\\\": \\\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\\\"");
}

@Test
Expand Down Expand Up @@ -505,7 +505,7 @@ public void testGeneratedVariables() throws IOException, ParseException {
Path path = Paths.get(output + "/postman.json");
TestUtils.assertFileExists(path);

TestUtils.assertFileContains(path, "\\\"createDate\\\" : \\\"{{$guid}}\\\"");
TestUtils.assertFileContains(path, "\\\"createDate\\\": \\\"{{$guid}}\\\"");

}

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/Basic.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.0
openapi: 3.1.0
info:
title: Basic
version: '1.0'
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/BasicJson.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi" : "3.0.0",
"openapi" : "3.1.0",
"info" : {
"contact" : {
"name" : "Beppe Catanese",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/BasicVariablesInExample.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.0
openapi: 3.1.0
info:
title: BasicExample
version: '1.0'
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/JsonWithCommasInJsonExample.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi" : "3.0.0",
"openapi" : "3.1.0",
"info" : {
"description" : "Sample API",
"title" : "Basic",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/MgmtApi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi" : "3.0.3",
"openapi" : "3.1.0",
"servers" : [
{
"url" : "https://management-test.adyen.com/v3"
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/SampleProject.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.0
openapi: 3.1.0
info:
title: Sample project
version: '1.0'
Expand Down Expand Up @@ -105,10 +105,10 @@ paths:
type: integer
examples:
a:
value: a
value: 1
summary: a summary
b:
value: b
value: 2
summary: b summary
name: userId
in: path
Expand Down

0 comments on commit 7ab7edf

Please sign in to comment.