Skip to content

fix: do not omit patternProperties when properties is undefined#1203

Open
theAnuragMishra wants to merge 2 commits intoasyncapi:masterfrom
theAnuragMishra:patternproperties
Open

fix: do not omit patternProperties when properties is undefined#1203
theAnuragMishra wants to merge 2 commits intoasyncapi:masterfrom
theAnuragMishra:patternproperties

Conversation

@theAnuragMishra
Copy link

Description

Changes proposed in this pull request:

  • the current implementation of SchemaProperties component skips and returns null if properties is undefined which shows no patternProperties even if they are present
  • this pr converts properties and patternProperties to empty objects in case they are undefined. If there's nothing to show, Object.entries maps nothing and nothing is rendered which is desired.
  • this fixes the bug where patternProperties is omitted when properties is undefined.

Related issue(s)
closes #1197

@theAnuragMishra
Copy link
Author

@derberg can you pleaseee ehave a look? it's been so looong (the original pr was #1199 )

Copy link
Member

@AceTheCreator AceTheCreator left a comment

Choose a reason for hiding this comment

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

Left you a review :)

@theAnuragMishra
Copy link
Author

@AceTheCreator so you ignore the pr for a month, come and suggest a change to remove empty fragment possibility and then disappear again? If you don't like useful prs and are only interested in reviewing prs that shift a div from one place to the other, please feel free to close the pr. Don't keep someone hanging for so long for a pr that's not even 10 lines of change.

@AceTheCreator
Copy link
Member

@AceTheCreator so you ignore the pr for a month, come and suggest a change to remove empty fragment possibility and then disappear again? If you don't like useful prs and are only interested in reviewing prs that shift a div from one place to the other, please feel free to close the pr. Don't keep someone hanging for so long for a pr that's not even 10 lines of change.

Are you aware that your PR test failed? Please refrain from accusations like this moving forward. Thank you

@AceTheCreator
Copy link
Member

Also, there wasn’t a clear signal that your PR was ready for another review since the conversation hadn’t been resolved.

Please don’t place the blame on me, or any maintainer, for that. It’s important we follow the process so everyone stays aligned. At the end of the day, it’s open source; let’s keep it constructive and not take things personally.

@theAnuragMishra theAnuragMishra force-pushed the patternproperties branch 2 times, most recently from 67b0ad4 to cec886d Compare February 12, 2026 13:47
@theAnuragMishra
Copy link
Author

Ok sorry. The pr was up for tooo long so i crashed out. The failing check was related to formatting which I have fixed. I think everything should be as expected now. Please have a look.

@theAnuragMishra
Copy link
Author

@AceTheCreator

@sonarqubecloud
Copy link

Copy link
Member

@AceTheCreator AceTheCreator left a comment

Choose a reason for hiding this comment

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

One last review @theAnuragMishra. The potential issue I see with this current implementation is that if you only want to render when there's actual data, you might want to conditionally render each map individually.

@theAnuragMishra
Copy link
Author

conditionally render each map individually

so like, {properties.lenght > 0 && properties.map(...?
or are u suggesting two separate components for properties and patternProperties

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.

patternProperties is ignored when properties is absent

2 participants