TransformJSONProtoToDSL can fail when given an AuthorizationModel produced by TransformModuleFilesToModel, even though the
model represents valid DSL.
reproduce
user := `
module user
type user
`
group := `
module group
type group
relations
define member: [user]
`
model, err := transformer.TransformModuleFilesToModel([]transformer.ModuleFile{
{Name: "user.fga", Contents: user},
{Name: "group.fga", Contents: group},
}, "1.2")
if err != nil {
panic(err)
}
_, err = transformer.TransformJSONProtoToDSL(
model,
transformer.WithIncludeSourceInformation(true),
)
my expectation was that this would return the full compiled DSL model, similar to the output of the FGA cli fga model transform
but it fails with
the 'member' relation definition under the 'group' type is not supported by the OpenFGA DSL syntax yet
TransformJSONProtoToDSLcan fail when given anAuthorizationModelproduced byTransformModuleFilesToModel, even though themodel represents valid DSL.
reproduce
my expectation was that this would return the full compiled DSL model, similar to the output of the FGA cli
fga model transformbut it fails with