Skip to content

fix: Use Record<string, unknown> instead of {} notation when no properties are found - #1

Merged
fabfuel merged 5 commits into
fabfuel:developfrom
Traxmaxx:fix/use-record-for-obj
Sep 16, 2025
Merged

fix: Use Record<string, unknown> instead of {} notation when no properties are found#1
fabfuel merged 5 commits into
fabfuel:developfrom
Traxmaxx:fix/use-record-for-obj

Conversation

@Traxmaxx

@Traxmaxx Traxmaxx commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

I also tried to create an test-case for this scenario, but the current test suite fails in two instances with:

E                     items:
E                       description: Uniform Resource Name
E                       example: urn:pm:service::foobar/d9a6fc2e-a4b3-4fba-9f20-c5bd2fdb5071
E         -             pattern: ^urn:[\w-]+:[\w.-]*:[\w.-]*:[\w-]+\/[\w:-]+$
E         ?                                                            ^^^
E         +             pattern: ^urn:[\w-]+:[\w.-]*:[\w.-]*:[\w-]+\/[^\/]+$
E         ?                                                           + ^
E                       type: string

The pattern seems to expect /[\w:-]+$ but receives /[^\/]+$ in the regular expression 🤔
I wasn't sure if that is correct or if this test case is borked on my machine.

All of the above was addressed. PR is ready for review : )

}
{%- else -%}
Record<string, unknown>
{%- endif -%} No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

please add the trailing line-break

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Woops, I updated my Editor config to always make sure there is a new line. Thank you!

@fabfuel

fabfuel commented Sep 15, 2025

Copy link
Copy Markdown
Owner

Woohoo, 1st PR @Traxmaxx! Just this tiny line-break and we can merge 🙌

@fabfuel
fabfuel merged commit be31d70 into fabfuel:develop Sep 16, 2025
2 checks passed
@Traxmaxx
Traxmaxx deleted the fix/use-record-for-obj branch October 24, 2025 15:36
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.

2 participants