HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/394/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