forked from cardosofelipe/fast-next-template
Add auto-generated API client and update authStore tests
- Integrated OpenAPI-generated TypeScript SDK (`sdk.gen.ts`, `types.gen.ts`, `client.gen.ts`) for API interactions. - Refactored `authStore` tests to include storage mock reset logic with default implementations.
This commit is contained in:
@@ -48,10 +48,7 @@ echo -e "${YELLOW}⚙️ Generating TypeScript API client...${NC}"
|
||||
if npx @hey-api/openapi-ts \
|
||||
--input /tmp/openapi.json \
|
||||
--output "$OUTPUT_DIR" \
|
||||
--client axios \
|
||||
--name ApiClient \
|
||||
--useOptions true \
|
||||
--exportSchemas true; then
|
||||
--client @hey-api/client-axios; then
|
||||
echo -e "${GREEN}✓ API client generated successfully${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Failed to generate API client${NC}"
|
||||
|
||||
Reference in New Issue
Block a user