File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Improve OasisScan's swagger README
Original file line number Diff line number Diff line change 1- # Oasis Scan
1+ # Typescript bindings for Oasis Scan
22
3- See [ ../explorer/README.md] ( ../explorer/README.md )
3+ This folder contains generated typescript bindings for OasisScan.
4+
5+ To update the bindings:
6+
7+ 1 . Update swagger.yml based on
8+ - < https://api.oasisscan.com/mainnet/swagger-ui/ >
9+ - < https://api.oasisscan.com/mainnet/v2/api-docs >
10+ - < https://github.com/bitcat365/oasisscan-backend >
11+
12+ 2 . Generate the bindings:
13+
14+ ``` sh
15+ npx @openapitools/openapi-generator-cli generate \
16+ -i swagger.yml \
17+ -g typescript-fetch \
18+ -o . \
19+ --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
20+ ```
21+
22+ or
23+
24+ ``` sh
25+ docker run --rm --user " ${UID} :${GID} " \
26+ -v ${PWD} :/local \
27+ --workdir /local \
28+ openapitools/openapi-generator-cli:v5.1.0 generate \
29+ -i swagger.yml \
30+ -g typescript-fetch \
31+ -o . \
32+ --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
33+ ```
34+
35+ 3 . Lint:
36+
37+ ``` sh
38+ yarn lint:fix
39+ ```
You can’t perform that action at this time.
0 commit comments