Skip to content

Conversation

@singhpk234
Copy link
Contributor

@singhpk234 singhpk234 commented Oct 12, 2025

What changes were proposed in this pull request?

Fix for python client generation for regtests

Why are the changes needed?

unable to build client without this change, this force the open-api generator to a version which ignores example empty

getting this error Exception: Cannot invoke "io.swagger.v3.oas.models.examples.Example.getValue()" because the return value of "java.util.Map.get(Object)" is null at 


org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1605) at org.openapitools.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:1473) at org.openapitools.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:675) at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1295) at org.openapitools.codegen.cmd.Generate.execute(Generate.java:535) at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32) at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66) Caused by: java.lang.NullPointerException: Cannot invoke "io.swagger.v3.oas.models.examples.Example.getValue()" because the return value of "java.util.Map.get(Object)" is null at org.openapitools.codegen.utils.ExamplesUtils.unaliasExamples(ExamplesUtils.java:75) at org.openapitools.codegen.DefaultCodegen.unaliasExamples(DefaultCodegen.java:2362) at org.openapitools.codegen.DefaultCodegen.fromResponse(DefaultCodegen.java:5036) at org.openapitools.codegen.DefaultCodegen.fromOperation(DefaultCodegen.java:4693) at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1573)

Does this PR introduce any user-facing change?

No

How was this patch tested?

Error above is gone

CHANGELOG.md

May be not

flyrain
flyrain previously approved these changes Oct 12, 2025
Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

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

Thanks @singhpk234 for the fix.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Oct 12, 2025
# generate the management api client
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.9.0 generate \
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could delete this part, now the python client will auto-generate all the client using the latest spec file upon build, so we do not need to run these manually anymore : )

Copy link
Contributor

@MonkeyCanCode MonkeyCanCode Oct 13, 2025

Choose a reason for hiding this comment

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

Yes. this happened with 7.13 (first breaking version as it needs 3.1.1). In this PR #2800, I bumped it to the latest working version. When running regtests via make, this will be done automatically (as part of polaris package install/build)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants