Code generations utility. Generates the TypeScript types and interfaces by `swagger` `yml` or `json` schema definition
npm install @elexpr/typescript-codegen``bash`
npx @elexpr/schema-codegen@latest \
--schema-file="https://swagger.com/swagger.yml" \
--base-auth="login:password" \
--output="./src/models" \
--filename="index.ts"
`json
[
{
"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:bash``
npx @elexpr/schema-codegen@latest