Skip to content

Commit

Permalink
Made the output of gen-api more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
gammelalf committed Sep 3, 2024
1 parent 3f01bce commit 6cce157
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kraken_frontend/scripts/gen-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function DomainOrNetworkToJSON(value?: DomainOrNetwork | null): any {
EOF

echo "Patch WsMessage.ts"
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'WsMessageOneOf[0-9]*')
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'WsMessageOneOf[0-9]*' | sort)

IMPORTS=""
TYPE_DECL=""
Expand Down Expand Up @@ -143,7 +143,7 @@ EOF


echo "Patch WsClientMessage.ts"
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'WsClientMessageOneOf[0-9]*')
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'WsClientMessageOneOf[0-9]*' | sort)

IMPORTS=""
TYPE_DECL=""
Expand Down Expand Up @@ -221,7 +221,7 @@ export function WsClientMessageToJSON(value?: WsClientMessage | null): any {
EOF

echo "Patch SourceAttackResult.ts"
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'SourceAttackResultOneOf[0-9]*')
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'SourceAttackResultOneOf[0-9]*' | sort)

IMPORTS=""
TYPE_DECL=""
Expand Down Expand Up @@ -301,7 +301,7 @@ echo "Patch SourceAttack.ts"+
sed -i 's/export interface SourceAttack extends SourceAttackResult/export type SourceAttack = SourceAttackResult \&/' "${GENERATED}/models/SourceAttack.ts"

echo "Patch ManualInsert.ts"
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'ManualInsertOneOf[0-9]*')
mapfile -t VARIANTS < <(find "${GENERATED}/models/" | grep -o 'ManualInsertOneOf[0-9]*' | sort)

IMPORTS=""
TYPE_DECL=""
Expand Down

0 comments on commit 6cce157

Please sign in to comment.