-
-
Notifications
You must be signed in to change notification settings - Fork 531
Fixed openapi 3 spec to default additionalProperties to true #585
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
Reasoning makes sense! All on board for generating types that follow the spec. This looks great! |
@@ -26,6 +26,7 @@ describe("transformPathsObj", () => { | |||
schema: { | |||
type: "object", | |||
properties: { title: { type: "string" }, body: { type: "string" } }, | |||
additionalProperties: false, |
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.
Came here to check if you had an additionalProperties: false
test, and you did! Great work 🙂
Codecov Report
@@ Coverage Diff @@
## main #585 +/- ##
==========================================
+ Coverage 88.53% 89.61% +1.07%
==========================================
Files 9 9
Lines 349 366 +17
Branches 123 134 +11
==========================================
+ Hits 309 328 +19
- Misses 37 38 +1
+ Partials 3 0 -3
Continue to review full report at Codecov.
|
Ah I forgot to run the linter, let me do that to fix this test. |
Signed-off-by: Micah Halter <[email protected]>
@drwpow updated the commit with linted code |
@all-contributors please add @mehalter for code, test, bug |
I've put up a pull request to add @mehalter! 🎉 |
Released in |
@mehalter, @drwpow, By the way with {
"pictures": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer"
},
{
"$ref": "#/components/schemas/ItemsArtworksPictures"
}
]
}
}
} {
pictures?: ((number | components["schemas"]["ItemsArtworksPictures"]) & {
[key: string]: any;
})[];
} |
Due to feedback, we’re going to revert this behavior in |
Resolves #583 . Let me know if this seems correct or if you have any comments/critiques!
Signed-off-by: Micah Halter [email protected]