Skip to content
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

docs: generate OpenAPI specification #116

Draft
wants to merge 68 commits into
base: beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d00354a
WIP
daniel-mader Aug 21, 2024
4ffa6d1
feat init agetn_holder
nanderstabel Aug 22, 2024
375110e
refactor: add `openapi` module, fix tags, document more endpoints
daniel-mader Aug 24, 2024
ebfc36d
feat: add `HolderState`
nanderstabel Aug 26, 2024
bca826e
feat: add Holder functionality to `agent_store` and `agent_api_rest`
nanderstabel Aug 26, 2024
75d7a31
feat: add Holder functionality to Event Publisher
nanderstabel Aug 26, 2024
c2b2d62
feat: add `SendCredentialOffer` to `agent_verification`
nanderstabel Aug 26, 2024
87d061f
feat: add `/offers/send` issuance endpoint to `agent_api_rest`
nanderstabel Aug 26, 2024
34ff280
fix: remove incorrect Content Type
nanderstabel Aug 27, 2024
7f1ab4f
feat: add `Status` enum
nanderstabel Aug 27, 2024
302e63f
feat: add REST API for Holder
nanderstabel Aug 27, 2024
2673bac
feat: add `AllOffersView`
nanderstabel Aug 27, 2024
5ee0ae4
feat: add Holder views to `init.sql`
nanderstabel Aug 27, 2024
1babdd4
fix: fix `OfferView` update
nanderstabel Aug 27, 2024
7bcc730
feat: add credentials endpoint for Holder
nanderstabel Aug 27, 2024
2000769
refactor: refactor Router
nanderstabel Aug 27, 2024
7599bee
test: refactor test framework
nanderstabel Aug 30, 2024
805591e
refactor: deprecate `path` closure
nanderstabel Aug 30, 2024
dc8c25d
refactor: remove unused dependencies
nanderstabel Aug 30, 2024
9f20fb6
style: add clippy exception
nanderstabel Aug 30, 2024
7c13929
build: bump oid4vc dependencies
nanderstabel Aug 30, 2024
384244c
refactor: move all `CustomQuery` logic to `agent_shared`
nanderstabel Aug 30, 2024
4c39ac7
fix: add Into<SubjectSyntaxType> for SupportedDidMethod
nanderstabel Aug 30, 2024
29f25da
fix: return 200 OK when list is empty
nanderstabel Aug 30, 2024
e08a045
refactor: clean up code
nanderstabel Aug 30, 2024
f307da3
fix: Fix error handling for the Offer aggregate
nanderstabel Aug 30, 2024
29e90d1
fix: add error handling for to Offer aggregate
nanderstabel Aug 30, 2024
cda0b76
refactor: apply clippy suggestion
nanderstabel Aug 30, 2024
bb43a33
test: update Postman Collection
nanderstabel Aug 30, 2024
5aae168
feat: add Events to `config.rs`
nanderstabel Aug 30, 2024
3056a09
docs: add new Holder events to `agent_event_publisher_http` document…
nanderstabel Aug 30, 2024
fa0e631
Merge branch 'dev' into feat/holder-init
nanderstabel Aug 30, 2024
143811f
Merge remote-tracking branch 'origin/feat/holder-init' into feat/gene…
daniel-mader Aug 30, 2024
4e8793f
docs: add basic docs for holder API
daniel-mader Aug 30, 2024
c601e3f
chore: Update OpenID4VCI endpoint paths and tags
daniel-mader Aug 30, 2024
304a469
docs: manually patch the generated OpenAPI document
daniel-mader Aug 30, 2024
dba22fe
docs: patch `description` and `version`
daniel-mader Sep 3, 2024
b099f8c
Merge branch 'dev' into feat/generate-openapi
daniel-mader Sep 20, 2024
37750a5
refactor: remove unnecessary blank line
daniel-mader Sep 20, 2024
6ce460e
feat: remove file-based health check
daniel-mader Sep 20, 2024
4cc16ad
chore(deps): bump `did_manager`
daniel-mader Sep 20, 2024
aff2acd
refactor: rename generated file
daniel-mader Sep 20, 2024
c94a377
chore(deps): bump `utoipa`
daniel-mader Sep 20, 2024
33d5204
docs: describe OpenAPI usage
daniel-mader Sep 20, 2024
2967c3a
refactor: remove Swagger UI
daniel-mader Sep 20, 2024
dd451c6
refactor: rename current `openapi.yaml` file (non-generated)
daniel-mader Sep 20, 2024
ca2ceaf
docs: update OpenAPI reference
daniel-mader Sep 21, 2024
5d20f17
refactor: rename `Well-known` tag
daniel-mader Sep 21, 2024
d99bcd2
docs: add examples
daniel-mader Sep 29, 2024
35a8d11
docs: add missing endpoints
daniel-mader Sep 29, 2024
20d09a5
docs: include Markdown description, add schemas
daniel-mader Oct 2, 2024
91fd64e
Merge branch 'beta' into feat/generate-openapi
daniel-mader Dec 3, 2024
93084d4
feat: migrate to `utoipa` stable, add manual schemas
daniel-mader Dec 3, 2024
8061154
chore: add docs, refine tags
daniel-mader Dec 3, 2024
27856c4
Merge branch 'beta' into feat/generate-openapi
daniel-mader Dec 16, 2024
2d289f9
build: revert formatting
daniel-mader Dec 16, 2024
5d348c9
feat: implement custom schema for `expires_at`
daniel-mader Dec 17, 2024
8e9911d
feat: serve OpenAPI docs (optional)
daniel-mader Dec 17, 2024
0547da6
docs: update introduction
daniel-mader Dec 17, 2024
756710f
feat: register more endpoints, define custom schema for `Presentation…
daniel-mader Dec 17, 2024
7bf5e94
refactor: remove comments
daniel-mader Dec 17, 2024
1475d74
fix: adjust descriptions
daniel-mader Dec 17, 2024
197dc67
feat: describe tags
daniel-mader Dec 17, 2024
efbafd0
feat: add holder presentation endpoints
daniel-mader Dec 17, 2024
6a8dacd
docs: exclude low-priority endpoints
daniel-mader Jan 21, 2025
a528ce5
docs: add example request
daniel-mader Jan 29, 2025
d699957
Merge branch 'beta' into feat/generate-openapi
daniel-mader Jan 30, 2025
ad7235e
docs: remove schema placeholders, add example values, rearrange examples
daniel-mader Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions agent_api_rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ axum.workspace = true
axum-auth = "0.7"
axum-macros = "0.4"
did_manager.workspace = true
chrono.workspace = true
http-api-problem = "0.57"
hyper = { version = "1.2" }
identity_core.workspace = true
Expand All @@ -31,6 +32,8 @@ tower-http.workspace = true
tracing.workspace = true
url.workspace = true
uuid.workspace = true
utoipa = { version = "5.2", features = ["axum_extras", "chrono", "uuid", "url", "yaml"] }
utoipa-scalar = { version = "0.2", features = ["axum"] }

[dev-dependencies]
agent_event_publisher_http = { path = "../agent_event_publisher_http", features = ["test_utils"] }
Expand Down
15 changes: 13 additions & 2 deletions agent_api_rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ Breaking changes may occur before the API reaches a stable version.

The current version of the REST API is `v0`.

### OpenAPI specification (Swagger UI)
### OpenAPI specification

> [!NOTE]
> UniCore uses [Scalar](https://scalar.com) to make its OpenAPI specification interactive. It is served under `/<BASE_PATH>/<API_VERSION>/api-reference` (for example: `/v0/api-reference`). The `openapi.yaml` file can be downloaded there as well. The latest version of the `openapi.yaml` file is also deployed as part of the documentation at https://docs.impierce.com/unicore/api-reference.

#### Generate OpenAPI specification

The `openapi.yaml` file can be generated manually by executing the test `generate_openapi_file()` _(ignored in a regular test run)_.

#### Swagger UI

You can also run a local Swagger UI container to inspect the OpenAPI specification.

```bash
docker run --rm -p 9090:8080 -e SWAGGER_JSON=/tmp/openapi.yaml -v $(pwd):/tmp swaggerapi/swagger-ui
```

Browse to http://localhost:9090
Browse to http://localhost:9090.

### CORS

Expand Down
Loading
Loading