Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html2] added recursion for nested objects #12428

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

0x7162
Copy link
Contributor

@0x7162 0x7162 commented May 22, 2022

Added recursive check for the references ($ref)
Now we should support nested objects.

[x ] Read the contribution guidelines.
[ x] 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.
[ x] 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.
[x ] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

To fix #9923

@0x7162
Copy link
Contributor Author

0x7162 commented May 24, 2022

as the code is in JS (though for documentation generation)(html2)

@CodeNinjai @frol @cliffano

@wing328 wing328 added Doc: HTML Generation of HTML documentation Enhancement: General labels Jun 6, 2022
@wing328 wing328 added this to the 6.0.1 milestone Jun 6, 2022
@wing328
Copy link
Member

wing328 commented Jun 6, 2022

@0x7162 thanks for the PR. Let's give it a try.

@wing328 wing328 merged commit c4db27f into OpenAPITools:master Jun 6, 2022
@wing328 wing328 changed the title Fixes #9923 - added recursion for nested objects [html2] added recursion for nested objects Jun 6, 2022
@wing328
Copy link
Member

wing328 commented Jun 6, 2022

FYI. samples updated via 0296380

Object.keys(schema.properties).forEach( (item) => {
if (schema.properties[item].$ref != null) {
schema.properties[item] = defsParser.$refs.get(schema.properties[item].$ref);
}
Copy link

Choose a reason for hiding this comment

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

@wing328 The forEach-Loop is never closed (missing });). I opened this issue #12842

Copy link
Member

Choose a reason for hiding this comment

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

@kas1337 thanks for catching the issue. Can you please file a PR with the suggested fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc: HTML Generation of HTML documentation Enhancement: General
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML2 generator outputs "undefined" DTOs
3 participants