Skip to content

Commit

Permalink
Add Swagger UI for API Endpoints (#79)
Browse files Browse the repository at this point in the history
* Add Swagger UI for API Endpoints

* Update html title

Co-authored-by: Christopher Chong <[email protected]>

* Rename swagger.html to notary_server_api.html

* Update link reference

* Update API endpoint description

Co-authored-by: Christopher Chong <[email protected]>

* Update swagger style to support darkmode

Co-authored-by: Hendrik Eeckhaut <[email protected]>

* Revert swagger style to light mode

---------

Co-authored-by: Christopher Chong <[email protected]>
Co-authored-by: Hendrik Eeckhaut <[email protected]>
  • Loading branch information
3 people authored Apr 15, 2024
1 parent 6cdc2e5 commit 85f5ffb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/developers/notary_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions src/developers/notary_server_api.html
Original file line number Diff line number Diff line change
@@ -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/[email protected]/swagger-ui.css" />
</head>

<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/[email protected]/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>

0 comments on commit 85f5ffb

Please sign in to comment.