Skip to content

Automatically generate OpenAPI YAML reading Protobuf files via ScalaPB.

License

Notifications You must be signed in to change notification settings

micmorris/scalapb-openapi-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scalapb-openapi-plugin

A Protoc plugin that generates...

Using the plugin

To add the plugin to another project:

addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.3")

libraryDependencies += "com.example" %% "scalapb-openapi-plugin-codegen" % "0.1.0"

and the following to your build.sbt:

PB.targets in Compile := Seq(
  scalapb.gen() -> (sourceManaged in Compile).value / "scalapb",
  scalapb_openapi.gen() -> (sourceManaged in Compile).value / "scalapb"
)

Development and testing

Code structure:

  • core: contains the runtime library for this plugin
  • code-gen: contains the protoc plugin (code generator)
  • e2e: an integration test for the plugin

To test the plugin, within SBT:

> e2eJVM2_13/test

or

> e2eJVM2_12/test

About

Automatically generate OpenAPI YAML reading Protobuf files via ScalaPB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages