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

Render attribute names for nested objected attributes correctly #357

Merged
merged 5 commits into from Apr 18, 2024

Conversation

SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Apr 17, 2024

Closes: #356

PR #350 introduced a new pathTitle field to the nestedType struct to fix a bug where incorrect attribute titles were being generated for nested attributes. The pathTitle field was not being populated in the writeObjectAttribute() function, which caused the documentation generation to render an empty string for nested object attribute titles. This PR correctly populates the pathTitle field and adds more extensive unit and acceptance test cases with various framework types for proper test coverage.

@SBGoods SBGoods requested a review from a team as a code owner April 17, 2024 21:32
@SBGoods SBGoods added command/generate bug Something isn't working labels Apr 17, 2024
@SBGoods SBGoods added this to the v0.19.1 milestone Apr 17, 2024
Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Excellent fix and additional testing, @SBGoods! Looks good to me 🚀

Comment on lines +111 to +126
<a id="nestedblock--single_nested_block_sensitive_nested_attribute"></a>
### Nested Schema for `single_nested_block_sensitive_nested_attribute`

Optional:

- `single_nested_block_attribute` (String) example single nested block attribute
- `single_nested_block_sensitive_attribute` (String, Sensitive) example sensitive single nested block attribute


<a id="nestedblock--set_nested_block_sensitive_nested_attribute"></a>
### Nested Schema for `set_nested_block_sensitive_nested_attribute`

Read-Only:

- `set_nested_block_attribute` (String) example set nested block attribute
- `set_nested_block_sensitive_attribute` (String, Sensitive) example sensitive set nested block attribute
Copy link
Member

Choose a reason for hiding this comment

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

Non-blocking: I do find it curious how these become un-alphabetically ordered. 🤔 Certainly not for this PR, but it might be nice to see if we can fix that at some point for practitioners who might scroll instead of clicking the link. 👍

@SBGoods SBGoods merged commit c8e5e1f into main Apr 18, 2024
6 checks passed
@SBGoods SBGoods deleted the SBGoods/nested-object-attribute-title-fix branch April 18, 2024 15:08
@sebhoss
Copy link
Contributor

sebhoss commented Apr 23, 2024

argh sorry @SBGoods - missed that in my initial PR. Thanks for fixing this ❤️

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working command/generate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested schema is omitted in v0.19.0
3 participants