#!/usr/bin/env bash

VERSION=`cat ./VERSION`

openapi-generator-cli generate \
-i "$SWAGGER_SERVER_URL/swagger/v1c/swagger.json" \
-g typescript-fetch -o . \
--additional-properties="npmName=@mubicon/api,npmVersion=$VERSION,npmDescription='Mubicloud API',npmHomepage='https://mubicloud.com',npmAuthorEmail=info@mubicloud.ru,npmAuthorName=Mubicloud,allowUnicodeIdentifiers=false,supportsES6=true,paramNaming=camelCase,apiPackage=client,modelPackage=models,withSeparateModelsAndApi=true,modelPropertyNaming=camelCase,withInterfaces=true,useSingleRequestParameter=false" \
--template-dir=../../Codegen/templates

exit 0