feat: description field for request parameters and headers (#4187)
* feat: key-value component added for reuse * chore: inspection result added * chore: add `HoppRESTRequest` schema `v7` * feat: add `description` for field for REST request headers * feat: add `description` for field for GraphQL request headers * fix: synchronization logic b/w bulk edit context and the default view - Add `HoppGQLRequest` schema `v6`. - Fix pre-existing issue with changes in bulk edit context not immediately reflecting in the default GQL request headers view. * feat: support importing `description` fields from external sources * test: fix failing tests * chore: include description field for computed headers Headers computed based on authorization info & inherited entries. * feat: add `description` field for headers at the collection level Add `HoppCollection` schema `v3`. * test: fix failing tests * ci: update tests workflow target branch trigger * chore: cleanup * chore: cleanup * chore: rely on type inference --------- Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ export const WORKSPACE_DEEPLY_NESTED_COLLECTIONS_WITH_AUTH_HEADERS_MOCK: Workspa
|
||||
[
|
||||
{
|
||||
id: "clx1ldkzs005t10f8rp5u60q7",
|
||||
data: '{"auth":{"token":"BearerToken","authType":"bearer","authActive":true},"headers":[{"key":"X-Test-Header","value":"Set at root collection","active":true}]}',
|
||||
data: '{"auth":{"token":"BearerToken","authType":"bearer","authActive":true},"headers":[{"key":"X-Test-Header","value":"Set at root collection","active":true,"description":""}]}',
|
||||
title: "CollectionA",
|
||||
parentID: null,
|
||||
folders: [
|
||||
@@ -245,6 +245,7 @@ export const TRANSFORMED_DEEPLY_NESTED_COLLECTIONS_WITH_AUTH_HEADERS_MOCK: HoppC
|
||||
key: "X-Test-Header",
|
||||
value: "Set at root collection",
|
||||
active: true,
|
||||
description: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -547,12 +548,12 @@ export const WORKSPACE_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK:
|
||||
export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK: HoppCollection[] =
|
||||
[
|
||||
{
|
||||
v: 2,
|
||||
v: CollectionSchemaVersion,
|
||||
id: "clx1kxvao005m10f8luqivrf1",
|
||||
name: "Collection with no authorization/headers set",
|
||||
folders: [
|
||||
{
|
||||
v: 2,
|
||||
v: CollectionSchemaVersion,
|
||||
id: "clx1kygjt005n10f8m1nkhjux",
|
||||
name: "folder-1",
|
||||
folders: [],
|
||||
@@ -584,7 +585,7 @@ export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK
|
||||
headers: [],
|
||||
},
|
||||
{
|
||||
v: 2,
|
||||
v: CollectionSchemaVersion,
|
||||
id: "clx1kym98005o10f8qg17t9o2",
|
||||
name: "folder-2",
|
||||
folders: [],
|
||||
@@ -622,7 +623,7 @@ export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK
|
||||
],
|
||||
},
|
||||
{
|
||||
v: 2,
|
||||
v: CollectionSchemaVersion,
|
||||
id: "clx1l2bu6005r10f8daynohge",
|
||||
name: "folder-3",
|
||||
folders: [],
|
||||
@@ -634,7 +635,7 @@ export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK
|
||||
headers: [],
|
||||
},
|
||||
{
|
||||
v: 2,
|
||||
v: CollectionSchemaVersion,
|
||||
id: "clx1l2eaz005s10f8loetbbeb",
|
||||
name: "folder-4",
|
||||
folders: [],
|
||||
|
||||
@@ -61,6 +61,7 @@ describe("getters", () => {
|
||||
active: true,
|
||||
key: "<<UNKNOWN_KEY>>",
|
||||
value: "<<UNKNOWN_VALUE>>",
|
||||
description: "",
|
||||
},
|
||||
],
|
||||
environmentVariables
|
||||
@@ -71,7 +72,7 @@ describe("getters", () => {
|
||||
test("Inactive list of meta-data", () => {
|
||||
expect(
|
||||
getEffectiveFinalMetaData(
|
||||
[{ active: false, key: "KEY", value: "<<PARAM>>" }],
|
||||
[{ active: false, key: "KEY", value: "<<PARAM>>", description: "" }],
|
||||
environmentVariables
|
||||
)
|
||||
).toSubsetEqualRight([]);
|
||||
@@ -80,7 +81,7 @@ describe("getters", () => {
|
||||
test("Active list of meta-data", () => {
|
||||
expect(
|
||||
getEffectiveFinalMetaData(
|
||||
[{ active: true, key: "PARAM", value: "<<PARAM>>" }],
|
||||
[{ active: true, key: "PARAM", value: "<<PARAM>>", description: "" }],
|
||||
environmentVariables
|
||||
)
|
||||
).toSubsetEqualRight([
|
||||
|
||||
Reference in New Issue
Block a user