andygunther | 2017-06-07 18:50:01 UTC | #1
Working on a custom DB query action, which needs to return a list of DB fields. Can I use a response schema like this to just return a string[] ?
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Default User Action Schema", "description": "Default schema for a user action.", "type": "object", "properties": { "PostForDNISLookupResult": { "type": "array", "description": "Database Fields" } }, "additionalProperties": true }
tim.smith | 2017-06-12 13:53:18 UTC | #2
This is the schema you're looking for. The items property defines the type of the things in the array.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Default User Action Schema",
"description": "Default schema for a user action.",
"type": "object",
"properties": {
"ThisIsAnArray": {
"type": "array",
"description": "This is an array",
"items": {
"type": "string"
}
}
},
"additionalProperties": true
}
system | 2017-07-13 13:53:29 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: 1381