-
-
Notifications
You must be signed in to change notification settings - Fork 247
feat: implement OpenAPI 3.1 patternProperties
feature
#2523
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
Conversation
|
🦋 Changeset detectedLatest commit: 666ccc5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2523 +/- ##
==========================================
+ Coverage 23.83% 24.00% +0.17%
==========================================
Files 357 359 +2
Lines 35416 35540 +124
Branches 1499 1540 +41
==========================================
+ Hits 8442 8533 +91
- Misses 26962 26994 +32
- Partials 12 13 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
}); | ||
} | ||
|
||
if (schema.patternProperties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to comment on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's only in object then it's useless, i'll just delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works great in latest version, thank you @carson2222 @mrlubos ! Is it expected to get
|
Yes it's expected. If you want to allow only the type you specify in patternProperty, set "data":
{
"description": "Includes dates for the future so that if a frequency is changed, it does not affect past habits",
"type": "object",
"patternProperties":
{
"^(?:(?!0000)\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8])))$|^(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29$":
{ "$ref": "#/components/schemas/HabitDataRecord" },
},
"additionalProperties": false,
}, |
closes #2512