Skip to content

Commit

Permalink
fix(cli): correctly support AdditionalProperties during object parsin…
Browse files Browse the repository at this point in the history
…g. (#5457)

* correctly support AdditionalProperties; add eyw520 as api-importer codeowner.

* Update snapshots
  • Loading branch information
eyw520 authored Dec 20, 2024
1 parent d03d053 commit be0e322
Show file tree
Hide file tree
Showing 58 changed files with 368 additions and 1,434 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ generators/openapi/* @dsinghvi

# Specific rules for packages
packages/cli/* @amckinney
packages/cli/api-importers/* @eyw520
packages/generators/cli/* @dsinghvi
packages/generators/docker/* @dsinghvi
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: |
Correctly support AdditionalProperties on object schemas.
type: fix
irVersion: 53
version: 0.46.10

- changelogEntry:
- summary: |
SDK generation no longer hard-fails on single example generation errors.
Expand Down
60 changes: 12 additions & 48 deletions packages/cli/ete-tests/src/tests/fdr/__snapshots__/fdr.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ exports[`fdr > {"name":"changelog"} 1`] = `
"value": "type_director:Age"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_director:Age": {
Expand Down Expand Up @@ -172,10 +169,7 @@ exports[`fdr > {"name":"changelog"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:CreateMovieRequest": {
Expand Down Expand Up @@ -205,10 +199,7 @@ exports[`fdr > {"name":"changelog"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:DirectorWrapper": {
Expand All @@ -224,21 +215,15 @@ exports[`fdr > {"name":"changelog"} 1`] = `
"value": "type_director:Director"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:EmptyObject": {
"name": "EmptyObject",
"shape": {
"type": "object",
"extends": [],
"properties": [],
"extraProperties": {
"type": "unknown"
}
"properties": []
}
},
"type_imdb:Person": {
Expand Down Expand Up @@ -311,10 +296,7 @@ exports[`fdr > {"name":"changelog"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down Expand Up @@ -921,10 +903,7 @@ exports[`fdr > {"name":"simple"} 1`] = `
"value": "type_director:Age"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_director:Age": {
Expand Down Expand Up @@ -1019,10 +998,7 @@ exports[`fdr > {"name":"simple"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:CreateMovieRequest": {
Expand Down Expand Up @@ -1052,10 +1028,7 @@ exports[`fdr > {"name":"simple"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:DirectorWrapper": {
Expand All @@ -1071,21 +1044,15 @@ exports[`fdr > {"name":"simple"} 1`] = `
"value": "type_director:Director"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_imdb:EmptyObject": {
"name": "EmptyObject",
"shape": {
"type": "object",
"extends": [],
"properties": [],
"extraProperties": {
"type": "unknown"
}
"properties": []
}
},
"type_imdb:Person": {
Expand Down Expand Up @@ -1158,10 +1125,7 @@ exports[`fdr > {"name":"simple"} 1`] = `
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_:Child": {
Expand All @@ -48,10 +45,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_:Object": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_user:User": {
Expand All @@ -67,10 +64,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_folder-b/common:Foo": {
Expand All @@ -50,10 +47,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_folder-c/common:FolderCFoo": {
Expand All @@ -71,10 +65,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_folder-d/service:Response": {
Expand All @@ -92,10 +83,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_foo:ImportingType": {
Expand All @@ -111,10 +99,7 @@
"value": "type_commons:Imported"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_foo:OptionalString": {
Expand Down Expand Up @@ -159,10 +144,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
},
"availability": "Beta"
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_:RootType": {
Expand All @@ -37,10 +34,7 @@
}
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
},
"type_a:A": {
Expand All @@ -50,10 +44,7 @@
"extends": [
"type_:RootType"
],
"properties": [],
"extraProperties": {
"type": "unknown"
}
"properties": []
}
},
"type_ast:ContainerValue": {
Expand Down Expand Up @@ -120,10 +111,7 @@
"shape": {
"type": "object",
"extends": [],
"properties": [],
"extraProperties": {
"type": "unknown"
}
"properties": []
}
},
"type_ast:FieldName": {
Expand Down Expand Up @@ -207,10 +195,7 @@
"value": "type_ast:FieldValue"
}
}
],
"extraProperties": {
"type": "unknown"
}
]
}
}
},
Expand Down
Loading

0 comments on commit be0e322

Please sign in to comment.