Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
"$ref": "CodeDiagnostic.json"
},
"description": "Add any system generated comments. Each comment is linked to review line ID"
},
"Navigation": {
"type": "array",
"items": {
"$ref": "NavigationItem.json"
},
"description": "Navigation items are used to create a tree view in the navigation panel. Each navigation item is linked to a review line ID. this is optional.\nIf navigation items are not provided then navigation panel will be automatically generated using the review lines. Navigation items should be provided only if you want to customize the navigation panel."
}
},
"required": [
Expand Down Expand Up @@ -262,6 +269,43 @@
3,
4
]
},
"NavigationItem": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "NavigationItem.json",
"type": "object",
"properties": {
"Text": {
"type": "string"
},
"NavigationId": {
"type": "string"
},
"ChildItems": {
"type": "array",
"items": {
"$ref": "NavigationItem.json"
}
},
"Tags": {
"$ref": "#/$defs/RecordString"
}
},
"required": [
"Text",
"NavigationId",
"ChildItems",
"Tags"
],
"$defs": {
"RecordString": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
13 changes: 12 additions & 1 deletion tools/apiview/parsers/apiview-treestyle-parser-schema/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ model CodeFile {
ReviewLines: Array<ReviewLine>;
/** Add any system generated comments. Each comment is linked to review line ID */
Diagnostics?: Array<CodeDiagnostic>;
/** Navigation items are used to create a tree view in the navigation panel. Each navigation item is linked to a review line ID. this is optional.
* If navigation items are not provided then navigation panel will be automatically generated using the review lines. Navigation items should be provided only if you want to customize the navigation panel.
*/
Navigation?: Array<NavigationItem>;
}


Expand Down Expand Up @@ -100,4 +104,11 @@ enum CodeDiagnosticLevel {
/** Fatal level diagnostic will block API review approval and it will show an error message to the user. Approver will have to
* override fatal level system comments before approving a review.*/
Fatal: 4
}
}

model NavigationItem {
Text: string;
NavigationId: string;
ChildItems: Array<NavigationItem>;
Tags: Record<string>;
}