Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transpile ¶ added in v0.2.0
Transpile is a convenience function that takes an OpenAPI spec file and transpiles it into a Protocol Buffers v3 declaration, which is written to `dst`.
Options to the compiler and encoder can be passed using `WithCompilerOptions` and `WithEncoderOptions`, respectively
For more control, use `openapi`, `compiler`, and `protobuf` packages directly.
Types ¶
type Option ¶ added in v0.2.0
Option is used to pass options to several methods
func WithCompilerOptions ¶ added in v0.2.0
WithCompilerOptions allows you to specify a list of options to `Transpile`, which gets passed to the protobuf.Compile method
func WithEncoderOptions ¶ added in v0.2.0
WithEncoderOptions allows you to specify a list of options to `Transpile`, which gets passed to the protobuf.Encoder object.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
openapi2proto
command
|
|
Package compiler contains tools to take openapi.* definitions and compile them into protobuf.* structures.
|
Package compiler contains tools to take openapi.* definitions and compile them into protobuf.* structures. |
internal
|
|
Package openapi contains tools to read in OpenAPI specifications so that they can be passed to the openapi2proto compiler
|
Package openapi contains tools to read in OpenAPI specifications so that they can be passed to the openapi2proto compiler |
Package protobuf contains structures to represent a protobuf definition, and tools to create textual representation of the definition.
|
Package protobuf contains structures to represent a protobuf definition, and tools to create textual representation of the definition. |
Click to show internal directories.
Click to hide internal directories.