chore: better JSON Schema (#1968)

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2023-09-13 20:59:21 +02:00 committed by GitHub
parent 68f357561b
commit 4cbba4a8de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,7 @@ type Function struct {
// Invoke defines hints for use when invoking this function.
// See Client.Invoke for usage.
Invoke string `yaml:"invoke,omitempty"`
Invoke string `yaml:"invoke,omitempty" jsonschema:"enum=http,enum=cloudevent"`
// Build defines the build properties for a function
Build BuildSpec `yaml:"build,omitempty"`

View File

@ -164,6 +164,10 @@
"format": "date-time"
},
"invoke": {
"enum": [
"http",
"cloudevent"
],
"type": "string",
"description": "Invoke defines hints for use when invoking this function.\nSee Client.Invoke for usage."
},