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

Improve OasisScan's swagger README #2060

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .changelog/2060.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve OasisScan's swagger README
40 changes: 38 additions & 2 deletions src/vendors/oasisscan/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# Oasis Scan
# Typescript bindings for Oasis Scan

See [../explorer/README.md](../explorer/README.md)
This folder contains generated typescript bindings for OasisScan.

To update the bindings:

1. Update swagger.yml based on
- <https://api.oasisscan.com/mainnet/swagger-ui/>
- <https://api.oasisscan.com/mainnet/v2/api-docs>
- <https://github.com/bitcat365/oasisscan-backend>

2. Generate the bindings:

```sh
npx @openapitools/openapi-generator-cli generate \
-i swagger.yml \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```

or

```sh
docker run --rm --user "${UID}:${GID}" \
-v ${PWD}:/local \
--workdir /local \
openapitools/openapi-generator-cli:v5.1.0 generate \
-i swagger.yml \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```

3. Lint:

```sh
yarn lint:fix
```
Loading