NAME

gcloud beta pubsub schemas validate-schema - validate a Pub/Sub schema

SYNOPSIS

gcloud beta pubsub schemas validate-schema --type=TYPE (--definition=DEFINITION | --definition-file=DEFINITION_FILE) [GCLOUD_WIDE_FLAG ...]

DESCRIPTION

(BETA) Validate a new Pub/Sub schema.

EXAMPLES

To validate a PROTOCOL_BUFFER schema, run:

$ gcloud beta pubsub schemas validate-schema \ --definition="syntax = 'proto3'; message Message { optional \ string key = 1; }" --type=PROTOCOL_BUFFER

To validate an equivalent AVRO schema, run:

$ gcloud beta pubsub schemas validate-schema \ --definition='{ "type": "record", "namespace": "my.ns", "name": "KeyMsg", "fields": [ { "name": "key", "type": "string" } ] }' \ --type=AVRO

REQUIRED FLAGS

--type=TYPE

Type of the schema. TYPE must be one of: avro, protocol-buffer, type-unspecified.

Schema definition.

Exactly one of these must be specified:

--definition=DEFINITION

Inline schema definition.

--definition-file=DEFINITION_FILE

File containing schema definition.

GCLOUD WIDE FLAGS

These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

API REFERENCE

This command uses the pubsub/v1 API. The full documentation for this API can be found at: https://cloud.google.com/pubsub/docs

NOTES

This command is currently in beta and might change without notice. These variants are also available:

$ gcloud pubsub schemas validate-schema

$ gcloud alpha pubsub schemas validate-schema