diff --git a/src/schemas/json/buf.gen.json b/src/schemas/json/buf.gen.json index 84b341b7918..b38c0d7778a 100644 --- a/src/schemas/json/buf.gen.json +++ b/src/schemas/json/buf.gen.json @@ -11,6 +11,14 @@ "type": "string" } }, + "exclude_types": { + "description": "Exclude the specified types when generating.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, "paths": { "description": "Include only the specified paths when generating.", "type": "array", @@ -129,6 +137,12 @@ } } ] + }, + "types": { + "$ref": "#/$defs/types" + }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" } }, "required": ["out"], @@ -543,6 +557,12 @@ "$comment": "https://buf.build/docs/configuration/v2/buf-gen-yaml#include_wkt", "description": "Optional. Generates Well-Known Types. Can't be set without --include-imports. This setting works the same as the --include-wkt flag on buf generate—if they conflict with each other, the flag gets precedence.", "type": "boolean" + }, + "types": { + "$ref": "#/$defs/types" + }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" } } } @@ -561,6 +581,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -581,6 +604,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -606,6 +632,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -651,6 +680,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -684,6 +716,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -716,6 +751,13 @@ "type": "string" } }, + "exclude_types": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, "paths": { "type": "array", "minItems": 1, @@ -748,6 +790,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -773,6 +818,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -798,6 +846,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, @@ -823,6 +874,9 @@ "types": { "$ref": "#/$defs/types" }, + "exclude_types": { + "$ref": "#/$defs/exclude_types" + }, "paths": { "$ref": "#/$defs/paths" }, diff --git a/src/test/buf.gen/v2.buf.gen.yaml b/src/test/buf.gen/v2.buf.gen.yaml index cedba20f6df..a1a0b11a161 100644 --- a/src/test/buf.gen/v2.buf.gen.yaml +++ b/src/test/buf.gen/v2.buf.gen.yaml @@ -107,6 +107,12 @@ plugins: strategy: all include_imports: true include_wkt: true + types: + - 'foo.v1.User' + - 'foo.v1.UserService' + exclude_types: + - 'foo.v1.User.Password' + - 'foo.v1.User.Email' inputs: # Git repository @@ -119,6 +125,9 @@ inputs: types: - 'foo.v1.User' - 'foo.v1.UserService' + exclude_types: + - 'foo.v1.User.Password' + - 'foo.v1.User.Email' # If empty, include all paths. paths: - a/b/c