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.
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected
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 thereset()
method. It also removes some unused code in the validator for thestateStack
.References
136
107
Review Checklist
main