kubevirt OpenAPI automation for TypeScript types
Auto generated docs for KubeVirt API Docs
- 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
# 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';
- 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