/code-generator

Primary LanguageGoApache License 2.0Apache-2.0

code-generator for OneCloud

Purpose

These code-generators can be used:

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