swaggercombine

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Combine

func Combine(ctx context.Context, c Config, out string) error

Combine combines openapi specs into one and saves to out path. specs is a spec id-fs path pair.

Types

type API

type API struct {
	ID           string       `json:"-"`
	URL          string       `json:"url"`
	OperationIDs OperationIDs `json:"operationIds"`
	Dereference  struct {
		Circular string `json:"circular"`
	} `json:"dereference"`
}

type Config

type Config struct {
	Swagger string `json:"swagger"`
	Info    Info   `json:"info"`
	APIs    []API  `json:"apis"`
}

Config represent swagger-combine config.

func (*Config) AddSpec

func (c *Config) AddSpec(id, path string) error

AddSpec adds a new OpenAPI spec to Config by path in the fs and unique id of spec.

type Info

type Info struct {
	Title       string `json:"title"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type OperationIDs

type OperationIDs struct {
	Rename map[string]string `json:"rename"`
}

Jump to

Keyboard shortcuts

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