Options
The plugin options.
| Option | Values | Default | Description |
|---|---|---|---|
lib | valibot, zod, zod-mini | required | The schema library to generate for. |
unsupported | skip, error | skip | What to do with a rule that the plugin cannot translate. |
The plugin also accepts the standard options of protobuf-es plugins, such as target and import_extension.
unsupported
With unsupported=skip, the plugin leaves the rule out and writes a comment at the top of the generated file.
// Skipped unsupported rule on example.v1.User.name: celWith unsupported=error, generation fails and lists each unsupported rule. Use it in CI to find a rule that the client does not check.
These rules are unsupported.
celandcel_expressionon a field or a message, and predefined rules.(buf.validate.message).oneof.- The rules of
Timestamp,Duration,Any, andFieldMask. - String formats without a standard action in both libraries, such as
hostname,ip,uri_ref, andaddress. bytesrules other thanlen,min_len, andmax_len.repeated.uniqueonbytes.- A numeric range whose upper bound is below its lower bound.
- A
patternthat the JavaScriptRegExpcannot compile.