Compare commits

...

2 Commits

Author SHA1 Message Date
nivedin
9a6451a601 chore: update i18n strings 2023-12-15 02:38:49 +05:30
nivedin
8d5ad2411b fix: fallback for importers and fix spelling 2023-12-15 02:38:49 +05:30
5 changed files with 19 additions and 7 deletions

View File

@@ -139,9 +139,11 @@
"generate_token": "Generate Token", "generate_token": "Generate Token",
"graphql_headers": "Authorization Headers are sent as part of the payload to connection_init", "graphql_headers": "Authorization Headers are sent as part of the payload to connection_init",
"include_in_url": "Include in URL", "include_in_url": "Include in URL",
"inherited_from": "Inherited from {auth} from Parent Collection {collection} ",
"learn": "Learn how", "learn": "Learn how",
"pass_key_by": "Pass by", "pass_key_by": "Pass by",
"password": "Password", "password": "Password",
"save_to_inherit": "Please save this request in any collection to inherit the authorization",
"token": "Token", "token": "Token",
"type": "Authorization Type", "type": "Authorization Type",
"username": "Username", "username": "Username",
@@ -173,7 +175,7 @@
"name_length_insufficient": "Collection name should be at least 3 characters long", "name_length_insufficient": "Collection name should be at least 3 characters long",
"new": "New Collection", "new": "New Collection",
"order_changed": "Collection Order Updated", "order_changed": "Collection Order Updated",
"properties":"Colection Properties", "properties":"Collection Properties",
"properties_updated": "Collection Properties Updated", "properties_updated": "Collection Properties Updated",
"renamed": "Collection renamed", "renamed": "Collection renamed",
"request_in_use": "Request in use", "request_in_use": "Request in use",
@@ -975,4 +977,4 @@
"team": "Team Workspace", "team": "Team Workspace",
"title": "Workspaces" "title": "Workspaces"
} }
} }

View File

@@ -154,13 +154,17 @@
</div> </div>
<div v-if="auth.authType === 'inherit'" class="p-4"> <div v-if="auth.authType === 'inherit'" class="p-4">
<span v-if="inheritedProperties?.auth"> <span v-if="inheritedProperties?.auth">
Inherited {{
{{ getAuthName(inheritedProperties.auth.inheritedAuth.authType) }} t("authorization.inherited_from", {
from Parent Collection {{ inheritedProperties?.auth.parentName }} auth: getAuthName(
inheritedProperties.auth.inheritedAuth.authType
),
collection: inheritedProperties?.auth.parentName,
})
}}
</span> </span>
<span v-else> <span v-else>
Please save this request in any collection to inherit the {{ t("authorization.save_to_inherit") }}
authorization
</span> </span>
</div> </div>
<div v-if="auth.authType === 'bearer'"> <div v-if="auth.authType === 'bearer'">

View File

@@ -199,6 +199,8 @@ const getHoppFolder = (
getHoppFolder(f, resources) getHoppFolder(f, resources)
), ),
requests: getRequestsIn(folderRes, resources).map(getHoppRequest), requests: getRequestsIn(folderRes, resources).map(getHoppRequest),
auth: { authType: "inherit", authActive: true },
headers: [],
}) })
const getHoppCollections = (doc: InsomniaDoc) => const getHoppCollections = (doc: InsomniaDoc) =>

View File

@@ -592,6 +592,8 @@ const convertOpenApiDocToHopp = (
name, name,
folders: [], folders: [],
requests: paths, requests: paths,
auth: { authType: "inherit", authActive: true },
headers: [],
}), }),
]) ])
} }

View File

@@ -292,6 +292,8 @@ const getHoppFolder = (ig: ItemGroup<Item>): HoppCollection =>
A.map(getHoppFolder) A.map(getHoppFolder)
), ),
requests: pipe(ig.items.all(), A.filter(isPMItem), A.map(getHoppRequest)), requests: pipe(ig.items.all(), A.filter(isPMItem), A.map(getHoppRequest)),
auth: { authType: "inherit", authActive: true },
headers: [],
}) })
export const getHoppCollection = (coll: PMCollection) => getHoppFolder(coll) export const getHoppCollection = (coll: PMCollection) => getHoppFolder(coll)