ir

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

ir/ir.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Extract(ctx context.Context) (*Document, error)
}

Adapter turns "the contract a source exposes" into a Document. One implementation per source: a code framework, or a published spec file.

type Document

type Document struct {
	Version string           // exact source version, e.g. "3.0.3" or "3.1.0" (not yet canonicalized)
	Raw     []byte           // the source's serialized bytes as-is (YAML or JSON, as produced/published)
	Model   *v3high.Document // parsed model for structural traversal (walking paths, schemas)
}

Document is our canonical intermediate representation (IR). Everything downstream — canonicalizer, diff, agents — consumes ONLY this. Note: an adapter's output is OpenAPI 3.x; the canonicalizer normalizes both sides to 3.1 in the core, just before diff (never inside an adapter).

Jump to

Keyboard shortcuts

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