-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce basic open API specification (#78)
- Loading branch information
1 parent
192213e
commit f62ef62
Showing
19 changed files
with
605 additions
and
276 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,34 @@ | ||
import { PUBLIC_API_KEY } from "../environment.js"; | ||
import { openApiPaths } from "./routes/index.js"; | ||
|
||
export const genereateOpenApiSpec = () => ({ | ||
openapi: "3.1.0", | ||
info: { | ||
title: "Aztec Scan API", | ||
version: "0.2.0", | ||
description: | ||
"API for exploring Aztec Network. Please note that this is a work in progress and the API is subject to change.", | ||
}, | ||
servers: [ | ||
{ | ||
url: "https://api.chicmoz.info/v1/{apiKey}", | ||
variables: { | ||
apiKey: { | ||
default: PUBLIC_API_KEY, | ||
description: "The project ID", | ||
}, | ||
}, | ||
}, | ||
{ | ||
url: "http://explorer-api.localhost/v1/{apiKey}", | ||
variables: { | ||
apiKey: { | ||
default: PUBLIC_API_KEY, | ||
description: "The project ID", | ||
}, | ||
}, | ||
}, | ||
], | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
paths: openApiPaths, | ||
}); |
218 changes: 0 additions & 218 deletions
218
services/explorer-api/src/http-server/routes/controller.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.