Skip to content

Have better support for modular models in .fga files #74

@holgerstolzenberg

Description

@holgerstolzenberg

Situation

A modular OpenFGA model created via OpenFGA CLI will contain some hinting comments that show from what locations the model parts have been included.

These comments are placed inline with the type: whatever declarations.

These comments do not render properly in OpenFGA IntelliJ plugin breaking the color formatting and also creating an validation error.
If manually placed into a distinct comment line, it works, but this should not be necessary.

Also, a model file starting with module ... causes a validation error.

Please see attached screenshots:

Image Image Image

Expectation

  • the editor pane does not show a validation error if the .fga file is part of a modular module
  • the editor pane should render the comments nicely and does not produce validation error(s)

How to reproduce

Just load a fully merged model file from a modular model into the OpenFGA editor in IntelliJ.
We have created our full model by using OpenFGA CLI via docker image:

docker run \
    --rm \
    -v "$(pwd):/data" openfga/cli:v0.6.2 model transform \
      --input-format modular \
      --output-format fga \
      --file /data/mccs.mod > "${target_path}/${target_file}"

✌️

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions