Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions src/schemas/json/buf.gen.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -129,6 +137,12 @@
}
}
]
},
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
}
},
"required": ["out"],
Expand Down Expand Up @@ -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"
}
}
}
Expand All @@ -561,6 +581,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand All @@ -581,6 +604,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand All @@ -606,6 +632,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand Down Expand Up @@ -651,6 +680,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand Down Expand Up @@ -684,6 +716,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand Down Expand Up @@ -716,6 +751,13 @@
"type": "string"
}
},
"exclude_types": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"paths": {
"type": "array",
"minItems": 1,
Expand Down Expand Up @@ -748,6 +790,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand All @@ -773,6 +818,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand All @@ -798,6 +846,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand All @@ -823,6 +874,9 @@
"types": {
"$ref": "#/$defs/types"
},
"exclude_types": {
"$ref": "#/$defs/exclude_types"
},
"paths": {
"$ref": "#/$defs/paths"
},
Expand Down
9 changes: 9 additions & 0 deletions src/test/buf.gen/v2.buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down