src: fix `func.yaml` schema (#805)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
This commit is contained in:
Zbynek Roubalik 2022-02-02 03:05:32 +01:00 committed by GitHub
parent fff00497f8
commit 1f54bdcb1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,7 @@ type Function struct {
// Version at which this function is known to be compatible.
// More specifically, it is the highest migration which has been applied.
// For details see the .Migrated() and .Migrate() methods.
Version string // semver format
Version string `yaml:"version"` // semver format
// Root on disk at which to find/create source and config files.
Root string `yaml:"-"`
@ -40,7 +40,7 @@ type Function struct {
// Registry at which to store interstitial containers, in the form
// [registry]/[user].
Registry string
Registry string `yaml:"registry"`
// Optional full OCI image tag in form:
// [registry]/[namespace]/[name]:[tag]
@ -99,7 +99,7 @@ type Function struct {
// Created time is the moment that creation was successfully completed
// according to the client which is in charge of what constitutes being
// fully "Created" (aka initialized)
Created time.Time
Created time.Time `yaml:"created"`
// Invocation defines hints for use when invoking this function.
// See Client.Invoke for usage.

View File

@ -20,11 +20,11 @@
},
"Function": {
"required": [
"Version",
"version",
"name",
"namespace",
"runtime",
"Registry",
"registry",
"image",
"imageDigest",
"build",
@ -39,10 +39,10 @@
"options",
"labels",
"healthEndpoints",
"Created"
"created"
],
"properties": {
"Version": {
"version": {
"type": "string"
},
"name": {
@ -55,7 +55,7 @@
"runtime": {
"type": "string"
},
"Registry": {
"registry": {
"type": "string"
},
"image": {
@ -135,7 +135,7 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/HealthEndpoints"
},
"Created": {
"created": {
"type": "string",
"format": "date-time"
},