mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
Fix menutree building
This commit is contained in:
parent
f0fe212c24
commit
060119673f
|
@ -232,6 +232,7 @@ export class SchemaHelper {
|
||||||
for (let tag of definedTags) {
|
for (let tag of definedTags) {
|
||||||
tag2MethodMapping[tag.name] = {
|
tag2MethodMapping[tag.name] = {
|
||||||
'description': tag.description,
|
'description': tag.description,
|
||||||
|
'name': tag.name,
|
||||||
'x-traitTag': tag['x-traitTag'],
|
'x-traitTag': tag['x-traitTag'],
|
||||||
'methods': []
|
'methods': []
|
||||||
};
|
};
|
||||||
|
@ -244,7 +245,6 @@ export class SchemaHelper {
|
||||||
let methodInfo = paths[path][method];
|
let methodInfo = paths[path][method];
|
||||||
let tags = methodInfo.tags;
|
let tags = methodInfo.tags;
|
||||||
|
|
||||||
//TODO: mb need to do something cleverer
|
|
||||||
if (!tags || !tags.length) {
|
if (!tags || !tags.length) {
|
||||||
tags = [''];
|
tags = [''];
|
||||||
}
|
}
|
||||||
|
@ -252,10 +252,10 @@ export class SchemaHelper {
|
||||||
let methodSummary = SchemaHelper.methodSummary(methodInfo);
|
let methodSummary = SchemaHelper.methodSummary(methodInfo);
|
||||||
for (let tag of tags) {
|
for (let tag of tags) {
|
||||||
let tagDetails = tag2MethodMapping[tag];
|
let tagDetails = tag2MethodMapping[tag];
|
||||||
if (!tagDetails) {
|
if (!tag2MethodMapping[tag]) {
|
||||||
tagDetails = {
|
tagDetails = {
|
||||||
name: tag,
|
name: tag,
|
||||||
empty: !tag
|
empty: tag === ''
|
||||||
};
|
};
|
||||||
tag2MethodMapping[tag] = tagDetails;
|
tag2MethodMapping[tag] = tagDetails;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user