Skip to content

fix(openapi-typescript): prevent type error when items is boolean#2260

Merged
drwpow merged 4 commits intoopenapi-ts:mainfrom
zrosenbauer:bug/type-error-items-boolean
May 5, 2025
Merged

fix(openapi-typescript): prevent type error when items is boolean#2260
drwpow merged 4 commits intoopenapi-ts:mainfrom
zrosenbauer:bug/type-error-items-boolean

Conversation

@zrosenbauer
Copy link
Copy Markdown
Contributor

Changes

Prevents a TypeError due to a bad in operator for type: "array".

Example: https://json-schema.org/understanding-json-schema/reference/array

How to Review

Take it as it is :)

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@zrosenbauer zrosenbauer requested a review from a team as a code owner April 22, 2025 20:24
@zrosenbauer zrosenbauer requested a review from kerwanp April 22, 2025 20:24
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2025

Deploy Preview for openapi-ts failed.

Name Link
🔨 Latest commit b3e9c5d
🔍 Latest deploy log https://app.netlify.com/projects/openapi-ts/deploys/6807fb052ebc3a0008d7dc56

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 22, 2025

🦋 Changeset detected

Latest commit: bbf89d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-typescript Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zrosenbauer
Copy link
Copy Markdown
Contributor Author

@kerwanp I'm not sure if I need to add a changeset or not, I only saw a handful currently there so I'm assuming it's either new or not used.

Please let me know, happy to add one if needed

Copy link
Copy Markdown
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

This looks great! Please just add a patch changeset (see comment) so we can credit you for this fix, and also push a release after merge.

Comment thread packages/openapi-typescript/src/transform/schema-object.ts
@drwpow drwpow self-assigned this May 3, 2025
@zrosenbauer
Copy link
Copy Markdown
Contributor Author

This looks great! Please just add a patch changeset (see comment) so we can credit you for this fix, and also push a release after merge.

done!

Copy link
Copy Markdown
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@drwpow drwpow merged commit 7205e12 into openapi-ts:main May 5, 2025
7 checks passed
@openapi-ts-bot openapi-ts-bot mentioned this pull request May 5, 2025
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