Skip to content

Commit

Permalink
fix(cli): unknown schemas dont need additional properties to be true (
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Dec 5, 2024
1 parent ddbb5ee commit 9f9b62e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions fern/pages/changelogs/cli/2024-12-05.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.45.3
**`(fix):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`.


Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,16 @@ export abstract class AbstractOpenAPIV3ParserContext implements SchemaParserCont
for (const key of keys) {
if (typeof resolvedSchema !== "object" || resolvedSchema == null) {
return {
"x-fern-type": "unknown",
additionalProperties: true
"x-fern-type": "unknown"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any as OpenAPIV3.SchemaObject;
}
resolvedSchema = resolvedSchema[key];
}
if (resolvedSchema == null) {
this.logger.warn(`Encountered undefined reference: ${schema.$ref}`);
return {
"x-fern-type": "unknown",
additionalProperties: true
"x-fern-type": "unknown"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any as OpenAPIV3.SchemaObject;
}
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
- changelogEntry:
- summary: |
Unknown schemas are no longer incorrectly marked as `additionalProperties: true`.
type: fix
irVersion: 53
version: 0.45.3

- changelogEntry:
- summary: |
Example generation now respects read-only schemas when generating request examples.
Expand Down

0 comments on commit 9f9b62e

Please sign in to comment.