Skip to content

Commit

Permalink
Merge pull request #2060 from oasisprotocol/lw/oasisscan-readme
Browse files Browse the repository at this point in the history
Improve OasisScan's swagger README
  • Loading branch information
lukaw3d authored Sep 23, 2024
2 parents 37331e1 + 55c5331 commit e90e33c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
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
```

0 comments on commit e90e33c

Please sign in to comment.