项目作者: mitallast

项目描述 :
Protobuf v3 with gRPC generator from subset of openapi v3
高级语言: Scala
项目地址: git://github.com/mitallast/openapi2proto.git
创建时间: 2019-12-10T11:58:37Z
项目社区:https://github.com/mitallast/openapi2proto

开源协议:MIT License

下载


openapi2proto

Protobuf v3 with gRPC generator from subset of openapi v3

Usage

```shell script
openapi2proto v0.1-beta.2
Usage: openapi2proto [compile|server]

Command: compile [options]
compile openapi v3 to protobuf v3 with gRPC
openapi file in yaml format
-t, —target-path
output path
Command: server [options]
run web server with ui and rest api
-p, —port port listen
-h, —host host listen

  1. ## Install GraalVM
  2. ### MacOS
  3. See details at [graalvm/homebrew-tap](https://github.com/graalvm/homebrew-tap)
  4. ```shell script
  5. brew cask install graalvm/tap/graalvm-ce-java11

May be required to disable gatekeeper
```shell script
sudo spctl —master-disable

  1. Add it to path
  2. ```shell script
  3. export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.0.0/Contents/Home
  4. export PATH="/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.0.0/Contents/Home/bin:$PATH"

Install native-image

```shell script
gu install native-image

  1. ## Build project
  2. ```shell script
  3. # clone project
  4. git clone git@github.com:mitallast/openapi2proto.git
  5. cd ./openapi2proto
  6. # build project
  7. ./sbt "graalvm-native-image:packageBin"
  8. # run application for test
  9. ./target/graalvm-native-image/openapi2proto