Skip to content

kubevirt-ui/kubevirt-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM Version

kubevirt-api

alt gopher network

kubevirt OpenAPI automation for TypeScript types

Documentation

Auto generated docs for KubeVirt API Docs

Auto generated using OpenAPI sources:

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

  1. Make sure you have all dependencies installed
yarn
  1. Go to the scripts/generate.sh script and modify the package's version the latest available version.

  2. It is essential to remove old API first

yarn clean:all
  1. Generate the new API
yarn generate
  1. Fix generated API errors:
yarn generate:fix
  1. Run linter: (if necesarry fix issues and re-run)
yarn lint:fix
  1. Generate docs:
yarn generate:docs