Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / buf.policy.yaml
Schema registry

buf.policy.yaml

buf.policy.yaml defines a policy containing lint, breaking change detection, and plugin configuration that can be shared across BSR modules

buf.policy.yaml

Check your file against this schema

Opens the validator with this schema already loaded. Paste your buf.policy.yaml and it validates in your browser — nothing is uploaded.

Validate a buf.policy.yaml → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
versionrequiredstringRequired. The version key defines the current configuration version. The only accepted value is v2.
namestringOptional. A BSR path that uniquely identifies this policy. Must be a valid policy name in the format buf.build/ORGANIZATION/POLICY_NAME.
lintobjectOptional. The lint settings for this policy.
lint.usearrayOptional. Lists the categories and/or specific rules to use. The STANDARD category is used if lint is unset.
default: ["STANDARD"]
lint.exceptarrayOptional. Removes rules or categories from the use list.
lint.enum_zero_value_suffixstringOptional. Controls the behavior of the ENUM_ZERO_VALUE_SUFFIX lint rule. By default, this rule verifies that the zero value of all enums ends in _UNSPECIFIED.
default: "_UNSPECIFIED"
lint.rpc_allow_same_request_responsebooleanOptional. Allows the same message type to be used for a single RPC's request and response type. We don't recommend using this option.
lint.rpc_allow_google_protobuf_empty_requestsbooleanOptional. Allows RPC requests to be google.protobuf.Empty messages. We don't recommend using this option.
lint.rpc_allow_google_protobuf_empty_responsesbooleanOptional. Allows RPC responses to be google.protobuf.Empty messages. We don't recommend using this option.
lint.service_suffixstringOptional. Controls the behavior of the SERVICE_SUFFIX lint rule. By default, this rule verifies that all service names are suffixed with Service.
default: "Service"
lint.disable_builtinbooleanOptional. Disables Buf's built-in lint rules when set to true. Defaults to false.
default: false
breakingobjectOptional. The breaking change detection settings for this policy.
breaking.usearrayOptional. Lists the rules or categories to use for breaking change detection. The FILE category is used if breaking is unset.
default: ["FILE"]
breaking.exceptarrayOptional. Removes rules or categories from the use list. We don't recommend using this option.
breaking.ignore_unstable_packagesbooleanOptional. Ignores packages with a last component that's one of the unstable forms recognized by the Buf linter's PACKAGE_VERSION_SUFFIX rule.
breaking.disable_builtinbooleanOptional. Disables Buf's built-in breaking change detection rules when set to true. Defaults to false.
default: false
pluginsarray<object>Optional. Custom Buf plugins that provide additional lint or breaking change rules.

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$commentJSON Schema Core, draft 2020-12§8.3 — Comments With "$comment"
$defsJSON Schema Core, draft 2020-12§8.2.4 — Schema Re-Use With "$defs"
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
constJSON Schema Validation, draft 2020-12§6.1.3 — "const"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
examplesJSON Schema Validation, draft 2020-12§9.5 — "examples"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
requiredJSON Schema Validation, draft 2020-12§6.5.3 — "required"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas