{"id":28403842,"url":"https://github.com/openfga/api","last_synced_at":"2025-06-27T08:31:29.137Z","repository":{"id":37834169,"uuid":"501388890","full_name":"openfga/api","owner":"openfga","description":"Protocol Buffers used by OpenFGA","archived":false,"fork":false,"pushed_at":"2025-05-28T16:16:34.000Z","size":1999,"stargazers_count":21,"open_issues_count":22,"forks_count":16,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-06-08T17:27:41.028Z","etag":null,"topics":["fga","fine-grained-authorization","openfga","protobuf","zanzibar"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/openfga.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-08T19:44:00.000Z","updated_at":"2025-05-28T16:16:37.000Z","dependencies_parsed_at":"2024-03-11T14:54:34.478Z","dependency_job_id":"f0b38451-7883-47f8-8d6a-d1652edc1bb5","html_url":"https://github.com/openfga/api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openfga/api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfga","download_url":"https://codeload.github.com/openfga/api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262222287,"owners_count":23277396,"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":["fga","fine-grained-authorization","openfga","protobuf","zanzibar"],"created_at":"2025-06-01T19:11:01.538Z","updated_at":"2025-06-27T08:31:29.115Z","avatar_url":"https://github.com/openfga.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFGA API\nThis project contains the definitions of [Protocol Buffers](https://developers.google.com/protocol-buffers/) used by OpenFGA.\n\n[Buf](https://github.com/bufbuild/buf) is used to manage, package, and generate source code from the protocol buffer definitions. The API definitions\nare pushed to the [`buf.build/openfga/api`](https://buf.build/openfga/api) repository in the Buf Registry.\n\n## Building the Generated Sources\nTo generate source code from the protobuf definitions contained in this project you can run the following command:\n\n\u003e **Note**: You must have [Buf CLI](https://docs.buf.build/installation) installed to run the following command.\n\u003e \n```bash\nmake buf-gen\n```\n\nThe command above will generate source code in the `proto/` directory. It will also configure a local git hook to check\nthat files requiring auto-generation after `.proto` changes have been updated. There are some cases where that git hook\nmay be overly strict. In those cases you can bypass it with `commit --no-verify`.\n\n## Use the generated sources in OpenFGA\n\n1. Generate the sources as above\n2. In the `proto` directory execute the following commands:\n    ```\n    go mod init go.buf.build/openfga/go/openfga/api\n    go mod tidy\n    ```\n3. In OpenFGA, add the following line to your `go.mod`:\n    ```\n    replace github.com/openfga/api/proto =\u003e /path/to/proto\n    ```\n\n## Generating OpenAPI Documentation\nTo generate the OpenAPI documentation from the protobuf sources you can run the following commands:\n\n\u003e **Note**: You must have [jq](https://jqlang.github.io/jq/download/) installed to run the `format` step below\n\n```bash\n./buf.gen.yaml\n./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json\nbuf format -w\n```\n\nOr you can just use\n```bash\nmake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfga%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fapi/lists"}