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.6
  • 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 -g crdtoapi

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

crdtoapi -i ./examples/forklift/ -o openapi.yaml

Generate some API

# create an OpenAPI file
crdtoapi -i ./examples/forklift/ \
  -o openapi.yaml \
  -t "Forklift API" \
  -d "Forklift migration toolkit API definitions." \
  -l "Apache-2.0" \
  --apiVersion "2.4.0" \
  --contactEmail kubev2v-dev@redhat.com


# use openapi-generator-cli: 
#   npm i -g @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