Skip to content

Add schema to postTransform options #2049

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

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

duncanbeevers
Copy link
Contributor

Closes #2013

Changes

  • Add schema to postTransform options
  • Add documentation about postTransform options
  • Add specs / example using the schema option to declare a string Set

How to Review

  • Make sure TransformNodeOptions is extension is acceptable.
  • Decide whether schema should be populated for transform options; it's redundant since the first argument to transform is already the schema node, but it introduces consistency between the transform and postTrannsform APIs that I think might be desirable.

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript) (I tried this and got swamped with changes, please advise!)

@duncanbeevers duncanbeevers requested a review from a team as a code owner December 13, 2024 01:42
Copy link

changeset-bot bot commented Dec 13, 2024

🦋 Changeset detected

Latest commit: aba4e09

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

This PR includes changesets to release 2 packages
Name Type
openapi-typescript Patch
swr-openapi 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

@duncanbeevers duncanbeevers force-pushed the posttransform-options-schema branch from 9f5c655 to be8de00 Compare December 13, 2024 02:04
Copy link
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.

Great code, great docs, and great tests! I don’t have any feedback

@drwpow drwpow merged commit 39f9b2f into openapi-ts:main Jan 3, 2025
8 checks passed
This was referenced Jan 3, 2025
duncanbeevers added a commit to duncanbeevers/openapi-typescript that referenced this pull request Jan 3, 2025
* Add schema to postTransform options

Closes openapi-ts#2013

* fixup! Add schema to postTransform options

Closes openapi-ts#2013

* fixup! Add schema to postTransform options

Closes openapi-ts#2013

* fixup! Add schema to postTransform options
drwpow added a commit that referenced this pull request Jan 4, 2025
* Add schema to postTransform options (#2049)

* Add schema to postTransform options

Closes #2013

* fixup! Add schema to postTransform options

Closes #2013

* fixup! Add schema to postTransform options

Closes #2013

* fixup! Add schema to postTransform options

* Add Netlify badge (#2065)

* Only check GitHub token for docs build when update needed

* Add Netlify badge

* Use link

* [ci] release (#2084)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix issue templates (#2088)

* Add feat issues to projects (#2090)

* Use const arrays for OpenAPI enum types

Preserve capitalization of named, exported enum values.
Type exported const values as const, instead of their location within the operations or components schemas.
Derive and export types for enum values from concrete values in const arrays.
Use derived enum value types in operations and components schemas.
Use non-conflicting variable names for composed OpenAPI enums (anyOf: [enum1, enum2])

* Export type-predicates along when enumValues is true

---------

Co-authored-by: Drew Powers <[email protected]>
Co-authored-by: openapi-ts-bot <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@duncanbeevers duncanbeevers deleted the posttransform-options-schema branch January 7, 2025 03:12
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.

postTransform would be more useful with schema information
2 participants