@elexpr/typescript-codegen
v1.0.3
Published
Code generations utility. Generates the TypeScript types and interfaces by `swagger` `yml` or `json` schema definition
Downloads
1
Readme
Based on https://www.npmjs.com/package/swagger-typescript-api
Usage
npx @elexpr/schema-codegen@latest \
--schema-file="https://swagger.com/swagger.yml" \
--base-auth="login:password" \
--output="./src/models" \
--filename="index.ts"
OR
create .codegenrc
-file
[
{
"schemaFile": [
"https://abstract.com/swagger/swagger.json",
"https://abstract.com/swagger/swagger.json",
"https://abstract.com/swagger/swagger.json",
],
"baseAuth": "login:password",
"output": "./src/models/msbs-api"
},
{
"schemaFile": [
"https://abstract.com/swagger/swagger.json"
],
"output": "./src/models/catalog-api"
}
]
and run:
npx @elexpr/schema-codegen@latest