-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathmetadata.ts
More file actions
44 lines (42 loc) · 1.84 KB
/
Copy pathmetadata.ts
File metadata and controls
44 lines (42 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
export interface TypeSpecMetadata {
/** Fully-qualified namespace, e.g. Contoso.Example. */
namespace: string;
/** Documentation from @doc decorator. */
documentation?: string;
/** Type of service: 'data' for data plane, 'management' for management plane. */
type: "data" | "management";
}
export interface LanguagePackageMetadata {
/** Name of the emitter entry in tspconfig (package or path). */
emitterName: string;
/** Package/Binary identifier configured for the language emitter. */
packageName?: string;
/** Service namespace configured for the language emitter. */
namespace?: string;
/** Output directory for the emitter. */
outputDir?: string;
/** Flavor of the emitter (e.g., 'azure'). */
flavor?: string;
/** Service directory path for this language emitter. */
serviceDir?: string;
/**
* Resolved API version for this emitter.
* - `"all"` when configured for all versions
* - `"multiple-versions"` for multi-service configs with more than one API version entry
* - An actual resolved version string (e.g. `"2023-10-01"`) for a single version
* - `undefined` when no API version information is available
*/
apiVersion?: string;
}
export interface MetadataSnapshot {
/** Semantic version for the metadata payload schema. */
emitterVersion: string;
/** ISO timestamp to simplify debugging when metadata was produced. */
generatedAt: string;
/** TypeSpec-level metadata (namespace, documentation, type). */
typespec: TypeSpecMetadata;
/** Per-language package metadata extracted from tspconfig, keyed by normalized language name. Each language maps to an array of emitter configs. Emitters that cannot be linked to a known language are grouped under "unknown". */
languages: Record<string, LanguagePackageMetadata[]>;
/** Absolute tspconfig path when available. */
sourceConfigPath?: string;
}