operation

package
v0.0.0-...-3d40d98 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package operation lowers what a document says an API does: its path items, webhooks and callbacks, the parameters merged onto each operation, and the content of every request body, response and header.

It sits above the schema walk and reaches down into it for every type position it meets, and above auth for the requirements an operation names. It reaches nothing above itself: the compiler assembles a Document from what LowerService returns rather than the walk writing into one.

The recursion here is callbacks — an operation may declare callbacks, each a path item holding operations of its own — which is why lowerOperation, lowerCallbacks and lowerCallbackOps cannot be separated. internal/archtest pins that set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LowerService

func LowerService(ctx context.Context, c lowering.Ctx, ts *compile.Types, anchors *schema.AnchorIndex, operationIDs map[string]string) (ir.Service, []ir.TagDef, []ir.Diagnostic)

LowerService lowers one document into a single Service: its identity and docs, the declared tag registry, and every path, webhook, and callback operation placed into groups per the configured grouping strategy (ir-design §7.1).

ctx bounds the walk in time, for the reason LowerComponentSchemas takes one: a document mounts as many paths and webhooks as it likes. Cancellation stops the two loops between path items and returns the groups filled so far; the compiler's run sees ctx.Err() at the phase boundary after this and refuses, rather than assembling a Document out of them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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