- NAME
-
- gcloud pubsub schemas validate-schema - validate a Pub/Sub schema
- SYNOPSIS
-
-
gcloud pubsub schemas validate-schema
--type
=TYPE
(--definition
=DEFINITION
|--definition-file
=DEFINITION_FILE
) [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- Validate a new Pub/Sub schema.
- EXAMPLES
-
To validate a PROTOCOL_BUFFER schema, run:
gcloud pubsub schemas validate-schema --definition="syntax = 'proto3'; message Message { optional string key = 1; }" --type=PROTOCOL_BUFFER
To validate an equivalent AVRO schema, run:
gcloud 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
. -
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: http://cloud.go888ogle.com.fqhub.com/pubsub/docs - NOTES
-
These variants are also available:
gcloud alpha pubsub schemas validate-schema
gcloud beta pubsub schemas validate-schema
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]