Docs@skmtc/core

Operations

TYPE

OasOperationProjectionBaseConfig

@skmtc/core 0.63.4

Configuration for toOasOperationProjectionBase.

Generic over the language L: a language veneer parameterizes this config (OasOperationProjectionBaseConfig<E, KtIdentifierType>) so toIdentifierType's return tightens to that language's type vocabulary - no recast.

Signature

import type { OasOperationProjectionBaseConfig } from '@skmtc/core'

type OasOperationProjectionBaseConfig<EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType, ProjectionOptions = undefined> = { ... } & OasOperationFileOrIndex<EnrichmentType, ProjectionOptions>

Properties

id, string required
toIdentifierName, (args: ToOasOperationIdentifierNameArgs<EnrichmentType, ProjectionOptions>) => string required

Pure: the cache-key name (the cache-check path runs this).

toIdentifierType, (operation: OasOperation, context: GenerateContextType) => IdType required

Context-aware, overridable: the non-name parts of the identifier, derived from the operation/schema. Runs only on cache-miss. Returns this language's XxIdentifierType (IdType; the loose type: string by default); the tightening rides the type argument.

toEnrichmentDefaults, (args: ToEnrichmentsArgs) => EnrichmentType | undefined

Optional: compute the DEFAULT enrichment values for an operation from its schema - the seed the CMS persists and the user then edits (vs the entry's toEnrichments, which READS already-authored values). Returns the { subject, generator, stack } umbrella; a generator typically fills only subject (per-operation defaults) and leaves the run-constant generator / stack scopes undefined. Omitted → the derived static returns undefined (the generator advertises no defaults).