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

RFC: feat: support pattern properties #1901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Sep 4, 2024

Changes

Add support for patternProperties in addition to additionalProperties (#754).

How to Review

Overall approach so far only.

Checklist

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

@gzm0 gzm0 requested a review from a team as a code owner September 4, 2024 11:48
Copy link

changeset-bot bot commented Sep 4, 2024

⚠️ No Changeset found

Latest commit: 3a2f6ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gzm0
Copy link
Contributor Author

gzm0 commented Sep 4, 2024

@drwpow something like this is what I have been thinking. Of course it will not validate the regexes, but it will at least generate a union type that represents the schema.

@gzm0 gzm0 force-pushed the pattern-properties branch from 62de3ab to 3a2f6ba Compare September 4, 2024 11:49
@drwpow
Copy link
Contributor

drwpow commented Sep 12, 2024

Yeah this is a tricky one but I’m open to adding whatever support we can here. Better than simply ignoring it altogether. I’m in favor of this approach as it shouldn’t break backwards compatibility for most folks

@drwpow drwpow added the openapi-ts Relevant to the openapi-typescript library label Oct 26, 2024
@drwpow
Copy link
Contributor

drwpow commented Nov 27, 2024

Sorry—just realized I went a while without checking in on this. I’m happy with the direction of this PR, and we’ve discussed a lot of things outside of here 🙂. If we just add a couple tests for this I think this direction is good to ship!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openapi-ts Relevant to the openapi-typescript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants