mirror of https://github.com/knative/func.git
src: fix `func.yaml` schema (#805)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
This commit is contained in:
parent
fff00497f8
commit
1f54bdcb1c
|
@ -20,7 +20,7 @@ type Function struct {
|
||||||
// Version at which this function is known to be compatible.
|
// Version at which this function is known to be compatible.
|
||||||
// More specifically, it is the highest migration which has been applied.
|
// More specifically, it is the highest migration which has been applied.
|
||||||
// For details see the .Migrated() and .Migrate() methods.
|
// 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 on disk at which to find/create source and config files.
|
||||||
Root string `yaml:"-"`
|
Root string `yaml:"-"`
|
||||||
|
@ -40,7 +40,7 @@ type Function struct {
|
||||||
|
|
||||||
// Registry at which to store interstitial containers, in the form
|
// Registry at which to store interstitial containers, in the form
|
||||||
// [registry]/[user].
|
// [registry]/[user].
|
||||||
Registry string
|
Registry string `yaml:"registry"`
|
||||||
|
|
||||||
// Optional full OCI image tag in form:
|
// Optional full OCI image tag in form:
|
||||||
// [registry]/[namespace]/[name]:[tag]
|
// [registry]/[namespace]/[name]:[tag]
|
||||||
|
@ -99,7 +99,7 @@ type Function struct {
|
||||||
// Created time is the moment that creation was successfully completed
|
// Created time is the moment that creation was successfully completed
|
||||||
// according to the client which is in charge of what constitutes being
|
// according to the client which is in charge of what constitutes being
|
||||||
// fully "Created" (aka initialized)
|
// fully "Created" (aka initialized)
|
||||||
Created time.Time
|
Created time.Time `yaml:"created"`
|
||||||
|
|
||||||
// Invocation defines hints for use when invoking this function.
|
// Invocation defines hints for use when invoking this function.
|
||||||
// See Client.Invoke for usage.
|
// See Client.Invoke for usage.
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
},
|
},
|
||||||
"Function": {
|
"Function": {
|
||||||
"required": [
|
"required": [
|
||||||
"Version",
|
"version",
|
||||||
"name",
|
"name",
|
||||||
"namespace",
|
"namespace",
|
||||||
"runtime",
|
"runtime",
|
||||||
"Registry",
|
"registry",
|
||||||
"image",
|
"image",
|
||||||
"imageDigest",
|
"imageDigest",
|
||||||
"build",
|
"build",
|
||||||
|
@ -39,10 +39,10 @@
|
||||||
"options",
|
"options",
|
||||||
"labels",
|
"labels",
|
||||||
"healthEndpoints",
|
"healthEndpoints",
|
||||||
"Created"
|
"created"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"Version": {
|
"version": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"Registry": {
|
"registry": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
"$ref": "#/definitions/HealthEndpoints"
|
"$ref": "#/definitions/HealthEndpoints"
|
||||||
},
|
},
|
||||||
"Created": {
|
"created": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue