Prefix menu and sections with markdown as that is all the should now be defined

This commit is contained in:
Fabio Berger
2018-08-01 21:00:45 +02:00
parent e5b93d1f02
commit 2494af99aa
12 changed files with 85 additions and 130 deletions

View File

@@ -28,21 +28,16 @@ export class DocsInfo {
public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
public typeConfigs: DocsInfoTypeConfigs;
private readonly _docsInfo: DocsInfoConfig;
constructor(config: DocsInfoConfig) {
this.id = config.id;
this.type = config.type;
this.menu = config.menu;
this.menu = config.markdownMenu;
this.displayName = config.displayName;
this.packageUrl = config.packageUrl;
this.sections = config.sections;
this.sections = config.markdownSections;
this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion;
this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId;
this.typeConfigs = config.typeConfigs;
this._docsInfo = config;
}
public getMenu(selectedVersion?: string): { [section: string]: string[] } {
return this._docsInfo.menu;
}
public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection {
const menuSubsectionsBySection = {} as MenuSubsectionsBySection;

View File

@@ -7,8 +7,8 @@ export interface DocsInfoConfig {
type: SupportedDocJson;
displayName: string;
packageUrl: string;
menu: DocsMenu;
sections: SectionsMap;
markdownMenu: DocsMenu;
markdownSections: SectionsMap;
sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
typeConfigs?: DocsInfoTypeConfigs;