OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO o.o.c.ignore.CodegenIgnoreProcessor - Output directory (/path/to/generated) does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: k6 (client)
[main] INFO o.o.codegen.DefaultGenerator - Generator 'k6' is considered beta.
[main] WARN o.o.codegen.DefaultCodegen - The value (generator's option) must be either boolean or string. Default to `false`.
Exception in thread "main" java.lang.NumberFormatException: For input string: "4XX"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at org.openapitools.codegen.languages.K6ClientCodegen.preprocessOpenAPI(K6ClientCodegen.java:322)
at org.openapitools.codegen.DefaultGenerator.configureGeneratorProperties(DefaultGenerator.java:251)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:864)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:440)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Bug Report Checklist
Description
When generating a k6 client from ann OpenAPI spec. If a response schema includes e.g.
4XX
the generator failsExpected: The generator properly handles
4XX
,5XX
, etc and properly genrates a clientTo reproduce:
Run the k6 generator
Ensure the response includes e.g.
4XX
in the response schema e.g.The k6 client code gen fails
openapi-generator version
OpenAPI declaration file content or url