Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAPIGenerator ¶
type OpenAPIGenerator struct {
Store *snapshot.SnapshotStore
}
OpenAPIGenerator builds an OpenAPI 3.0 spec from recorded snapshots.
func NewOpenAPIGenerator ¶
func NewOpenAPIGenerator(store *snapshot.SnapshotStore) *OpenAPIGenerator
NewOpenAPIGenerator creates an OpenAPIGenerator backed by the given store.
func (*OpenAPIGenerator) Generate ¶
func (g *OpenAPIGenerator) Generate() (map[string]interface{}, error)
Generate reads all snapshots and produces an OpenAPI 3.0 spec as a nested map.
func (*OpenAPIGenerator) InferPathParams ¶
func (g *OpenAPIGenerator) InferPathParams(urls []string) []PathTemplate
InferPathParams takes a list of URL paths with the same segment count and detects segments that vary across the set, replacing them with parameter placeholders.
type PathTemplate ¶
PathTemplate represents a parameterized URL path.
Click to show internal directories.
Click to hide internal directories.