Operations
OasOperationIndexInstance
What an Index projection gets from its base class, on this.
toOasOperationIndexBase returns the class. The types are named because deno doc and JSR cannot show the members of a class that a function returns.
Signature
import type { OasOperationIndexInstance } from '@skmtc/core'
interface OasOperationIndexInstance<EnrichmentType = undefined> extends SnippetBase, IndexProperties
The projection's identifier, export path, variant and enrichments.
The definitions inserted into this Index, in arrival order, which is the order the engine runs the operations in. It is the same in each run.
Add a definition. It throws when the definition breaks one of three rules: the Index holds only identifiers its language accepts, only definitions of the generator that owns it, and one definition per declaration key. Adding a definition again with the same generator key does nothing, so every subject may add what it needs without looking first.
The definitions that match, or undefined when none does. With no query, every definition.
Core can match on name only, so a query with a type matches nothing. A declaration's type is the language's, in its own identifier class, which core cannot name. A language package that has such a class overrides this method to match both.
The generation context providing access to OAS objects and utilities
Whether this generator has been skipped
Optional generator key - attribution input only
Position of the schema fragment this snippet was built from, as a StackTrail. Callers pass a stable snapshot (a clone taken at the call site - StackTrail is mutable, so an un-cloned reference would alias a trail that later append/remove calls could mutate). The empty trail (StackTrail.empty()) means "no single originating node", in which case the resolver uses the generator-key-derived pointer. Converted to a JSON Pointer string only at the resolver - never carried as a string here.