Skip to content

Better inline schema naming for double byte characters - #16035

Merged
wing328 merged 3 commits into
masterfrom
better-inline-naming
Jul 10, 2023
Merged

wing328 merged 3 commits into
masterfrom
better-inline-naming

Conversation

@wing328

@wing328 wing328 commented Jul 8, 2023

Copy link
Copy Markdown
Member

Better inline schema naming for double byte characters (e.g Chinese, Japanese, Korean)

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 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    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*.
    For Windows users, please run the script in Git BASH.
  • In case you are adding a new generator, run the following additional script :
    ./bin/utils/ensure-up-to-date
    
    Commit all changed files.
  • File the PR against the correct branch: master (6.3.0) (minor release - breaking changes with fallbacks), 7.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.

cc @OpenAPITools/generator-core-team

@wing328 wing328 mentioned this pull request Jul 8, 2023
4 of 6 tasks
@wing328 wing328 added Enhancement: General Inline Schema Handling Schema contains a complex schema in items/additionalProperties/allOf/oneOf/anyOf labels Jul 8, 2023

@y-chan y-chan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!
This approach is good because the changes are few and use existing functions!

By the way, is it a specification that a new "allOf" model consisting of only one element is generated?
This is probably bad from a maintainability point of view.
If this is a specification, I will create an Issue/PR that will not create an "allOf" model consisting of only one element, but will change it to reference an existing model.

@wing328
wing328 merged commit 94d76ff into master Jul 10, 2023
@wing328
wing328 deleted the better-inline-naming branch July 10, 2023 01:39
@wing328

wing328 commented Jul 10, 2023 •

Copy link
Copy Markdown
Member Author

By the way, is it a specification that a new "allOf" model consisting of only one element is generated?

can you please try the latest master? I think we already handle such case

@y-chan

y-chan commented Jul 10, 2023 •

Copy link
Copy Markdown

can you please try the latest master?

Yes, I tried the latest master.
But, new model was generated like the picture below. (AccentPhrasePauseMora class == Mora class)

image

Should I create an issue?

@wing328

wing328 commented Jul 10, 2023

Copy link
Copy Markdown
Member Author

yes please open an issue with a spec to easily reproduce the issue.

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

Labels

Enhancement: General Inline Schema Handling Schema contains a complex schema in items/additionalProperties/allOf/oneOf/anyOf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants