Skip to content

Latest commit

 

History

History

kubernetes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Auto generate typescritp types

Note I - Building and publishing

# From pacjage root directory bump version
vim package.json

# Build the package
npm install
npm run build
npm run lint

# Publish no npm.io
npm publish

Note II - Updating models

# From this direcotry
curl https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json -o swagger.json

npx openapi-generator-cli generate -g typescript-fetch --skip-validate-spec -o $(pwd) -i $(pwd)/swagger.json

rm -rf apis index.ts runtime.ts .openapi-generator*

find ./models -type f -exec sed -i 's/\.\.\/runtime/\.\.\/\.\.\/runtime/g' {} +

echo "export * from './models';" > index.ts