From c7b27a7149c8db4add8b4bee0d2f70c2afe37c34 Mon Sep 17 00:00:00 2001 From: Uwe Krueger Date: Mon, 16 Jan 2023 09:39:04 +0100 Subject: [PATCH] align json schema with spec --- cmds/ocm/commands/ocmcmds/common/resources.go | 4 ++-- docs/ocm/model.md | 1 + hack/Makefile | 4 ++++ resources/component-descriptor-ocm-v3-schema.yaml | 2 +- resources/component-descriptor-v2-schema.yaml | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmds/ocm/commands/ocmcmds/common/resources.go b/cmds/ocm/commands/ocmcmds/common/resources.go index ee84efc14..03bf361d2 100644 --- a/cmds/ocm/commands/ocmcmds/common/resources.go +++ b/cmds/ocm/commands/ocmcmds/common/resources.go @@ -8,13 +8,13 @@ import ( "encoding/json" "fmt" - _ "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/types" - "github.com/mandelsoft/vfs/pkg/vfs" "github.com/spf13/pflag" "golang.org/x/text/cases" "golang.org/x/text/language" + _ "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/types" + "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/addhdlrs" "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs" "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/dryrunoption" diff --git a/docs/ocm/model.md b/docs/ocm/model.md index 612be9c47..d123a4df5 100644 --- a/docs/ocm/model.md +++ b/docs/ocm/model.md @@ -119,6 +119,7 @@ A component descriptor describes: - a history of [Repository Contexts](#repository-contexts) describing former repository locations of the component version along a transportation chain +- an optional creation timestamp (RFC3339) rounded to seconds. - a set of [Labels](#labels) to assign arbitrary kinds of information to the component version, which is not formally defined by the Open Component Model - an optional set of [Sources](#sources), that were used to generate the diff --git a/hack/Makefile b/hack/Makefile index a5cfe4ac9..d5c5df1cd 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -59,6 +59,10 @@ go-bindata: $(GOPATH)/bin/goimports: go install -v golang.org/x/tools/cmd/goimports@latest +Linux_jq: + $(info -> jq is missing) + $(info - sudo apt-get install jq / sudo dnf install jq / sudo zypper install jq / sudo pacman -S jq) + Darwin_sed: Darwin $(info -> GNU sed is missing) $(info - brew install gnu-sed) diff --git a/resources/component-descriptor-ocm-v3-schema.yaml b/resources/component-descriptor-ocm-v3-schema.yaml index ae0fb81af..a7a0f0659 100644 --- a/resources/component-descriptor-ocm-v3-schema.yaml +++ b/resources/component-descriptor-ocm-v3-schema.yaml @@ -37,7 +37,7 @@ definitions: value: {} version: pattern: '^v[0-9]+$' - signature: + signing: type: 'boolean' additionalProperties: false diff --git a/resources/component-descriptor-v2-schema.yaml b/resources/component-descriptor-v2-schema.yaml index b192c8f01..ce41afa14 100644 --- a/resources/component-descriptor-v2-schema.yaml +++ b/resources/component-descriptor-v2-schema.yaml @@ -1,6 +1,6 @@ $id: 'https://gardener.cloud/schemas/component-descriptor-v2' $schema: 'https://json-schema.org/draft/2020-12/schema' -description: 'Gardener Component Descriptor v2 schema' +description: 'Open Component Model v2 schema' definitions: meta: type: 'object' @@ -22,7 +22,7 @@ definitions: value: {} version: pattern: '^v[0-9]+$' - signature: + signing: type: 'boolean' componentName: