mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-25 13:45:52 +00:00
Tag support in jsonToToml and tomlToJson
This commit is contained in:
@@ -47,6 +47,10 @@ const jsonToToml = (json) => {
|
||||
}
|
||||
};
|
||||
|
||||
if (json.tags && json.tags.length) {
|
||||
formattedJson.tags = get(json, 'tags', []);
|
||||
}
|
||||
|
||||
if (json.headers && json.headers.length) {
|
||||
const hasDuplicateHeaders = keyValPairHasDuplicateKeys(json.headers);
|
||||
const hasReservedHeaders = keyValPairHasReservedKeys(json.headers);
|
||||
|
||||
@@ -24,6 +24,10 @@ const tomlToJson = (toml) => {
|
||||
}
|
||||
};
|
||||
|
||||
if (json.tags && json.tags.length) {
|
||||
formattedJson.tags = get(json, 'tags', []);
|
||||
}
|
||||
|
||||
if (json.headers) {
|
||||
formattedJson.headers = [];
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"type": "http",
|
||||
"seq": 1
|
||||
},
|
||||
"tags": ["foo", "bar"],
|
||||
"http": {
|
||||
"method": "GET",
|
||||
"url": "https://reqres.in/api/users"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
tags = [ 'foo', 'bar' ]
|
||||
|
||||
[meta]
|
||||
name = 'Get users'
|
||||
type = 'http'
|
||||
|
||||
Reference in New Issue
Block a user