Skip to content

Commit

Permalink
feat: schema changes to support enums (#1004)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
worstell and github-actions[bot] authored Feb 29, 2024
1 parent a9c3ab3 commit 9a8df99
Show file tree
Hide file tree
Showing 21 changed files with 1,831 additions and 563 deletions.
6 changes: 3 additions & 3 deletions backend/controller/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *ConsoleService) GetModules(ctx context.Context, req *connect.Request[pb
case *schema.Verb:
//nolint:forcetypeassert
v := decl.ToProto().(*schemapb.Verb)
verbSchema := schema.VerbToSchema(v) // TODO: include all of the types that the verb references
verbSchema := schema.VerbFromProto(v) // TODO: include all of the types that the verb references
var jsonRequestSchema string
if requestData, ok := verbSchema.Request.(*schema.DataRef); ok {
jsonSchema, err := schema.DataToJSONSchema(sch, *requestData)
Expand All @@ -86,12 +86,12 @@ func (c *ConsoleService) GetModules(ctx context.Context, req *connect.Request[pb
d := decl.ToProto().(*schemapb.Data)
data = append(data, &pbconsole.Data{
Data: d,
Schema: schema.DataToSchema(d).String(),
Schema: schema.DataFromProto(d).String(),
})

case *schema.Bool, *schema.Bytes, *schema.Database, *schema.Float,
*schema.Int, *schema.Module, *schema.String, *schema.Time,
*schema.Unit, *schema.Any, *schema.TypeParameter:
*schema.Unit, *schema.Any, *schema.TypeParameter, *schema.Enum:
}
}

Expand Down
Loading

0 comments on commit 9a8df99

Please sign in to comment.