Skip to content

Support service definitions with descriptors #25

Description

@evaline-ju

Is your feature request related to a problem? Please describe.

As a follow-up to the JSON to service issue, we may want to support Descriptors directly in the JSON service, rather than just the input/output types for the RPC methods.

This would allow accepting direct references like in jtd to proto but does not currently work directly with jtd.validate

Describe the solution you'd like

Being able to define services with descriptors like the following:

{
        "service": {
            "rpcs": [
                {
                    "name": "FooPredict",
                    "input_type": InputDescriptor,
                    "output_type": OutputDescriptor,
                }
            ]
        }
    }

Describe alternatives you've considered

Current support, without descriptors, just types

jtd.validate validation errors could be caught and parsed e.g. ValidationError(instance_path=['service', 'rpcs', '0', 'output_type'], schema_path=['properties', 'service', 'properties', 'rpcs', 'elements', 'properties', 'output_type', 'type'])]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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