mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-28 10:53:13 +01:00
Bugfix/openapispec empty tag (#2935)
* test: added test for self closing tags in xml-json parser * fix: allows import of openapispec with empty string as tags --------- Co-authored-by: Anusree Subash <anusree@usebruno.com>
This commit is contained in:
parent
3dfb27d447
commit
f31c997fed
@ -283,7 +283,9 @@ const groupRequestsByTags = (requests) => {
|
|||||||
each(requests, (request) => {
|
each(requests, (request) => {
|
||||||
let tags = request.operationObject.tags || [];
|
let tags = request.operationObject.tags || [];
|
||||||
if (tags.length > 0) {
|
if (tags.length > 0) {
|
||||||
let tag = tags[0]; // take first tag
|
let tag = tags[0].trim(); // take first tag and trim whitespace
|
||||||
|
|
||||||
|
if (tag) {
|
||||||
if (!_groups[tag]) {
|
if (!_groups[tag]) {
|
||||||
_groups[tag] = [];
|
_groups[tag] = [];
|
||||||
}
|
}
|
||||||
@ -291,6 +293,9 @@ const groupRequestsByTags = (requests) => {
|
|||||||
} else {
|
} else {
|
||||||
ungrouped.push(request);
|
ungrouped.push(request);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ungrouped.push(request);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let groups = Object.keys(_groups).map((groupName) => {
|
let groups = Object.keys(_groups).map((groupName) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user