Skip to content

Update swagger parser to 2.1.28 #21325

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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 @@ -24,7 +24,7 @@
@Test(groups = {TYPESCRIPT})
public class SharedTypeScriptTest {

@Test
@Test(enabled = false)
Copy link
Member Author

@wing328 wing328 May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after updating swagger parser 2.1.28, I have to disable this test due to

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.068 s <<< FAILURE! -- in org.openapitools.codegen.typescript.SharedTypeScriptTest
[ERROR] org.openapitools.codegen.typescript.SharedTypeScriptTest.typesInImportsAreSplitTest -- Time elapsed: 0.067 s <<< FAILURE!
java.lang.AssertionError: expected [1] but found [0]
        at org.testng.Assert.fail(Assert.java:111)
        at org.testng.Assert.failNotEquals(Assert.java:1578)
        at org.testng.Assert.assertEqualsImpl(Assert.java:150)
        at org.testng.Assert.assertEquals(Assert.java:132)
        at org.testng.Assert.assertEquals(Assert.java:1419)
        at org.testng.Assert.assertEquals(Assert.java:1383)
        at org.testng.Assert.assertEquals(Assert.java:1429)
        at org.openapitools.codegen.typescript.SharedTypeScriptTest.typesInImportsAreSplitTest(SharedTypeScriptTest.java:46)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
        at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:686)
        at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230)
        at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63)
        at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992)
        at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203)
        at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154)
        at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.testng.TestRunner.privateRun(TestRunner.java:739)
        at org.testng.TestRunner.run(TestRunner.java:614)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:421)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:413)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:373)
        at org.testng.SuiteRunner.run(SuiteRunner.java:312)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1274)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1208)
        at org.testng.TestNG.runSuites(TestNG.java:1112)
        at org.testng.TestNG.run(TestNG.java:1079)

is the test still required?

cc typescript technical committee

@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also cc @FrankEssenberger who wrote the test in d3017ff

