openfga / language

Grammar for the OpenFGA modeling language
https://openfga.dev
Apache License 2.0
17 stars 7 forks source link

feat(js): implement transforming module to a model #178

Closed ewanharris closed 7 months ago

ewanharris commented 7 months ago

Description

Implements the transformModuleFilesToModel that will take the files that represent a modular model and then returns a the full authorization model.

It handles copying over conditions and type definitions as well as ensuring they all include the file metadata that cannot be added during the parsing of the DSL, ensuring uniqueness between these and also potential issues with missing extends keywords.

It handles copying over type extensions to the original type extension, ensuring uniqueness in the relation names.

It uses some WIP versions of js-sdk and api/poto

The tests need some improvement to ensure that all the bases are being covered.

References

Is the JS portion of #153

Review Checklist

rhamzeh commented 7 months ago

I don't think these should be in there: https://github.com/openfga/api/compare/main...feat/137-modular-models-additions#diff-4fff4cf94235ef3370ef32783dc14676cf70fc97cf96d3a3c13fe6bbcf018683R137-R144, these are strictly metadata.

But up for having that discussion