forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buf.plugin.json
442 lines (442 loc) · 16 KB
/
buf.plugin.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/buf.plugin.json",
"$comment": "https://github.com/bufbuild/plugins/blob/main/CONTRIBUTING.md",
"title": "buf.plugin.yaml",
"description": "A `buf.plugin.yaml` file captures metadata about the plugin. It includes mandatory and optional fields that are displayed on the individual plugin page and the BSR plugin homepage at https://buf.build/plugins.",
"type": "object",
"required": ["version", "name", "plugin_version"],
"properties": {
"version": {
"description": "The YAML configuration version, must be `v1`.",
"type": "string",
"const": "v1"
},
"name": {
"description": "The plugin identity with format `{remote}/{organization_name}/{plugin_name}`.",
"type": "string"
},
"plugin_version": {
"description": "The plugin version with format`v{semver}`, the `v` prefix is required and the version must be valid [semantic versioning](https://semver.org/).",
"type": "string"
},
"source_url": {
"description": "URL to the source code of the Protobuf plugin.",
"type": "string"
},
"description": {
"description": "Description of the plugin.",
"type": "string"
},
"output_languages": {
"description": "The output language types generated by the plugin. See the PluginLanguage enum for existing languages. Open a GitHub issue in the Buf CLI (https://github.com/bufbuild/buf) if the output language isn't found for a plugin.",
"type": "array",
"items": {
"type": "string",
"enum": [
"go",
"javascript",
"typescript",
"swift",
"cpp",
"java",
"dart",
"rust",
"python",
"ruby",
"kotlin",
"objective_c",
"php",
"csharp",
"scala",
"c"
]
}
},
"spdx_license_id": {
"description": "The license id for the plugin from https://spdx.org/licenses.",
"type": "string"
},
"integration_guide_url": {
"description": "The URL to the integration guide for the plugin.",
"type": "string"
},
"deps": {
"description": "A list of dependencies on other plugins used by Generated SDKs.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["plugin"],
"properties": {
"plugin": {
"description": "The reference to the plugin dependency with format `{name}:{plugin_version}`.",
"type": "string"
},
"revision": {
"description": "If specified, the dependency will be to a specific version of a plugin. It is recommended to leave this off (the plugin will depend on the latest revision at time of publishing).",
"type": "integer",
"minimum": 0
}
}
}
},
"registry": {
"description": "Configuration to enable a plugin for use with Generated SDKs.",
"type": "object",
"additionalProperties": false,
"properties": {
"opts": {
"description": "Options supplied to the plugin when generating code for the SDK.",
"type": "array",
"items": {
"type": "string"
}
},
"go": {
"description": "Generated SDK configuration for a Go plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"min_version": {
"description": "The minimum Go version required by the plugin (e.g. `1.19`), used as the go directive in the `go.mod` file. See https://go.dev/ref/mod#go-mod-file-go.",
"type": "string"
},
"deps": {
"description": "A list of Go module requirements. Each requirement corresponds to a require directive in the `go.mod` file. See https://go.dev/ref/mod#go-mod-file-require.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"module": {
"description": "Go module name.",
"type": "string"
},
"version": {
"description": "Go module version.",
"type": "string"
}
}
}
}
}
},
"npm": {
"description": "Generated SDK configuration for a JavaScript/TypeScript plugin.",
"type": "object",
"additionalProperties": false,
"required": ["import_style"],
"properties": {
"rewrite_import_path_suffix": {
"description": "The suffix used in the generated files and their imported dependencies (supported by @bufbuild/protoplugin (https://www.npmjs.com/package/@bufbuild/protoplugin) plugins).",
"type": "string"
},
"deps": {
"description": "NPM package dependencies for the Generated SDK.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"package": {
"description": "The name of the NPM package dependency.",
"type": "string"
},
"version": {
"description": "The version of the NPM package dependency (see https://docs.npmjs.com/about-semantic-versioning#using-semantic-versioning-to-specify-update-types-your-package-can-accept for more details).",
"type": "string"
}
}
}
},
"import_style": {
"description": "One of either `module` or `commonjs`.",
"type": "string",
"enum": ["module", "commonjs"]
}
}
},
"maven": {
"description": "Generated SDK configuration for a Java/Kotlin plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"compiler": {
"type": "object",
"additionalProperties": false,
"properties": {
"java": {
"description": "Java compiler settings.",
"type": "object",
"additionalProperties": false,
"properties": {
"encoding": {
"description": "Encoding of source files.",
"type": "string",
"default": "UTF-8"
},
"release": {
"description": "Target Java release.",
"type": "integer",
"default": "8"
},
"source": {
"description": "Source bytecode level.",
"type": "integer",
"default": "8"
},
"target": {
"description": "Target bytecode level.",
"type": "integer",
"default": "8"
}
}
},
"kotlin": {
"description": "Kotlin compiler settings.",
"type": "object",
"additionalProperties": false,
"required": ["version"],
"properties": {
"api_version": {
"description": "Kotlin API version.",
"type": "string"
},
"jvm_target": {
"description": "JVM bytecode target version",
"type": "string",
"default": "1.8"
},
"language_version": {
"description": "Kotlin version source compatibility.",
"type": "string",
"default": "8"
},
"version": {
"description": "Version of the Kotlin compiler",
"type": "string"
}
}
}
}
},
"deps": {
"description": "Runtime dependencies of the generated Java/Kotlin code (in GAV format).",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"additional_runtimes": {
"description": "Configures additional supported runtimes.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
"description": "The name of the additional runtime. The only known name at this time is `lite` for Protobuf lite runtime support.",
"type": "string",
"const": "lite"
},
"deps": {
"description": "Dependencies for the runtime. These override `registry -> maven -> deps` if specified.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"opts": {
"description": "Plugin options for the additional runtime.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"python": {
"description": "Generated SDK configuration for a Python plugin.",
"type": "object",
"additionalProperties": false,
"required": ["package_type"],
"properties": {
"deps": {
"description": "Runtime dependencies of the generated code.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"requires_python": {
"description": "Specifies the `Requires-Python` of the generated package.",
"type": "string"
},
"package_type": {
"description": "One of `runtime` or `stub-only`.",
"type": "string",
"enum": ["runtime", "stub-only"]
}
}
},
"swift": {
"description": "Generated SDK configuration for a Swift plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"deps": {
"description": "Dependencies of the generated code.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"description": "URL of the Swift package.",
"type": "string"
},
"package": {
"description": "Name of the Swift package.",
"type": "string"
},
"version": {
"description": "Version of the Swift package.",
"type": "string"
},
"products": {
"description": "Products to import.",
"type": "array",
"items": {
"type": "string"
}
},
"platforms": {
"type": "object",
"additionalProperties": false,
"properties": {
"macos": {
"description": "Version of the macOS platform.",
"type": "string"
},
"ios": {
"description": "Version of the iOS platform.",
"type": "string"
},
"tvos": {
"description": "Version of the tvOS platform.",
"type": "string"
},
"watchos": {
"description": "Version of the watchOS platform.",
"type": "string"
}
}
},
"swift_versions": {
"description": "Versions of Swift the package supports.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"cargo": {
"description": "Generated SDK configuration for a Rust plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"rust_version": {
"description": "The rust-version set for the generated crate.",
"type": "string"
},
"deps": {
"description": "Crates.io dependencies for the Generated SDK.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The name of the dependency.",
"type": "string"
},
"req": {
"description": "The version request of the dependency.",
"type": "string"
},
"default_features": {
"description": "Whether or not to enable default features for the dependency.",
"type": "boolean"
},
"features": {
"description": "The features to enable for the dependency.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"nuget": {
"description": "Generated SDK configuration for a C# plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"target_frameworks": {
"description": "The target frameworks the generated package supports.",
"type": "array",
"items": {
"type": "string"
}
},
"deps": {
"description": "nuget.org dependencies for the Generated SDK.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The package ID of the dependency.",
"type": "string"
},
"version": {
"description": "The version range of the dependency.",
"type": "string"
},
"target_frameworks": {
"description": "The target frameworks the dependency applies to.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"cmake": {
"description": "Generated SDK configuration for a CMake plugin.",
"type": "object",
"additionalProperties": false
}
}
}
}
}