Skip to content

Commit b108208

Browse files
committed
Reintroduce the new "canonicalReference" to the .api.json file format
1 parent efaf045 commit b108208

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apps/api-extractor-model/src/items/ApiItem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface IApiItemOptions {
4646

4747
export interface IApiItemJson {
4848
kind: ApiItemKind;
49+
canonicalReference: string;
4950
}
5051

5152
// PRIVATE - Allows ApiItemContainerMixin to assign the parent.
@@ -85,6 +86,7 @@ export class ApiItem {
8586
/** @virtual */
8687
public serializeInto(jsonObject: Partial<IApiItemJson>): void {
8788
jsonObject.kind = this.kind;
89+
jsonObject.canonicalReference = this.canonicalReference.toString();
8890
}
8991

9092
/**

apps/api-extractor-model/src/model/DeserializerContext.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export enum ApiJsonSchemaVersion {
1313
V_1001 = 1001,
1414

1515
/**
16-
* Remove "canonicalReference" field. This field was for diagnostic purposes only and was never deserialized.
16+
* Change the "canonicalReference" field to use the experimental new TSDoc declaration reference notation.
17+
*
18+
* This is not a breaking change because this field is never deserialized; it is provided for informational
19+
* purposes only.
1720
*/
1821
V_1002 = 1002,
1922

0 commit comments

Comments
 (0)