render

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package render marshals a spec and writes it to the desired format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Spec

func Spec(doc *spec.Swagger, cfg Config) (asJSON []byte, err error)

Spec marshals the specification document in the format asked for.

The JSON rendering is produced either way: it is what YAML is derived from, and what -validate checks, so a caller reading the document and a caller validating it are looking at the same bytes.

Types

type Config

type Config struct {
	CompactJSON bool
	WantsYAML   bool
	Output      string
	Stdout      io.Writer
}

Config holds the spec rendering settings.

Jump to

Keyboard shortcuts

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