Skip to content

Write OpenFGA DSL from openfga-model - #5

Open
LucaCappelletti94 wants to merge 2 commits into
d2-pest-parserfrom
d2-dsl-writer
Open

LucaCappelletti94 wants to merge 2 commits into
d2-pest-parserfrom
d2-dsl-writer

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

openfga-language can now write a single-file model back as DSL, byte for byte what the Go transformer writes, including its parenthesisation, direct-assignment-first ordering and blank lines. Every transformer case of openfga/language writes to its .fga file and parses back to the same model, and the JSON syntax cases fail with Go's exact messages.

One case departs from Go on purpose. A list or map condition parameter without an element type makes the Go writer panic, and here it returns a MissingGenericType error.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bcf0c693-e317-4c13-8b57-3588d6a5d244

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (365fe18) to head (ff93222).

Additional details and impacted files
@@                Coverage Diff                @@
##           d2-pest-parser        #5    +/-   ##
=================================================
  Coverage          100.00%   100.00%            
=================================================
  Files                   4         5     +1     
  Lines                 273       448   +175     
=================================================
+ Hits                  273       448   +175     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant