-
Notifications
You must be signed in to change notification settings - Fork 21
generate OpenAPI docs #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ on: | |
- "synchronize" | ||
- "reopened" | ||
|
||
|
||
jobs: | ||
lint: | ||
name: "Lint & Publish Draft/Branch" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
--- | ||
repos: | ||
- repo: "https://github.com/bufbuild/buf" | ||
rev: "v1.47.2" | ||
rev: "v1.54.0" | ||
hooks: | ||
- id: "buf-generate" | ||
- id: "buf-lint" | ||
- id: "buf-format" | ||
- repo: "https://github.com/adrienverge/yamllint.git" | ||
rev: "v1.29.0" | ||
rev: "v1.37.1" | ||
hooks: | ||
- id: "yamllint" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
help: ## Show this help | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
install: ## Install dependencies | ||
brew install pre-commit | ||
brew install bufbuild/buf/buf | ||
pre-commit install | ||
miparnisari marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
# Authzed API | ||
|
||
[](https://www.apache.org/licenses/LICENSE-2.0.html) | ||
[](https://docs.authzed.com) | ||
[](https://authzed.com/docs) | ||
[](https://github.com/authzed/api/actions) | ||
[](https://authzed.com/discord) | ||
[](https://twitter.com/authzed) | ||
|
||
This project contains the definitions of [Protocol Buffers] used by Authzed. | ||
|
||
[Buf] is used to distribute these definitions and generate source code from them. | ||
We use [Buf] to distribute these definitions and generate source code from them. The definitions are published in [Buf Registry Authzed API repository]. | ||
|
||
You can find more info on [authentication], [HTTP/JSON API usage], and the [versioning and deprecation policy] in the [Authzed Docs]. | ||
You can find more info on [HTTP API usage] and the [versioning and deprecation policy] in the [Authzed Docs]. | ||
|
||
See [CONTRIBUTING.md] for instructions on how to contribute and perform common tasks like building the project and running tests. | ||
You can also use our [Postman collection] to explore the API. | ||
|
||
See [CONTRIBUTING.md] for instructions on how to contribute. | ||
|
||
[Protocol Buffers]: https://developers.google.com/protocol-buffers/ | ||
[Buf]: https://github.com/bufbuild/buf | ||
[authentication]: https://docs.authzed.com/reference/api#authentication | ||
[HTTP/JSON API usage]: https://docs.authzed.com/reference/api#alternative-httpjson-api | ||
[versioning and deprecation policy]: https://docs.authzed.com/reference/api#versioning--deprecation-policy | ||
[Authzed Docs]: https://docs.authzed.com | ||
[Authzed API Reference documentation]: https://docs.authzed.com/reference/api | ||
miparnisari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[HTTP API usage]: https://authzed.com/docs/spicedb/getting-started/client-libraries#http-clients | ||
[Authzed Docs]: https://authzed.com/docs | ||
[versioning and deprecation policy]: https://authzed.com/blog/buf | ||
[Postman collection]: (https://www.postman.com/authzed/spicedb/collection/m26cqyc) | ||
[Buf Registry Authzed API repository]: https://buf.build/authzed/api/docs/main | ||
[CONTRIBUTING.md]: https://github.com/authzed/api/blob/main/CONTRIBUTING.md | ||
|
||
## Development | ||
|
||
You can run `mage` to see the available commands for development. We assume you have a Mac computer. | ||
|
||
## Warnings ⚠️ | ||
|
||
- The `version` field found in various buf YAML configuration is actually schema of the YAML of the file and is not related to the version of the definitions. | ||
miparnisari marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env -S buf generate --template | ||
--- | ||
version: "v1" | ||
plugins: | ||
- plugin: "buf.build/grpc-ecosystem/openapiv2:v2.26.3" | ||
out: "docs" | ||
opt: | ||
- "openapi_naming_strategy=simple" | ||
- "allow_merge=true" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.