Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 1bd7de1

Browse files
Merge pull request #46 from topcoder-platform/Issue_45
Issue 45 - Rename search endpoint to skill search
2 parents e49d841 + cc5ba1d commit 1bd7de1

File tree

3 files changed

+66
-44
lines changed

3 files changed

+66
-44
lines changed

docs/UBahn_API.postman_collection.json

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"info": {
3-
"_postman_id": "2e9d0d1e-22b4-4b5c-af7d-8e5d407de79b",
3+
"_postman_id": "6d99ffc9-3c8b-4c0a-a006-5f1d3d23801d",
44
"name": "UBahn_API",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
77
"item": [
88
{
9-
"name": "search",
9+
"name": "skillSearch",
1010
"item": [
1111
{
12-
"name": "{{HOST}}/search/userAttributes",
12+
"name": "{{HOST}}/skill-search/userAttributes",
1313
"event": [
1414
{
1515
"listen": "test",
1616
"script": {
17-
"id": "256b27ab-e629-429f-ad93-372eaaa46239",
17+
"id": "769b9779-be21-4518-9276-f8b13c44c0d0",
1818
"exec": [
1919
"var rsp = pm.response.json();",
2020
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -39,12 +39,12 @@
3939
}
4040
],
4141
"url": {
42-
"raw": "{{HOST}}/search/userAttributes?attributeId=c44d4bee-1356-46d6-9f1f-991936dec297&attributeValue=support",
42+
"raw": "{{HOST}}/skill-search/userAttributes?attributeId=c44d4bee-1356-46d6-9f1f-991936dec297&attributeValue=support",
4343
"host": [
4444
"{{HOST}}"
4545
],
4646
"path": [
47-
"search",
47+
"skill-search",
4848
"userAttributes"
4949
],
5050
"query": [
@@ -62,12 +62,12 @@
6262
"response": []
6363
},
6464
{
65-
"name": "{{HOST}}/search/userAchievements",
65+
"name": "{{HOST}}/skill-search/userAchievements",
6666
"event": [
6767
{
6868
"listen": "test",
6969
"script": {
70-
"id": "d1951826-476c-4149-bfa7-2a853c30df4e",
70+
"id": "b2b52a88-23c3-4547-89b5-0a0afa0dad19",
7171
"exec": [
7272
""
7373
],
@@ -91,12 +91,12 @@
9191
}
9292
],
9393
"url": {
94-
"raw": "{{HOST}}/search/userAchievements?organizationId=36ed815b-3da1-49f1-a043-aaed0a4e81ad&keyword=Topcoder",
94+
"raw": "{{HOST}}/skill-search/userAchievements?organizationId=36ed815b-3da1-49f1-a043-aaed0a4e81ad&keyword=Topcoder",
9595
"host": [
9696
"{{HOST}}"
9797
],
9898
"path": [
99-
"search",
99+
"skill-search",
100100
"userAchievements"
101101
],
102102
"query": [
@@ -114,12 +114,12 @@
114114
"response": []
115115
},
116116
{
117-
"name": "{{HOST}}/search/skills",
117+
"name": "{{HOST}}/skill-search/skills",
118118
"event": [
119119
{
120120
"listen": "test",
121121
"script": {
122-
"id": "d56349bd-a797-47cf-b6bf-2ecfbd342815",
122+
"id": "35cfaef0-78f5-4ff9-83f3-c2a705dc0e9d",
123123
"exec": [
124124
""
125125
],
@@ -143,12 +143,12 @@
143143
}
144144
],
145145
"url": {
146-
"raw": "{{HOST}}/search/skills?organizationId=36ed815b-3da1-49f1-a043-aaed0a4e81ad&keyword=net",
146+
"raw": "{{HOST}}/skill-search/skills?organizationId=36ed815b-3da1-49f1-a043-aaed0a4e81ad&keyword=net",
147147
"host": [
148148
"{{HOST}}"
149149
],
150150
"path": [
151-
"search",
151+
"skill-search",
152152
"skills"
153153
],
154154
"query": [
@@ -166,12 +166,12 @@
166166
"response": []
167167
},
168168
{
169-
"name": "{{HOST}}/search/users",
169+
"name": "{{HOST}}/skill-search/users",
170170
"event": [
171171
{
172172
"listen": "test",
173173
"script": {
174-
"id": "75560f72-efeb-438e-ac29-24d7c6ab540e",
174+
"id": "23733012-4565-480e-9c0c-66b7c2fd2933",
175175
"exec": [
176176
"var rsp = pm.response.json();",
177177
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -203,19 +203,41 @@
203203
}
204204
},
205205
"url": {
206-
"raw": "{{HOST}}/search/users",
206+
"raw": "{{HOST}}/skill-search/users",
207207
"host": [
208208
"{{HOST}}"
209209
],
210210
"path": [
211-
"search",
211+
"skill-search",
212212
"users"
213213
]
214214
}
215215
},
216216
"response": []
217217
}
218218
],
219+
"event": [
220+
{
221+
"listen": "prerequest",
222+
"script": {
223+
"id": "e1951d10-6818-4d2d-8d49-452f3eb31f74",
224+
"type": "text/javascript",
225+
"exec": [
226+
""
227+
]
228+
}
229+
},
230+
{
231+
"listen": "test",
232+
"script": {
233+
"id": "bb0d8108-d90a-4b16-ac59-7d0720a86c81",
234+
"type": "text/javascript",
235+
"exec": [
236+
""
237+
]
238+
}
239+
}
240+
],
219241
"protocolProfileBehavior": {}
220242
},
221243
{
@@ -227,7 +249,7 @@
227249
{
228250
"listen": "test",
229251
"script": {
230-
"id": "5db9dc16-daad-4768-a3af-ea8983487bec",
252+
"id": "a80d76a2-572f-47e8-bb5b-7594906e6f17",
231253
"exec": [
232254
"var rsp = pm.response.json();",
233255
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -594,7 +616,7 @@
594616
{
595617
"listen": "test",
596618
"script": {
597-
"id": "8469c20d-3ef5-4868-af50-d603584ed8a7",
619+
"id": "021253da-d913-43df-b490-28001f14b233",
598620
"exec": [
599621
"var rsp = pm.response.json();",
600622
"if(rsp.id) pm.environment.set(\"roleId\", rsp.id);"
@@ -829,7 +851,7 @@
829851
{
830852
"listen": "test",
831853
"script": {
832-
"id": "d4ca59b9-f350-4c91-9667-a5e749eed956",
854+
"id": "4a70f27f-df1b-43cf-a0fa-a2ca58a5521a",
833855
"exec": [
834856
""
835857
],
@@ -1071,7 +1093,7 @@
10711093
{
10721094
"listen": "test",
10731095
"script": {
1074-
"id": "ff10985c-75c8-48ba-b522-2c8213b0c6cd",
1096+
"id": "9194de70-291f-4660-82d3-5883c23d12bb",
10751097
"exec": [
10761098
"var rsp = pm.response.json();",
10771099
"if(rsp.id) pm.environment.set(\"organizationId\", rsp.id);"
@@ -1306,7 +1328,7 @@
13061328
{
13071329
"listen": "test",
13081330
"script": {
1309-
"id": "0a875ba8-b4dc-42cc-b8ba-deb560b73556",
1331+
"id": "f40cae85-9ad1-4c54-ad87-b592395027ac",
13101332
"exec": [
13111333
"var rsp = pm.response.json();",
13121334
"if(rsp.id) pm.environment.set(\"skillsProviderId\", rsp.id);"
@@ -1541,7 +1563,7 @@
15411563
{
15421564
"listen": "test",
15431565
"script": {
1544-
"id": "909e2488-3801-4b57-90c5-6a6ae2e91f13",
1566+
"id": "a0153fe7-82ee-4a03-af43-19cf44fab4f0",
15451567
"exec": [
15461568
"var rsp = pm.response.json();",
15471569
"if(rsp.id) pm.environment.set(\"skillId\", rsp.id);"
@@ -1777,7 +1799,7 @@
17771799
{
17781800
"listen": "test",
17791801
"script": {
1780-
"id": "e3241acb-646f-4ec8-83fb-8a3d63da4990",
1802+
"id": "b4d7a5cc-9e17-4d45-84c3-6dfbdcf09579",
17811803
"exec": [
17821804
""
17831805
],
@@ -2025,7 +2047,7 @@
20252047
{
20262048
"listen": "test",
20272049
"script": {
2028-
"id": "ee9256b0-cdc2-4194-9da7-c0b363082385",
2050+
"id": "08a6d74a-268c-403b-8cb1-85bee3c88855",
20292051
"exec": [
20302052
""
20312053
],
@@ -2273,7 +2295,7 @@
22732295
{
22742296
"listen": "test",
22752297
"script": {
2276-
"id": "3c959e64-93e9-480d-b92e-44eacb46c2b1",
2298+
"id": "680443d3-c817-4939-8461-445fbeea6b00",
22772299
"exec": [
22782300
"var rsp = pm.response.json();",
22792301
"if(rsp.id) pm.environment.set(\"achievementsProviderId\", rsp.id);"
@@ -2508,7 +2530,7 @@
25082530
{
25092531
"listen": "test",
25102532
"script": {
2511-
"id": "9b4f70b8-3ca8-4c1c-a65a-8a8b37e2fa62",
2533+
"id": "4ccce827-71ed-4373-b14f-e103b334e73f",
25122534
"exec": [
25132535
""
25142536
],
@@ -2757,7 +2779,7 @@
27572779
{
27582780
"listen": "test",
27592781
"script": {
2760-
"id": "fb796928-9848-47a3-be88-61a8fc9e60f7",
2782+
"id": "6670cb30-0276-4625-9688-8cb1aa78d8fb",
27612783
"exec": [
27622784
"var rsp = pm.response.json();",
27632785
"if (rsp.id) pm.environment.set(\"attributeGroupId\", rsp.id);"
@@ -2998,7 +3020,7 @@
29983020
{
29993021
"listen": "test",
30003022
"script": {
3001-
"id": "eb028137-ee03-496c-a812-2966380bca42",
3023+
"id": "bad538df-7c33-4d34-a90e-9e60e279f40d",
30023024
"exec": [
30033025
"var rsp = pm.response.json();",
30043026
"if (rsp.id) pm.environment.set(\"attributeId\", rsp.id);"
@@ -3238,7 +3260,7 @@
32383260
{
32393261
"listen": "test",
32403262
"script": {
3241-
"id": "06c18b73-b9e6-46a8-acfa-74fc7ae68ac5",
3263+
"id": "b91ea1ce-88a2-48fa-8e90-ed689232b5e5",
32423264
"exec": [
32433265
""
32443266
],

docs/swagger.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tags:
3737
description: "Attributes registered in the system"
3838
- name: "Attribute Groups"
3939
description: "Attribute groups registered in the system"
40-
- name: "Search"
40+
- name: "Skill Search"
4141
description: "Search info registered in the system"
4242
schemes:
4343
- "https"
@@ -3718,10 +3718,10 @@ paths:
37183718
security:
37193719
- Bearer: []
37203720
x-swagger-router-controller: "AttributeGroups"
3721-
/search/users:
3721+
/skill-search/users:
37223722
post:
37233723
tags:
3724-
- "Search"
3724+
- "Skill Search"
37253725
description: "Search for users in the application. If no results, then empty\
37263726
\ array is returned. Multiple filters are\nsupported.\n\n**Security** - Note\
37273727
\ that for non-admin users, this endpoint will only return entities that\n\
@@ -3758,10 +3758,10 @@ paths:
37583758
security:
37593759
- Bearer: []
37603760
x-swagger-router-controller: "Search"
3761-
/search/userAttributes:
3761+
/skill-search/userAttributes:
37623762
get:
37633763
tags:
3764-
- "Search"
3764+
- "Skill Search"
37653765
description: "Search for user attributes in the application. If no results, then empty\
37663766
\ array is returned. Multiple filters are\nsupported.\n\n**Security** - Note\
37673767
\ that for non-admin users, this endpoint will only return entities that\n\
@@ -3795,10 +3795,10 @@ paths:
37953795
security:
37963796
- Bearer: []
37973797
x-swagger-router-controller: "Search"
3798-
/search/userAchievements:
3798+
/skill-search/userAchievements:
37993799
get:
38003800
tags:
3801-
- "Search"
3801+
- "Skill Search"
38023802
description: "Search for user achievements in the application. If no results, then empty\
38033803
\ array is returned. Multiple filters are\nsupported.\n\n**Security** - Note\
38043804
\ that for non-admin users, this endpoint will only return entities that\n\
@@ -3833,10 +3833,10 @@ paths:
38333833
security:
38343834
- Bearer: []
38353835
x-swagger-router-controller: "Search"
3836-
/search/skills:
3836+
/skill-search/skills:
38373837
get:
38383838
tags:
3839-
- "Search"
3839+
- "Skill Search"
38403840
description: "Search for skills associated with an org in the application. If no results, then empty\
38413841
\ array is returned. Multiple filters are\nsupported.\n\n**Security** - Note\
38423842
\ that for non-admin users, this endpoint will only return entities that\n\

src/modules/search/route.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ const Controller = require('./controller')
66
const consts = require('../../consts')
77

88
module.exports = {
9-
'/search/users': {
9+
'/skill-search/users': {
1010
post: {
1111
method: Controller.searchUsers,
1212
auth: 'jwt',
1313
access: [...consts.AdminUser, consts.UserRoles.ubahn],
1414
scopes: ['read:user', 'all:user']
1515
}
1616
},
17-
'/search/skills': {
17+
'/skill-search/skills': {
1818
get: {
1919
method: Controller.searchSkills,
2020
auth: 'jwt',
2121
access: [...consts.AdminUser, consts.UserRoles.ubahn],
2222
scopes: ['create:userAttribute', 'all:userAttribute']
2323
}
2424
},
25-
'/search/userAttributes': {
25+
'/skill-search/userAttributes': {
2626
get: {
2727
method: Controller.searchAttributeValues,
2828
auth: 'jwt',
2929
access: [...consts.AdminUser, consts.UserRoles.ubahn],
3030
scopes: ['create:userAttribute', 'all:userAttribute']
3131
}
3232
},
33-
'/search/userAchievements': {
33+
'/skill-search/userAchievements': {
3434
get: {
3535
method: Controller.searchAchievementValues,
3636
auth: 'jwt',

0 commit comments

Comments
 (0)