Skip to content

Commit

Permalink
Payload schema, including content type and allowEmpty. This provides …
Browse files Browse the repository at this point in the history
…basic format awareness.
  • Loading branch information
slinkydeveloper committed Mar 12, 2024
1 parent 433d446 commit 2a008a6
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions deployment_manifest_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
"type": "string",
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9_]*$"
},
"inputSchema": {},
"outputSchema": {}
"input": {
"$ref": "#/$defs/Payload"
},
"output": {
"$ref": "#/$defs/Payload"
}
},
"required": [ "name" ],
"additionalProperties": false
Expand All @@ -55,5 +59,26 @@
}
},
"required": [ "minProtocolVersion", "maxProtocolVersion", "components" ],
"additionalProperties": false
"additionalProperties": false,
"$defs": {
"Payload": {
"type": "object",
"title": "Payload",
"description": "Description of a payload. Both 'contentType' and 'jsonSchema' are optional. If none are provided, it is assumed that the payload can be either empty or any JSON.",
"properties": {
"contentType": {
"type": "string"
},
"allowEmpty": {
"type": "boolean"
},
"jsonSchema": {}
},
"default": {
"contentType": "application/json",
"allowEmpty": true
},
"additionalProperties": false
}
}
}

0 comments on commit 2a008a6

Please sign in to comment.