-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.sh
executable file
·30 lines (24 loc) · 1.26 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
rm -f ./example/api/place_order_request_requestgen.go
go run ./cmd/requestgen -type PlaceOrderRequest -method GET -url "/api/v1/bullet" -debug \
./example/api && \
go test ./example/api || cat ./example/api/place_order_request_requestgen.go
go run ./cmd/requestgen -type PlaceOrderRequest -method GET -url "/api/v1/bullet" -debug \
-responseType '"./example/api".Response' \
-responseDataField Data \
-responseDataType '"./example/api".Order' \
./example/api && \
go test ./example/api || cat ./example/api/place_order_request_requestgen.go
(cd example/api &&
go run ../../cmd/requestgen -type PlaceOrderRequest -method GET -url "/api/v1/bullet" -debug \
-responseType .Response \
-responseDataField Data \
-responseDataType .Order \
. && \
go test . || cat place_order_request_requestgen.go)
go run ./cmd/requestgen -type PlaceOrderRequest -method GET -url "/api/v1/bullet" -debug \
-responseType 'interface{}' \
./example/api && \
go test ./example/api || cat ./example/api/place_order_request_requestgen.go
go run ./cmd/requestgen -type NoParamRequest -url /v1/bullet -method GET -debug ./example/api && go test ./example/api