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

yunion.io/x/code-generator

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yunion.io/x/code-generator

  • v0.0.0-20240418075412-277908789812
  • Go
  • Socket score

Version published
Created
Source

code-generator for OneCloud

Purpose

These code-generators can be used:

  • cmd/model-api-gen: generate and copy api models definition to package according by models.
  • cmd/swagger-gen: generate go-swagger spec by parsing models.

Install

$ git clone https://github.com/yunionio/code-generator $GOPATH/src/yunion.io/x/code-generator
$ cd $GOPATH/src/yunion.io/x/code-generator
$ make install

Usage

Simple test

# test model-api-gen
$ ./hack/model-generate.sh

# test swagger-gen
$ ./hack/swagger-generate.sh

For onecloud project

Suppose you already clone https://github.com/yunionio/onecloud at $GOPATH/src/yunion.io/x/onecloud.

$ cd $GOPATH/src/yunion.io/x/onecloud

# generate models definition at apis package
$ make gen-model-api

# generate swagger spec
$ make gen-swagger
# view swagger web page
$ make swagger-serve

FAQs

Package last updated on 18 Apr 2024

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