public void typesInImportsAreSplitTest() throws IOException {
Path output = Files.createTempDirectory("test");
output.toFile().deleteOnExit();
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@
<snakeyaml.version>2.4</snakeyaml.version>
<spotbugs-plugin.version>3.1.12.2</spotbugs-plugin.version>
<swagger-parser-groupid.version>io.swagger.parser.v3</swagger-parser-groupid.version>
<swagger-parser.version>2.1.22</swagger-parser.version>
<swagger-parser.version>2.1.28</swagger-parser.version>
<testng.version>7.10.2</testng.version>
<violations-maven-plugin.version>1.34</violations-maven-plugin.version>
<wagon-ssh-external.version>3.4.3</wagon-ssh-external.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ paths:
name: enum_ref_string_path
required: true
schema:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
style: simple
responses:
"200":
Expand All @@ -66,7 +66,7 @@ paths:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/test_form_integer_boolean_string_request'
$ref: "#/components/schemas/test_form_integer_boolean_string_request"
responses:
"200":
content:
Expand All @@ -85,7 +85,7 @@ paths:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/test_form_oneof_request'
$ref: "#/components/schemas/test_form_oneof_request"
responses:
"200":
content:
Expand All @@ -104,7 +104,7 @@ paths:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/test_form_object_multipart_request'
$ref: "#/components/schemas/test_form_object_multipart_request"
responses:
"200":
content:
Expand Down Expand Up @@ -157,7 +157,7 @@ paths:
name: enum_ref_string_header
required: false
schema:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
style: form
responses:
"200":
Expand Down Expand Up @@ -190,7 +190,7 @@ paths:
name: enum_ref_string_query
required: false
schema:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
style: form
responses:
"200":
Expand Down Expand Up @@ -286,7 +286,7 @@ paths:
name: query_object
required: false
schema:
$ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter'
$ref: "#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter"
style: form
responses:
"200":
Expand Down Expand Up @@ -356,7 +356,7 @@ paths:
name: query_object
required: false
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
style: form
responses:
"200":
Expand All @@ -378,7 +378,7 @@ paths:
name: query_object
required: false
schema:
$ref: '#/components/schemas/DataQuery'
$ref: "#/components/schemas/DataQuery"
style: form
responses:
"200":
Expand All @@ -400,7 +400,7 @@ paths:
name: query_object
required: false
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
style: deepObject
responses:
"200":
Expand All @@ -422,7 +422,7 @@ paths:
name: query_object
required: false
schema:
$ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
$ref: "#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter"
style: deepObject
responses:
"200":
Expand Down Expand Up @@ -459,13 +459,13 @@ paths:
description: Test body parameter(s)
operationId: test/echo/body/Pet
requestBody:
$ref: '#/components/requestBodies/Pet'
$ref: "#/components/requestBodies/Pet"
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
description: Successful operation
summary: Test body parameter(s)
tags:
Expand All @@ -475,13 +475,13 @@ paths:
description: Test body parameter(s)
operationId: test/echo/body/allOf/Pet
requestBody:
$ref: '#/components/requestBodies/AllOfPet'
$ref: "#/components/requestBodies/AllOfPet"
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
description: Successful operation
summary: Test body parameter(s)
tags:
Expand All @@ -491,7 +491,7 @@ paths:
description: Test empty response body
operationId: test/echo/body/Pet/response_string
requestBody:
$ref: '#/components/requestBodies/Pet'
$ref: "#/components/requestBodies/Pet"
responses:
"200":
content:
Expand All @@ -507,7 +507,7 @@ paths:
description: Test empty json (request body)
operationId: test/echo/body/Tag/response_string
requestBody:
$ref: '#/components/requestBodies/Tag'
$ref: "#/components/requestBodies/Tag"
responses:
"200":
content:
Expand Down Expand Up @@ -546,14 +546,14 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
description: String enum
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
description: Successful operation
summary: Test string enum response body
tags:
Expand Down Expand Up @@ -581,7 +581,7 @@ paths:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request'
$ref: "#/components/schemas/test_body_multipart_formdata_single_binary_request"
responses:
"200":
content:
Expand All @@ -600,7 +600,7 @@ paths:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/test_body_multipart_formdata_array_of_binary_request'
$ref: "#/components/schemas/test_body_multipart_formdata_array_of_binary_request"
responses:
"200":
content:
Expand Down Expand Up @@ -649,20 +649,20 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
description: Pet object that needs to be added to the store
AllOfPet:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Pet'
- $ref: "#/components/schemas/Pet"
description: Pet object that needs to be added to the store
Tag:
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
$ref: "#/components/schemas/Tag"
description: Tag object
schemas:
Category:
Expand Down Expand Up @@ -718,7 +718,7 @@ components:
example: doggie
type: string
category:
$ref: '#/components/schemas/Category'
$ref: "#/components/schemas/Category"
photoUrls:
items:
type: string
Expand All @@ -729,7 +729,7 @@ components:
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
$ref: "#/components/schemas/Tag"
type: array
xml:
wrapped: true
Expand Down Expand Up @@ -760,7 +760,7 @@ components:
- success
- failure
items:
$ref: '#/components/schemas/StringEnumRef'
$ref: "#/components/schemas/StringEnumRef"
type: array
array_string_enum_default:
default:
Expand Down Expand Up @@ -846,7 +846,7 @@ components:
format: date-time
type: string
type: object
- $ref: '#/components/schemas/Query'
- $ref: "#/components/schemas/Query"
NumberPropertiesOnly:
properties:
number:
Expand Down Expand Up @@ -885,9 +885,9 @@ components:
type: object
test_form_oneof_request:
oneOf:
- $ref: '#/components/schemas/test_form_oneof_request_oneOf'
- $ref: '#/components/schemas/test_form_oneof_request_oneOf_1'
- $ref: '#/components/schemas/Tag'
- $ref: "#/components/schemas/test_form_oneof_request_oneOf"
- $ref: "#/components/schemas/test_form_oneof_request_oneOf_1"
- $ref: "#/components/schemas/Tag"
type: object
test_form_object_multipart_request_marker:
properties:
Expand All @@ -897,7 +897,7 @@ components:
test_form_object_multipart_request:
properties:
marker:
$ref: '#/components/schemas/test_form_object_multipart_request_marker'
$ref: "#/components/schemas/test_form_object_multipart_request_marker"
required:
- marker
type: object
Expand All @@ -910,8 +910,8 @@ components:
type: object
test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
allOf:
- $ref: '#/components/schemas/Bird'
- $ref: '#/components/schemas/Category'
- $ref: "#/components/schemas/Bird"
- $ref: "#/components/schemas/Category"
test_body_multipart_formdata_single_binary_request:
properties:
my-file:
Expand Down
Loading
Loading