This document shows you how to validate schemas for Pub/Sub topics. The validation check does not check the compatibility of the new revision with the older revisions.
Before you begin
Required roles and permissions
To get the permissions that you need to validate schemas definitions and manage them,
ask your administrator to grant you the
Pub/Sub Editor (
roles/pubsub.editor) IAM role on your project.
For more information about granting roles, see Manage access.
This predefined role contains the permissions required to validate schemas definitions and manage them. To see the exact permissions that are required, expand the Required permissions section:
The following permissions are required to validate schemas definitions and manage them:
Attach schema to topic:
Commit a schema revision:
Delete a schema or a schema revision:
Get a schema or schema revisions:
List schema revisions:
Rollback a schema:
Validate a message:
Get the IAM policy for a schema:
Configure the IAM policy for a schema:
You can grant roles and permissions to principals such as users, groups, domains, or service accounts. You can create a schema in one project and attach it to a topic located in a different project. Ensure that you have the required permissions for each project.
Validate a schema definition
You can validate a schema by using the Google Cloud console, the gcloud CLI, the Pub/Sub API, or the Cloud Client Libraries.
Follow the steps discussed in Create a schema.
The validation check does not check the compatibility of the new revision with the older revisions.