@kubevirt-ui/kubevirt-api
v1.3.5
Published
kubevirt OpenAPI automation for TypeScript
Downloads
2,923
Readme
kubevirt-api
kubevirt OpenAPI automation for TypeScript types
Documentation
Auto generated docs for KubeVirt API Docs
Auto generated using OpenAPI sources:
- Openshift Console - https://github.com/openshift/console
- Kubevirt - https://github.com/kubevirt/kubevirt
- Kubernetes - https://github.com/kubernetes/kubernetes
- Containerized data importer (CDI) - https://github.com/kubevirt/containerized-data-importer
kubevirt API reference: http://kubevirt.io/api-reference/master/index.html
Usage
# Add to your project
yarn add @kubevirt-ui/kubevirt-api
// Import examples
import { IoK8sApiCoreV1Pod } from '@kubevirt-ui/kubevirt-api/kubernetes';
import { V1VirtualMachine } from '@kubevirt-ui/kubevirt-api/kubevirt';
import { V1beta1DataVolume } from '@kubevirt-ui/kubevirt-api/containerized-data-importer';
import { VirtualMachineModelGroupVersionKind } from '@kubevirt-ui/kubevirt-api/console/models';
import VirtualMachineModel from '@kubevirt-ui/kubevirt-api/console/models/VirtualMachineModel';
Update API
- Make sure you have all dependencies installed
yarn
Go to the
scripts/generate.sh
script and modify the package's version the latest available version.It is essential to remove old API first
yarn clean:all
- Generate the new API
yarn generate
- Fix generated API errors:
yarn generate:fix
- Run linter: (if necesarry fix issues and re-run)
yarn lint:fix
- Generate docs:
yarn generate:docs