Skip to content

Commit 71b13e0

Browse files
gjtorikianclaude
andcommitted
feat(node): remap DirectoryState wire values to active/inactive
Configure the Node emitter's enumValueRemaps so DirectoryState surfaces the SDK's historical active/inactive (from wire linked/unlinked). Pairs with the oagen-emitters enum wire-companion feature so DirectoryResponse.state is typed DirectoryStateResponse. main already owns DirectorySync + declares the hand-owned generics; this closes the missing remap so regeneration does not drop the linked->active translation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5cdd20e commit 71b13e0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

oagen.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ const config: OagenConfig = {
5858
],
5959
regenerateOwnedTests: true,
6060
operationOverrides: nodeOperationOverrides,
61+
// The spec reports raw directory states (linked/unlinked/...), but the
62+
// Node SDK has always surfaced linked→active / unlinked→inactive. Generate
63+
// that translation: the emitter emits the domain type (DirectoryState),
64+
// the raw-wire companion (DirectoryStateResponse), the wire→domain
65+
// deserializer, and tests — instead of hand-owning it.
66+
enumValueRemaps: {
67+
DirectoryState: { linked: 'active', unlinked: 'inactive' },
68+
},
6169
},
6270
},
6371
transformSpec,

0 commit comments

Comments
 (0)