Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crdtoapi

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crdtoapi

CustomResourceDefinitions to OpensAPI

  • 0.0.7
  • npm
  • Socket score

Version published
Weekly downloads
327
increased by54.98%
Maintainers
1
Weekly downloads
 
Created
Source

CustomResourceDefinitions to OpensAPI

crdtoapi is a tool that creates an OpenAPI definitions file from kubernetes CustomResourceDefinitions.

Usage

Use kubernetes CRD definitions to create OpenAPI schema file.

npm install --location=global crdtoapi

# add npm bin path to your PATH, or use full
# excutable path, e.g. $(npm bin --location=global)/crdtoapi
crdtoapi --help

# create an OpenAPI file
crdtoapi -i ./examples/forklift/

# create an OpenAPI file using flags
crdtoapi -i ./examples/forklift/ -o openapi.yaml \
  --title "Forklift API" \
  --description "Migration toolkit for virtualization (Forklift) API definitions." \
  --license "Apache-2.0" \
  --apiVersion "2.4.0" \
  --contactEmail "kubev2v-dev@redhat.com"

Generate some API

OpensAPI comunity provide many tools, for example openapi-generator-cli is a tool for auto code generation using OpenAPI definition files.

# use openapi-generator-cli: 
#   npm i --location=global @openapitools/openapi-generator-cli
openapi-generator-cli generate -g typescript-fetch --skip-validate-spec -o generated -i openapi.yaml

Build

Run this scripts to lint and publish the package.

npm install
npm run lint:fix
npm run build
npm publish

Keywords

FAQs

Package last updated on 04 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc