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

Bump zod-openapi from 2.12.0 to 2.13.0 #103

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 5, 2024

Bumps zod-openapi from 2.12.0 to 2.13.0.

Release notes

Sourced from zod-openapi's releases.

v2.13.0

What's Changed

New Features 🎉

  • Introduce same effectType by @​samchungy in samchungy/zod-openapi#217

    This library now has a new effectType when dealing with Zod Effects. In most scenarios, our users were using transform to sanitise or transform while ensuring the type did not change, however, this library could not handle this.

    The new same option allows this library to pick the input schema to produce a schema while ensuring that the input and output remain the same type.

    For example: when creating a response (output) schema for the following type this library cannot hook into the TypeScript compiler at runtime to understand that you wanted a string schema generated:

    z.string().transform((string) => string.toUpperCase());

    which meant that you had to declare the following in order to get it to work:

    z.string().transform((string) => string.toUpperCase()).openapi({ effectType: 'input' });
    // or
    z.string().transform((string) => string.toUpperCase()).pipe(z.string());

    However, in the first example this could be dangerous if a user was to change the transform to no longer be the same type:

    z.string().transform((string) => string.length).openapi({ effectType: 'input' });

    The new same type allows us to avoid this mistake:

     z.string().transform((string) => string.toUpperCase()).openapi({ effectType: 'same' });
    // Type '"same"' is not assignable to type 'CreationType | undefined'. ts(2322)
     z.string().transform((string) => string.length).openapi({ effectType: 'same' });

  • Refactor Effect Handling by @​samchungy in samchungy/zod-openapi#211, samchungy/zod-openapi#214

    This library now validates that effects used within registered Lazy schemas are not included in both input and output schemas. This could possibly be a breaking change if you were accidentally doing this.

    This library should also provide clearer errors when using Zod Effects with registered components which should make it easier to make dealing with effects more pleasant.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [zod-openapi](https://github.com/samchungy/zod-openapi) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/samchungy/zod-openapi/releases)
- [Commits](samchungy/zod-openapi@v2.12.0...v2.13.0)

---
updated-dependencies:
- dependency-name: zod-openapi
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 5, 2024
@samchungy samchungy merged commit 512b457 into master Feb 20, 2024
1 check passed
@samchungy samchungy deleted the dependabot/npm_and_yarn/zod-openapi-2.13.0 branch February 20, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant