freman | 2020-06-15 08:57:09 UTC | #1
Hi
Trying to create a data table via the API and I'm running into an inconsistency between documentation (and generated SDK code) and what the server is expecting
JsonSchemaDocument documents as additionalProperties (object, optional)
However, when I omit it I get
"The schema is required to have an 'additionalProperties':false at its root level"
When I specify it as a null item (which is the only option available to me via the generated SDK code) I get
"{} is not one of [False]\n\nFailed validating 'enum' in schema['properties']['additionalProperties']:\n {'description': \"The root document value for 'additionalProperties'. \"\n 'At the root level, if it '\n \"exists it must be 'false'\",\n 'enum': [False]}\n\nOn instance['additionalProperties']:\n {}",
It appears this is neither an object or optional.
For the record I'm using the otherwise unloved go sdk, I could be convinced to put some time into that if you take MRs.
Edit: Incidentally this fails to unmarshal in go to because the go library is expecting map[string]interface{} and it gets bool(false)
tim.smith | 2020-06-15 19:45:13 UTC | #2
This is what it's looking for:
However, that's going to be an issue with the SDK because additionalProperties is an object, not a boolean. The SDKs are generated from the same swagger definition as the API docs, which is why they are consistent with each other, but inconsistent with the actual behavior of the API. Please open a case with Genesys Cloud Care to report the invalid contract in the API documentation and SDKs. Once the issue is fixed upstream, the documentation and SDKs will reflect the change.
system | 2020-07-16 19:45:17 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 8018