openapi-typescript icon indicating copy to clipboard operation
openapi-typescript copied to clipboard

RFC: feat: support pattern properties

Open gzm0 opened this issue 1 year ago • 3 comments

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 avatar Sep 04 '24 11:09 gzm0

⚠️ 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

changeset-bot[bot] avatar Sep 04 '24 11:09 changeset-bot[bot]

@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 avatar Sep 04 '24 11:09 gzm0

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 avatar Sep 12 '24 13:09 drwpow

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!

drwpow avatar Nov 27 '24 23:11 drwpow