Skip to content

JSON schema generation for plugins #762

@akhenakh

Description

@akhenakh

cmd/tools/json_schema_gen is useful to generate a schema definition but it's not designed with plugins in minds:

The only way to generate a json schema including some 3rd party plugin would be to manually patch cmd/tools/json_schema_gen and add import path.

Especially because all those tools are internals:

"github.com/warpstreamlabs/bento/internal/config/schema"
"github.com/warpstreamlabs/bento/internal/docs"

Same problem exist with "github.com/warpstreamlabs/bento/internal/cli/blobl"

blobl.GenerateBloblangSyntax()
blobl.ExecuteBloblangMapping()

One solution could be to create an endpoint that returns the schema definition, for the current Bento, when in streams mode.

Context is I'm working on a visualizer interacting with a bento in stream mode, I would need to gather all inputs/processing/outputs and also registered bloblang funcs.

Image Image

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