Skip to content

[Rule-based type customization] Support for enum rules #61

@bjaglin

Description

@bjaglin

Given the current generated code for proto enums and the lack of ScalaPB options to customize them, it's impossible to generically encode PGV enum rules as compile-time constraints.

  1. (validate.rules).enum.defined_only
  2. (validate.rules).enum.const
  3. (validate.rules).enum.in / (validate.rules).enum.not_in

(1) would be fairly simple to implement via something similar to #62

(2) is complex as it would require a generic solution for capturing constants (and pass them as string litterals?)

(3) has the same challenges as (2) and would require a generalized version of (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions