Add Swagger UI for API Endpoints (#79)

* Add Swagger UI for API Endpoints

* Update html title

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>

* Rename swagger.html to notary_server_api.html

* Update link reference

* Update API endpoint description

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>

* Update swagger style to support darkmode

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>

* Revert swagger style to light mode

---------

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>
Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
This commit is contained in:
hw
2024-04-16 02:20:00 +08:00
committed by GitHub
parent 6cdc2e5d9d
commit 85f5ffb972
2 changed files with 25 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ docker run --init -p 127.0.0.1:7047:7047 ghcr.io/tlsnotary/tlsn/notary-server:<v
```
## API Endpoints
Please refer to the list of all API endpoints [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/tlsnotary/tlsn/main/notary-server/openapi.yaml#/).
Please refer to the list of all HTTP APIs [here](./notary_server_api.html), and WebSocket APIs [here](https://github.com/tlsnotary/tlsn/tree/main/notary-server#websocket-apis).
## PSE Development Notary Server

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="SwaggerUI" />
<title>Notary Server HTTP APIs</title>
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js" crossorigin></script>
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: 'https://raw.githubusercontent.com/tlsnotary/tlsn/main/notary-server/openapi.yaml#/',
dom_id: '#swagger-ui',
});
};
</script>
</body>