Skip to content

Commit

Permalink
fix: console errors on jsonschema (#837)
Browse files Browse the repository at this point in the history
Displaying deployments and the graph was broken on the console

```
error: Unary RPC failed: unknown data type {/dev/ftl/examples/online-boutique/services/cart/cart.go:29:1 cart Item}: /xyz.block.ftl.v1.console.ConsoleService/GetModules
```
  • Loading branch information
wesbillman authored Jan 25, 2024
1 parent b1fc75d commit 1d8c5a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/schema/jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func DataToJSONSchema(schema *Schema, dataRef DataRef) (*jsonschema.Schema, erro
// Resolve and encode all data types reachable from the root.
root.Definitions = map[string]jsonschema.SchemaOrBool{}
for dataRef := range dataRefs {
data, ok := dataTypes[dataRef]
data, ok := dataTypes[Ref{Module: dataRef.Module, Name: dataRef.Name}]
if !ok {
return nil, fmt.Errorf("unknown data type %s", dataRef)
}
Expand Down

0 comments on commit 1d8c5a6

Please sign in to comment.