openapi-typescript
openapi-typescript copied to clipboard
RFC: feat: support pattern properties
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:examplesrun (only applicable for openapi-typescript)
⚠️ No Changeset found
Latest commit: 3a2f6ba2f9f270c637ac7b6bdff2f7f989b9fbaa
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
@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.
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
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!