diff --git a/function.go b/function.go index 84737137..949bb3ef 100644 --- a/function.go +++ b/function.go @@ -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. diff --git a/schema/func_yaml-schema.json b/schema/func_yaml-schema.json index 0a2e27a4..c2cc2fa3 100644 --- a/schema/func_yaml-schema.json +++ b/schema/func_yaml-schema.json @@ -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" },