genopenapi

package
v0.0.0-...-505c20f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Overview

Package genopenapi provides a code generator for OpenAPI v2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddErrorDefs

func AddErrorDefs(reg *descriptor.Registry) error

AddErrorDefs Adds google.rpc.Status and google.protobuf.Any to registry (used for error-related API responses)

func LookupNamingStrategy

func LookupNamingStrategy(strategyName string) func([]string) map[string]string

LookupNamingStrategy looks up the given naming strategy and returns the naming strategy function for it. The naming strategy function takes in the list of all fully-qualified proto message names, and returns a mapping from fully-qualified name to OpenAPI name.

func New

func New(reg *descriptor.Registry) gen.Generator

New returns a new generator which generates grpc gateway files.

Types

type GeneratorOptions

type GeneratorOptions struct {
	Registry       *descriptor.Registry
	RecursiveDepth int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL