The frontend component of PuffPastry, meant to interface with the backend, which in turn interfaces with the smart contract.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
433 B

  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. OPENAPI_URL="${OPENAPI_URL:-http://127.0.0.1:7300/openapi.json}"
  4. SPEC_FILE="openapi.fetched.json"
  5. OUTPUT_DIR="src/generated/typescript"
  6. cleanup() {
  7. rm -f "$SPEC_FILE"
  8. }
  9. trap cleanup EXIT
  10. curl --fail --silent --show-error \
  11. --header "Accept: application/json" \
  12. "$OPENAPI_URL" \
  13. --output "$SPEC_FILE"
  14. npx openapi-typescript-codegen \
  15. --input "$SPEC_FILE" \
  16. --output "$OUTPUT_DIR"