mirror of
https://github.com/ilyakooo0/roboservant.git
synced 2024-09-11 08:05:47 +03:00
27 lines
435 B
Bash
Executable File
27 lines
435 B
Bash
Executable File
n=$1
|
|
k=$2
|
|
|
|
cat prelude
|
|
echo -n "type SubApi = \"route1\" :> ReqBody '[JSON] Input :> Post '[JSON] Output"
|
|
for i in $(seq 2 $n); do
|
|
echo -n " :<|> \"route${i}\" :> "
|
|
echo "ReqBody '[JSON] Input :> Post '[JSON] Output"
|
|
done
|
|
|
|
echo -n "server = handler "
|
|
|
|
for i in $(seq 2 $n); do
|
|
echo -n ":<|> handler "
|
|
done
|
|
echo
|
|
echo
|
|
|
|
echo -n "type Api = Flatten ("
|
|
for i in $(seq 1 $k); do
|
|
echo -n '"foo" :> '
|
|
done;
|
|
|
|
echo "SubApi )"
|
|
|
|
|