We have added support for a new JSON Object type in all our SDKs.
Details
Previously, we were treating all object types as any types in the SDK. Now, a CodeGen setting enableJsonPassThroughForAny
is introduced that allows types to be either Any
or JsonObject
.
If the schema is defined in the following form, it will be treated as Any
type in the SDKs.
"schemas":{
"Any":{
}
}
Any
types take following equivalent types in the SDKs.
Language | Type |
---|---|
Java | JsonValue |
C# | JsonValue |
TypeScript | unknown |
PHP | mixed |
Python | object |
Ruby | Object |
If the schema is defined in the following form, it will be treated as JSONObject
type in the SDKs.
"schemas":{
"JsonObject":{
"type":"object"
}
}
JSON Object
types take following equivalent types in the SDKs.
Language | Type |
---|---|
Java | JsonObject |
C# | JsonObject |
TypeScript | Record<string, unknown> |
PHP | mixed |
Python | dict |
Ruby | Hash |