Skip to content

Commit

Permalink
Fix java test failure (#247)
Browse files Browse the repository at this point in the history
* Fixes test for java 21

* Adds higher java

* Changes to java 20

* Changes to docker convenience image

* Changes to docker convenience image, fix

* FIxes refs to nonexistant file

* Fix yaml file extension

* Comments out test

* Comments out test

* Changes docker image for java 20

* Updates docker image

* Adds maven docker image

* Reverts two files
  • Loading branch information
spacether committed Oct 4, 2023
1 parent 8aa9f56 commit 0624f33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public void launchCodeGenerator() {
// https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapijsonschematools/codegen/cmd/Generate.java
final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("myClientCodegen") // use this codegen library
.setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file
// .setInputSpec("https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server
.setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/sample_spec.yml") // sample OpenAPI file
// .setInputSpec("https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-generator/src/test/resources/2_0/sample_spec.yml") // or from the server
.setOutputDir("out/myClientCodegen"); // output directory

final ClientOptInput clientOptInput = configurator.toClientOptInput();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void testGetServerURLWithVariables() {

Server s9 = new Server().url("https://{user}.example.com/{version}").variables(
new ServerVariables().addServerVariable("version", new ServerVariable()._default("v1"))
.addServerVariable("user", new ServerVariable()._default("{user}")));
Assert.assertEquals(URLPathUtils.getServerURL(s9, null).toString(), "https://{user}.example.com/v1");
.addServerVariable("user", new ServerVariable()._default("%7Buser%7D")));
Assert.assertEquals(URLPathUtils.getServerURL(s9, null).toString(), "https://%7Buser%7D.example.com/v1");
}

private ServerVariables serverVariables(String... entries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void testRecursiveExampleValueWithCycle() throws Exception {

@Test(expectedExceptions = RuntimeException.class)
public void testSpecWithTooLowVersionThrowsException() {
final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/petstore.yaml");
final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/sample_spec.yml");
final PythonClientGenerator codegen = new PythonClientGenerator();
codegen.preprocessOpenAPI(openAPI);
}
Expand Down

0 comments on commit 0624f33

Please sign in to comment.