From fce50a6bbea09aeeaa42959902e57060b690ffbb Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 31 Jul 2023 10:24:38 -0400 Subject: [PATCH] jsonschema: regen Signed-off-by: William Woodruff --- gen/jsonschema/schemas/Bundle.schema.json | 2 +- gen/jsonschema/schemas/CloudEvent.schema.json | 146 ++++++++++++++++ .../schemas/CloudEventBatch.schema.json | 161 ++++++++++++++++++ gen/jsonschema/schemas/Input.schema.json | 2 +- .../schemas/MessageSignature.schema.json | 2 +- 5 files changed, 310 insertions(+), 3 deletions(-) create mode 100644 gen/jsonschema/schemas/CloudEvent.schema.json create mode 100644 gen/jsonschema/schemas/CloudEventBatch.schema.json diff --git a/gen/jsonschema/schemas/Bundle.schema.json b/gen/jsonschema/schemas/Bundle.schema.json index 2968dbfa..ce779b80 100644 --- a/gen/jsonschema/schemas/Bundle.schema.json +++ b/gen/jsonschema/schemas/Bundle.schema.json @@ -147,7 +147,7 @@ "message_digest": { "$ref": "#/definitions/dev.sigstore.common.v1.HashOutput", "additionalProperties": false, - "description": "Message digest can be used to identify the artifact." + "description": "Message digest can be used to identify the artifact. Clients MUST NOT attempt to use this digest to verify the associated signature; it is intended solely for identification." }, "signature": { "type": "string", diff --git a/gen/jsonschema/schemas/CloudEvent.schema.json b/gen/jsonschema/schemas/CloudEvent.schema.json new file mode 100644 index 00000000..85bd429c --- /dev/null +++ b/gen/jsonschema/schemas/CloudEvent.schema.json @@ -0,0 +1,146 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "$ref": "#/definitions/CloudEvent", + "definitions": { + "CloudEvent": { + "properties": { + "id": { + "type": "string", + "title": "-- CloudEvent Context Attributes", + "description": "-- CloudEvent Context Attributes Required Attributes" + }, + "source": { + "type": "string", + "description": "URI-reference" + }, + "spec_version": { + "type": "string" + }, + "type": { + "type": "string" + }, + "attributes": { + "additionalProperties": { + "$ref": "#/definitions/dev.sigstore.events.v1.CloudEvent.CloudEventAttributeValue", + "additionalProperties": false + }, + "type": "object", + "description": "Optional \u0026 Extension Attributes" + }, + "binary_data": { + "type": "string", + "format": "binary", + "binaryEncoding": "base64" + }, + "text_data": { + "type": "string" + }, + "proto_data": { + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics." + }, + "value": { + "type": "string", + "description": "Must be a valid serialized protocol buffer of the above specified type.", + "format": "binary", + "binaryEncoding": "base64" + } + }, + "additionalProperties": false, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object", + "oneOf": [ + { + "required": [ + "binary_data" + ] + }, + { + "required": [ + "text_data" + ] + }, + { + "required": [ + "proto_data" + ] + } + ], + "title": "Cloud Event" + }, + "dev.sigstore.events.v1.CloudEvent.CloudEventAttributeValue": { + "properties": { + "ce_boolean": { + "type": "boolean" + }, + "ce_integer": { + "type": "integer" + }, + "ce_string": { + "type": "string" + }, + "ce_bytes": { + "type": "string", + "format": "binary", + "binaryEncoding": "base64" + }, + "ce_uri": { + "type": "string" + }, + "ce_uri_ref": { + "type": "string" + }, + "ce_timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "type": "object", + "oneOf": [ + { + "required": [ + "ce_boolean" + ] + }, + { + "required": [ + "ce_integer" + ] + }, + { + "required": [ + "ce_string" + ] + }, + { + "required": [ + "ce_bytes" + ] + }, + { + "required": [ + "ce_uri" + ] + }, + { + "required": [ + "ce_uri_ref" + ] + }, + { + "required": [ + "ce_timestamp" + ] + } + ], + "title": "*\n The CloudEvent specification defines\n seven attribute value types...", + "description": "* The CloudEvent specification defines seven attribute value types..." + } + } +} \ No newline at end of file diff --git a/gen/jsonschema/schemas/CloudEventBatch.schema.json b/gen/jsonschema/schemas/CloudEventBatch.schema.json new file mode 100644 index 00000000..d2dfb2ef --- /dev/null +++ b/gen/jsonschema/schemas/CloudEventBatch.schema.json @@ -0,0 +1,161 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "$ref": "#/definitions/CloudEventBatch", + "definitions": { + "CloudEventBatch": { + "properties": { + "events": { + "items": { + "$ref": "#/definitions/dev.sigstore.events.v1.CloudEvent" + }, + "additionalProperties": false, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "title": "*\n CloudEvent Protobuf Batch Format", + "description": "* CloudEvent Protobuf Batch Format" + }, + "dev.sigstore.events.v1.CloudEvent": { + "properties": { + "id": { + "type": "string", + "title": "-- CloudEvent Context Attributes", + "description": "-- CloudEvent Context Attributes Required Attributes" + }, + "source": { + "type": "string", + "description": "URI-reference" + }, + "spec_version": { + "type": "string" + }, + "type": { + "type": "string" + }, + "attributes": { + "additionalProperties": { + "$ref": "#/definitions/dev.sigstore.events.v1.CloudEvent.CloudEventAttributeValue", + "additionalProperties": false + }, + "type": "object", + "description": "Optional \u0026 Extension Attributes" + }, + "binary_data": { + "type": "string", + "format": "binary", + "binaryEncoding": "base64" + }, + "text_data": { + "type": "string" + }, + "proto_data": { + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics." + }, + "value": { + "type": "string", + "description": "Must be a valid serialized protocol buffer of the above specified type.", + "format": "binary", + "binaryEncoding": "base64" + } + }, + "additionalProperties": false, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object", + "oneOf": [ + { + "required": [ + "binary_data" + ] + }, + { + "required": [ + "text_data" + ] + }, + { + "required": [ + "proto_data" + ] + } + ], + "title": "Cloud Event" + }, + "dev.sigstore.events.v1.CloudEvent.CloudEventAttributeValue": { + "properties": { + "ce_boolean": { + "type": "boolean" + }, + "ce_integer": { + "type": "integer" + }, + "ce_string": { + "type": "string" + }, + "ce_bytes": { + "type": "string", + "format": "binary", + "binaryEncoding": "base64" + }, + "ce_uri": { + "type": "string" + }, + "ce_uri_ref": { + "type": "string" + }, + "ce_timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "type": "object", + "oneOf": [ + { + "required": [ + "ce_boolean" + ] + }, + { + "required": [ + "ce_integer" + ] + }, + { + "required": [ + "ce_string" + ] + }, + { + "required": [ + "ce_bytes" + ] + }, + { + "required": [ + "ce_uri" + ] + }, + { + "required": [ + "ce_uri_ref" + ] + }, + { + "required": [ + "ce_timestamp" + ] + } + ], + "title": "*\n The CloudEvent specification defines\n seven attribute value types...", + "description": "* The CloudEvent specification defines seven attribute value types..." + } + } +} \ No newline at end of file diff --git a/gen/jsonschema/schemas/Input.schema.json b/gen/jsonschema/schemas/Input.schema.json index 7b32eb9f..c2667286 100644 --- a/gen/jsonschema/schemas/Input.schema.json +++ b/gen/jsonschema/schemas/Input.schema.json @@ -193,7 +193,7 @@ "message_digest": { "$ref": "#/definitions/dev.sigstore.common.v1.HashOutput", "additionalProperties": false, - "description": "Message digest can be used to identify the artifact." + "description": "Message digest can be used to identify the artifact. Clients MUST NOT attempt to use this digest to verify the associated signature; it is intended solely for identification." }, "signature": { "type": "string", diff --git a/gen/jsonschema/schemas/MessageSignature.schema.json b/gen/jsonschema/schemas/MessageSignature.schema.json index 40a1e144..07e26fdf 100644 --- a/gen/jsonschema/schemas/MessageSignature.schema.json +++ b/gen/jsonschema/schemas/MessageSignature.schema.json @@ -7,7 +7,7 @@ "message_digest": { "$ref": "#/definitions/dev.sigstore.common.v1.HashOutput", "additionalProperties": false, - "description": "Message digest can be used to identify the artifact." + "description": "Message digest can be used to identify the artifact. Clients MUST NOT attempt to use this digest to verify the associated signature; it is intended solely for identification." }, "signature": { "type": "string",