File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_pubsub_schemas_validate-schema.1
.TH "GCLOUD_BETA_PUBSUB_SCHEMAS_VALIDATE\-SCHEMA" 1
.SH "NAME"
.HP
gcloud beta pubsub schemas validate\-schema \- validate a Pub/Sub schema
.SH "SYNOPSIS"
.HP
\f5gcloud beta pubsub schemas validate\-schema\fR \fB\-\-type\fR=\fITYPE\fR (\fB\-\-definition\fR=\fIDEFINITION\fR\ |\ \fB\-\-definition\-file\fR=\fIPATH_TO_FILE\fR) [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR Validate a new Pub/Sub schema.
.SH "EXAMPLES"
To validate a PROTOCOL_BUFFER schema, run:
.RS 2m
$ gcloud beta pubsub schemas validate\-schema \e
\-\-definition="syntax = 'proto3'; message Message { optional \e
string key = 1; }" \-\-type=PROTOCOL_BUFFER
.RE
To validate an equivalent AVRO schema, run:
.RS 2m
$ gcloud beta pubsub schemas validate\-schema \e
\-\-definition='{ "type": "record", "namespace": "my.ns", "name":
"KeyMsg", "fields": [ { "name": "key", "type": "string" } ] }' \e
\-\-type=AVRO
.RE
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-type\fR=\fITYPE\fR
Type of the schema. \fITYPE\fR must be one of: \fBavro\fR,
\fBprotocol\-buffer\fR.
.TP 2m
Schema definition.
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-definition\fR=\fIDEFINITION\fR
Inline schema definition.
.TP 2m
\fB\-\-definition\-file\fR=\fIPATH_TO_FILE\fR
File containing schema definition. Use a full or relative path to a local file
containing the value of definition_file.
.RE
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "API REFERENCE"
This command uses the \fBpubsub/v1\fR API. The full documentation for this API
can be found at: https://cloud.google.com/pubsub/docs
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud pubsub schemas validate\-schema
.RE
.RS 2m
$ gcloud alpha pubsub schemas validate\-schema
.RE