This repository has been archived by the owner on Feb 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed generation of json schema file
- Loading branch information
Tiliavir
committed
Aug 18, 2018
1 parent
da32716
commit 38a98f6
Showing
11 changed files
with
611 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
export interface INavigationNode { | ||
export interface IBreadcrumbNode { | ||
referencedFile: string; | ||
title: string; | ||
} | ||
interface INavigationNode { | ||
title: string; | ||
/** | ||
* Values can be any string. Special treatment for: | ||
* - "none" : excluded from all navigations except "allplain" | ||
* - "top" : default top navigation | ||
*/ | ||
navigation?: NavigationType | "none"; | ||
} | ||
export interface IBranch extends INavigationNode { | ||
children: ConfigNode[]; | ||
} | ||
export interface IStructureNode extends INavigationNode { | ||
children?: ConfigNode[]; | ||
referencedFile: string; | ||
} | ||
declare type ConfigNode = IStructureNode | IBranch; | ||
/** | ||
* Array of (child) elements in the site structure tree. | ||
*/ | ||
export declare type StructureConfig = ConfigNode[]; | ||
export declare type NavigationType = string | "allplain" | "top"; | ||
export declare class Navigation { | ||
private fileExtension; | ||
private breadcrumbStartNode; | ||
private structure; | ||
private breadcrumbs; | ||
constructor(s: any, fileExtension?: string, breadcrumbStartNode?: INavigationNode); | ||
constructor(s: any, fileExtension?: string, breadcrumbStartNode?: IBreadcrumbNode); | ||
private writeNavigationEntry; | ||
private renderBreadcrumb; | ||
private initBreadcrumbs; | ||
writeNavigation(type: NavigationType, writeHtml?: boolean, excludedFromAllPlain?: string[]): string; | ||
getBreadcrumb(referencedFile: string, writeHtml?: boolean): string; | ||
} | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"IBranch": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"children": { | ||
"items": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/IBranch" | ||
}, | ||
{ | ||
"$ref": "#/definitions/IStructureNode" | ||
} | ||
] | ||
}, | ||
"title": "children", | ||
"type": "array" | ||
}, | ||
"navigation": { | ||
"description": "Values can be any string. Special treatment for:\n- \"none\" : excluded from all navigations except \"allplain\"\n- \"top\" : default top navigation", | ||
"title": "navigation", | ||
"type": "string" | ||
}, | ||
"title": { | ||
"title": "title", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"children", | ||
"title" | ||
], | ||
"title": "IBranch", | ||
"type": "object" | ||
}, | ||
"IStructureNode": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"children": { | ||
"items": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/IBranch" | ||
}, | ||
{ | ||
"$ref": "#/definitions/IStructureNode" | ||
} | ||
] | ||
}, | ||
"title": "children", | ||
"type": "array" | ||
}, | ||
"navigation": { | ||
"description": "Values can be any string. Special treatment for:\n- \"none\" : excluded from all navigations except \"allplain\"\n- \"top\" : default top navigation", | ||
"title": "navigation", | ||
"type": "string" | ||
}, | ||
"referencedFile": { | ||
"title": "referencedFile", | ||
"type": "string" | ||
}, | ||
"title": { | ||
"title": "title", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"referencedFile", | ||
"title" | ||
], | ||
"title": "IStructureNode", | ||
"type": "object" | ||
} | ||
}, | ||
"description": "Array of (child) elements in the site structure tree.", | ||
"items": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/IBranch" | ||
}, | ||
{ | ||
"$ref": "#/definitions/IStructureNode" | ||
} | ||
] | ||
}, | ||
"type": "array" | ||
} | ||
|
Oops, something went wrong.