Skip to content

Conversation

@DavidGrath
Copy link
Contributor

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@martin-mfg , please help review for Java

@DavidGrath
Copy link
Contributor Author

I'll ignore that failure on Circle CI node1 from now on

@DavidGrath
Copy link
Contributor Author

@martin-mfg , thank you for the approval. I checked and CI failed the last 2 times because of a HTTP 503 while the machine was fetching packages. Should I bother making another trigger commit?

@martin-mfg
Copy link
Contributor

martin-mfg commented May 17, 2025

Should I bother making another trigger commit?

@DavidGrath No, I think that's not necessary. I reran the pipelines here and everything is green. Just give the project maintainer a bit more time to merge your PR. :)

However, you could change the PR title to something more meaningful.

@DavidGrath DavidGrath changed the title Fix Issue #20139 Correct generation of additionalProperties Map for numerous Java libraries (issue #20139) May 18, 2025
@DavidGrath
Copy link
Contributor Author

@wing328 @martin-mfg , sorry for the ping, but I think this might've been overlooked

@DavidGrath
Copy link
Contributor Author

@wing328 @martin-mfg , please help review again

// an object or anyType composed schema that has additionalProperties set
addAdditionPropertiesToCodeGenModel(m, schema);
} else if(!ModelUtils.isDisallowAdditionalPropertiesIfNotPresent()) {
addAdditionPropertiesToCodeGenModel(m, schema);
Copy link
Member

Choose a reason for hiding this comment

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

Hi @DavidGrath thanks again for the PR.

My first question is it looks to me the if block is checking the schema type but your additional is not checking scheme type but rather an option (disallowAdditionalPropertiesIfNotPresent) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wing328 , yes, that is correct, my reasoning being that the property wasn't already considered in the if block already, so addAdditionPropertiesToCodeGenModel wouldn't have been called at all if it was false

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.

3 participants