Projections and snippets
TYPE
@skmtc/core 0.63.4GeneratorKey
Union type of all possible generator key types.
Generator keys serve as unique identifiers for different types of code generators in the SKMTC system. They enable tracking, caching, and dependency management between generated artifacts.
Signature
import type { GeneratorKey } from '@skmtc/core'
type GeneratorKey =
| OasOperationGeneratorKey
| WebhookGeneratorKey
| ModelGeneratorKey
| IndexGeneratorKey
| GeneratorOnlyKeyExamples
Example
// OAS operation generator key
const opKey: GeneratorKey = toOasOperationGeneratorKey({
generatorId: 'api-client',
path: '/users/{id}',
method: 'get'
});
// Model generator key
const modelKey: GeneratorKey = toModelGeneratorKey({
generatorId: 'typescript-types',
ref: { refName: 'User', refPath: '#/components/schemas' },
variant: 'main'
});
// Generator-only key
const globalKey: GeneratorKey = toGeneratorOnlyKey({
generatorId: 'api-config'
});