Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
holgerstolzenberg opened this issue Jan 17, 2025 · 1 comment
Open

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

holgerstolzenberg opened this issue Jan 17, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@holgerstolzenberg
Copy link

holgerstolzenberg commented Jan 17, 2025

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}"

✌️

@holgerstolzenberg holgerstolzenberg changed the title Have better support for comments in .fga files for modular models Have better support for modular models in .fga files Jan 17, 2025
@rhamzeh rhamzeh added the enhancement New feature or request label Feb 11, 2025
@rhamzeh
Copy link
Member

rhamzeh commented Feb 11, 2025

Thanks for raising this @holgerstolzenberg

Marking it as part of #33

Just a head's up: It's unlikely we'll get to this soon, as it will need some work (see related VS Code PR that added support).

We'll gladly review any incoming community contribution - however the core OpenFGA team is currently busy with other work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants