{"id":17343558,"url":"https://github.com/maxmindlin/openfga-dsl-parser","last_synced_at":"2025-06-18T15:36:17.912Z","repository":{"id":49555493,"uuid":"517757188","full_name":"maxmindlin/openfga-dsl-parser","owner":"maxmindlin","description":"Parsing and JSON transformer library for the OpenFGA authorization DSL ","archived":false,"fork":false,"pushed_at":"2022-10-17T22:14:13.000Z","size":42,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T08:51:38.649Z","etag":null,"topics":["json","library","openfga","parser","transformer"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/openfga-dsl-parser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxmindlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-25T17:21:02.000Z","updated_at":"2025-06-02T20:20:47.000Z","dependencies_parsed_at":"2022-09-11T17:11:59.323Z","dependency_job_id":null,"html_url":"https://github.com/maxmindlin/openfga-dsl-parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maxmindlin/openfga-dsl-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmindlin%2Fopenfga-dsl-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmindlin%2Fopenfga-dsl-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmindlin%2Fopenfga-dsl-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmindlin%2Fopenfga-dsl-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmindlin","download_url":"https://codeload.github.com/maxmindlin/openfga-dsl-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmindlin%2Fopenfga-dsl-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260580528,"owners_count":23031427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","library","openfga","parser","transformer"],"created_at":"2024-10-15T16:09:42.690Z","updated_at":"2025-06-18T15:36:12.897Z","avatar_url":"https://github.com/maxmindlin.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust"],"sub_categories":[],"readme":"# OpenFGA DSL Parser\n\n[![Openfga-dsl-parser crate](https://img.shields.io/crates/v/openfga-dsl-parser.svg)](https://crates.io/crates/openfga-dsl-parser)\n[![Openfga-dsl-parser documentation](https://docs.rs/openfga-dsl-parser/badge.svg)](https://docs.rs/openfga-dsl-parser)\n\nThe OpenFGA DSL Parser provides utilities for parsing DSL file string inputs into an AST representation, as well as transforming them into a JSON representation.\n\nThis library is meant to be a utility for services using [OpenFGA](https://openfga.dev/) for their authorization solution, but need a way to translate from their DSL to the JSON format the HTTP API expects. A [Typescript library](https://github.com/openfga/syntax-transformer) is available that does something similar, however this library aims to target Rust as well as be a base for other potential languages to bind to.\n\n# Usage\n\n```rust\nuse openfga_dsl_parser::{json, Parser};\n\nlet input = \"type group\n  relations\n    define member as self\ntype resource\n  relations\n    define writer as self\n    define reader as self but not writer\";\n\nlet mut parser = Parser::new(input);\nlet doc = parser.parse_document()?;\n\nlet json = json::JsonTransformer::new(\u0026doc).serialize();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmindlin%2Fopenfga-dsl-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmindlin%2Fopenfga-dsl-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmindlin%2Fopenfga-dsl-parser/lists"}