specgen

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package specgen writes the specs as the repository keeps them, for the endpoint generator and the behavior generator alike: the spec of each group, and the full spec of the API, which joins them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(
	doc *openapi3.T,
	header string,
) ([]byte, error)

Encode is doc as YAML under the comment header, such as "Code generated by ... DO NOT EDIT.". The document goes through JSON first, so each value, an extension included, is written as the spec's JSON form has it, and the keys are in order.

func Full

func Full(
	docs []*openapi3.T,
	header string,
) ([]byte, error)

Full is the spec of the API, from the spec of each group in docs, under the comment header. Each group keeps its paths and its schemas in the order of docs. A tag gets the title of its group in front, with _ for each space, such as Agent_Management_API_agent_operations. The tags are in the order of the areas of area.All, and in the order of docs in an area. x-tagGroups puts each tag under the label of its area, the x-osapi-area of the tag, so the API reference groups the tags as the UI's tabs and the SDK's pages do. A tag with no area of area.All is an error. x-osapi-areas lists the areas, with the label and in the order of area.All. The UI's client files take their names from the tags. The shared ErrorResponse schema is first. Two groups that serve one path, or that give one schema or parameter two shapes, are an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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