CLAUDE.md@deno/core/dsl/operation/oas · git:20260515.f0453ae · 2026-05-15 · sha256 f49ca6cc0233c6f7
CLAUDE.md@deno/core/dsl/operation/oas git:20260515.f0453aeA
Immutable. This exact content is served forever at /api/v1/blob/f49ca6cc0233c6f7.
# core/dsl/operation/oas — directory guide
This directory contains the OAS-operation half of the projection
machinery. Files:
- `OasOperationProjectionBase.ts` — runtime base class. Subclasses
extend it. Carries `settings: ContentSettings<E>` (including
`settings.variant`) and `generatorKey`.
- `toOasOperationProjectionBase.ts` — factory. Builds a class with
static `toIdentifier` / `toExportPath` / `toEnrichments` /
`isSupported` / `id` / `type`. The constructor reads
`args.settings.variant` and threads it into the
`toOasOperationGeneratorKey` call so the resulting Definition's
`generatorKey` carries the variant.
- `toOasOperationEntry.ts` — pipeline-side factory. Wraps user's
`isSupported` / `transform` etc. in a config object. The
`isSupported` wrapper does its own enrichment-path walk via
`lodash-es/get(..., \`enrichments.${id}.${path}.${method}.${variant}\`)`
before calling the user's predicate.
- `OasOperationDriver.ts` — the insertion lifecycle (compose
`ContentSettings`, look up via `findDefinition`, integrity-check
via `affirmDefinition`, register the Definition, register the
import). Variant-related entry points:
- Constructor takes a `variant: string` arg and stores it on the
instance.
- `assertPeerVariantExists` runs before `toOperationContentSettings`
— throws if the caller asked for a non-`'main'` variant the peer
doesn't declare.
- `affirmDefinition` builds the call's `generatorKey` with variant
in the 4th segment; the cache key uniqueness invariant is
enforced here.
- `types.ts` — arg shapes. Every `To*Args` and `Transform*Args`
carries `variant: string`.
**Variants-aware vs unaware:**
- *Unaware*: destructure `variant` in `toExportPath` (since the body
calls `this.toIdentifier({…, variant})`), ignore it in
`toIdentifier`. Engine still dispatches with `variant: 'main'` for
every operation.
- *Aware*: `toIdentifier` folds variant into the name via
`withVariant(base, variant)` from `@/helpers/withVariant.ts`.
`toExportPath` inherits the suffix through the
`this.toIdentifier({…, variant})` call.
Tests pinning variant invariants: `OasOperationDriver.test.ts` →
"Variant validation"; cross-package tests in `core/context/`.
Concept doc: `docs/concepts/variants.md`. Skill: `docs/skills/skmtc-generator/SKILL.md`.
---
<claude-mem-context>
# Recent Activity
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
### May 6, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #19181 | 9:27 PM | 🔵 | Generator registration architecture separates artifact definitions from import statements | ~461 |
### May 11, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #20459 | 7:04 PM | 🔄 | OasOperationDriver simplified using Identifier.toImport pattern | ~540 |
| #20457 | " | 🔄 | Completed task 3 updating driver implementations | ~373 |
| #20430 | 7:01 PM | ⚖️ | Add toImport method to Identifier class for consistent ImportNameArg construction | ~494 |
| #20428 | 7:00 PM | 🔵 | OasOperationDriver automatically registers imports with isType flag based on identifier entity type | ~537 |
| #20419 | 6:59 PM | 🔵 | isType flag implementation across core DSL import system | ~592 |
### May 12, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #20928 | 2:20 PM | 🔵 | Critical enrichment routing path discrepancy discovered in documentation | ~940 |
| #20654 | 8:47 AM | 🔵 | SKMTC driver pattern for projection lifecycle and definition caching | ~680 |
</claude-mem-context>