Skip to content

[Feature Request] C# Support #70

@elliotmjackson

Description

@elliotmjackson

Original Post in PGV: bufbuild/protoc-gen-validate#480

Feature description:
Extend the capabilities of the protovalidate library to include support for performing runtime validation of Protocol Buffers messages in C# projects. Additionally, integrate a CEL (Common Expression Language) interpreter, currently under development at https://github.com/rofrankel/cel-csharp, to facilitate advanced validation expressions.

Problem it solves or use case:
The absence of C# support in the protovalidate library limits developers working with Protocol Buffers and C#. By adding C# support, developers can perform runtime validation of Protocol Buffers messages directly within their C# applications. Furthermore, integrating the CEL interpreter enables complex validation expressions, enhancing data validation capabilities.

Proposed implementation or solution:
The proposed solution involves extending the protovalidate library to include C# bindings and compatibility, which will involve defining C# classes or structures that correspond to Protocol Buffers message structures. Additionally, integrating the CEL interpreter from https://github.com/rofrankel/cel-csharp will facilitate advanced validation expressions within the protovalidate library.

Contribution:
I'm excited about contributing to this feature by participating in discussions around C# bindings, assisting in the integration of the CEL interpreter, and collaborating on the implementation of runtime validation functions within the protovalidate library. If necessary, I can also assist in writing tests and documentation to ensure comprehensive coverage and guidance.

Examples or references:
While the protovalidate library currently does not support C#, reference points such as protobuf-net can be valuable when considering how Protocol Buffers and C# can be integrated. The ongoing development of the CEL interpreter for C# (https://github.com/rofrankel/cel-csharp) can serve as a foundation for enabling complex validation expressions.

Additional context:
Enabling C# support in the protovalidate library aligns with the needs of developers who work with C# and Protocol Buffers. The integration of the CEL interpreter further enhances the library's capabilities, allowing developers to define sophisticated validation expressions. This feature contributes to more robust and accurate data validation, aligning with modern software development practices in the C# ecosystem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language SupportInterest in adding support for another language

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions