Skip to content

Commit e0459d6

Browse files
author
Lasim
committed
Refactor API routes to use centralized /api prefix and update route paths for roles, teams, and users
- Centralized API routes under /api prefix in index.ts - Updated route paths in roles, teams, and users to remove /api prefix - Enhanced CloudCredentialsService to include user information in credential responses - Updated frontend components to handle new credential detail view and manage actions - Added new CredentialDetail.vue view for displaying credential details - Implemented user permissions for managing cloud credentials - Updated translations for credential detail view
1 parent 1d58ee4 commit e0459d6

File tree

21 files changed

+984
-136
lines changed

21 files changed

+984
-136
lines changed

services/backend/api-spec.json

Lines changed: 108 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7397,7 +7397,7 @@
73977397
}
73987398
}
73997399
},
7400-
"/teams/{teamId}/cloud-providers": {
7400+
"/api/teams/{teamId}/cloud-providers": {
74017401
"get": {
74027402
"summary": "List available cloud providers",
74037403
"tags": [
@@ -7609,7 +7609,7 @@
76097609
}
76107610
}
76117611
},
7612-
"/teams/{teamId}/cloud-credentials": {
7612+
"/api/teams/{teamId}/cloud-credentials": {
76137613
"get": {
76147614
"summary": "List team cloud credentials",
76157615
"tags": [
@@ -7707,7 +7707,32 @@
77077707
}
77087708
},
77097709
"createdBy": {
7710-
"type": "string"
7710+
"anyOf": [
7711+
{
7712+
"type": "object",
7713+
"properties": {
7714+
"id": {
7715+
"type": "string"
7716+
},
7717+
"username": {
7718+
"type": "string"
7719+
},
7720+
"email": {
7721+
"type": "string"
7722+
}
7723+
},
7724+
"required": [
7725+
"id",
7726+
"username",
7727+
"email"
7728+
],
7729+
"additionalProperties": false
7730+
},
7731+
{
7732+
"type": "string"
7733+
}
7734+
],
7735+
"description": "User object when available, fallback to user ID"
77117736
},
77127737
"createdAt": {
77137738
"type": "string"
@@ -7955,7 +7980,32 @@
79557980
}
79567981
},
79577982
"createdBy": {
7958-
"type": "string"
7983+
"anyOf": [
7984+
{
7985+
"type": "object",
7986+
"properties": {
7987+
"id": {
7988+
"type": "string"
7989+
},
7990+
"username": {
7991+
"type": "string"
7992+
},
7993+
"email": {
7994+
"type": "string"
7995+
}
7996+
},
7997+
"required": [
7998+
"id",
7999+
"username",
8000+
"email"
8001+
],
8002+
"additionalProperties": false
8003+
},
8004+
{
8005+
"type": "string"
8006+
}
8007+
],
8008+
"description": "User object when available, fallback to user ID"
79598009
},
79608010
"createdAt": {
79618011
"type": "string"
@@ -8135,7 +8185,7 @@
81358185
}
81368186
}
81378187
},
8138-
"/teams/{teamId}/cloud-credentials/{credentialId}": {
8188+
"/api/teams/{teamId}/cloud-credentials/{credentialId}": {
81398189
"get": {
81408190
"summary": "Get cloud credential by ID",
81418191
"tags": [
@@ -8239,7 +8289,32 @@
82398289
}
82408290
},
82418291
"createdBy": {
8242-
"type": "string"
8292+
"anyOf": [
8293+
{
8294+
"type": "object",
8295+
"properties": {
8296+
"id": {
8297+
"type": "string"
8298+
},
8299+
"username": {
8300+
"type": "string"
8301+
},
8302+
"email": {
8303+
"type": "string"
8304+
}
8305+
},
8306+
"required": [
8307+
"id",
8308+
"username",
8309+
"email"
8310+
],
8311+
"additionalProperties": false
8312+
},
8313+
{
8314+
"type": "string"
8315+
}
8316+
],
8317+
"description": "User object when available, fallback to user ID"
82438318
},
82448319
"createdAt": {
82458320
"type": "string"
@@ -8510,7 +8585,32 @@
85108585
}
85118586
},
85128587
"createdBy": {
8513-
"type": "string"
8588+
"anyOf": [
8589+
{
8590+
"type": "object",
8591+
"properties": {
8592+
"id": {
8593+
"type": "string"
8594+
},
8595+
"username": {
8596+
"type": "string"
8597+
},
8598+
"email": {
8599+
"type": "string"
8600+
}
8601+
},
8602+
"required": [
8603+
"id",
8604+
"username",
8605+
"email"
8606+
],
8607+
"additionalProperties": false
8608+
},
8609+
{
8610+
"type": "string"
8611+
}
8612+
],
8613+
"description": "User object when available, fallback to user ID"
85148614
},
85158615
"createdAt": {
85168616
"type": "string"
@@ -8878,7 +8978,7 @@
88788978
}
88798979
}
88808980
},
8881-
"/teams/{teamId}/cloud-credentials/search": {
8981+
"/api/teams/{teamId}/cloud-credentials/search": {
88828982
"get": {
88838983
"summary": "Search team cloud credentials",
88848984
"tags": [

services/backend/api-spec.yaml

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5166,7 +5166,7 @@ paths:
51665166
- error
51675167
additionalProperties: false
51685168
description: Internal Server Error
5169-
/teams/{teamId}/cloud-providers:
5169+
/api/teams/{teamId}/cloud-providers:
51705170
get:
51715171
summary: List available cloud providers
51725172
tags:
@@ -5311,7 +5311,7 @@ paths:
53115311
- error
53125312
additionalProperties: false
53135313
description: Internal Server Error
5314-
/teams/{teamId}/cloud-credentials:
5314+
/api/teams/{teamId}/cloud-credentials:
53155315
get:
53165316
summary: List team cloud credentials
53175317
tags:
@@ -5384,7 +5384,22 @@ paths:
53845384
- secret
53855385
additionalProperties: false
53865386
createdBy:
5387-
type: string
5387+
anyOf:
5388+
- type: object
5389+
properties:
5390+
id:
5391+
type: string
5392+
username:
5393+
type: string
5394+
email:
5395+
type: string
5396+
required:
5397+
- id
5398+
- username
5399+
- email
5400+
additionalProperties: false
5401+
- type: string
5402+
description: User object when available, fallback to user ID
53885403
createdAt:
53895404
type: string
53905405
updatedAt:
@@ -5556,7 +5571,22 @@ paths:
55565571
- secret
55575572
additionalProperties: false
55585573
createdBy:
5559-
type: string
5574+
anyOf:
5575+
- type: object
5576+
properties:
5577+
id:
5578+
type: string
5579+
username:
5580+
type: string
5581+
email:
5582+
type: string
5583+
required:
5584+
- id
5585+
- username
5586+
- email
5587+
additionalProperties: false
5588+
- type: string
5589+
description: User object when available, fallback to user ID
55605590
createdAt:
55615591
type: string
55625592
updatedAt:
@@ -5678,7 +5708,7 @@ paths:
56785708
- error
56795709
additionalProperties: false
56805710
description: Internal Server Error
5681-
/teams/{teamId}/cloud-credentials/{credentialId}:
5711+
/api/teams/{teamId}/cloud-credentials/{credentialId}:
56825712
get:
56835713
summary: Get cloud credential by ID
56845714
tags:
@@ -5755,7 +5785,22 @@ paths:
57555785
- secret
57565786
additionalProperties: false
57575787
createdBy:
5758-
type: string
5788+
anyOf:
5789+
- type: object
5790+
properties:
5791+
id:
5792+
type: string
5793+
username:
5794+
type: string
5795+
email:
5796+
type: string
5797+
required:
5798+
- id
5799+
- username
5800+
- email
5801+
additionalProperties: false
5802+
- type: string
5803+
description: User object when available, fallback to user ID
57595804
createdAt:
57605805
type: string
57615806
updatedAt:
@@ -5942,7 +5987,22 @@ paths:
59425987
- secret
59435988
additionalProperties: false
59445989
createdBy:
5945-
type: string
5990+
anyOf:
5991+
- type: object
5992+
properties:
5993+
id:
5994+
type: string
5995+
username:
5996+
type: string
5997+
email:
5998+
type: string
5999+
required:
6000+
- id
6001+
- username
6002+
- email
6003+
additionalProperties: false
6004+
- type: string
6005+
description: User object when available, fallback to user ID
59466006
createdAt:
59476007
type: string
59486008
updatedAt:
@@ -6191,7 +6251,7 @@ paths:
61916251
- error
61926252
additionalProperties: false
61936253
description: Internal Server Error
6194-
/teams/{teamId}/cloud-credentials/search:
6254+
/api/teams/{teamId}/cloud-credentials/search:
61956255
get:
61966256
summary: Search team cloud credentials
61976257
tags:

0 commit comments

Comments
 (0)