openfga / language

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

chore: remove global validator from JSON to DSL transform. #142

Closed jimmyjames closed 8 months ago

jimmyjames commented 8 months ago

Refactor JSON to DSL validator to not use a global direct assignment validator instance.

Description

As discussed with @rhamzeh and in #136, we don't need to have a global direct assignment validator instance in the JSON to DSL transformers. This change removes the global instance and instead creates an instance in parseRelation, which removes the need for the reset() method. It also removes some unused code in the validator for the stateStack.

References

Review Checklist