Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/Member API.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,33 @@
},
"response": []
}
},
{
"name": "Get Member Skill",
"request": {
"auth": {
"type": "noauth"
},
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:3000/v6/members/phead/skills/123",
"protocol": "http",
"host": [
"localhost"
],
"port": "3000",
"path": [
"v6",
"members",
"phead",
"skills",
"123"
]
}
},
"response": []
}
]
},
{
Expand Down
106 changes: 106 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,55 @@ paths:
description: Internal server error
schema:
$ref: '#/definitions/ErrorModel'
'/members/{handle}/skills/{skillid}':
get:
tags:
- Basic
description: |-
Get a specific member skill by skill ID.

Authorization:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 readability]
The description for the endpoint mentions 'secure and communication fields' but does not specify what these fields are. Consider clarifying which fields are considered secure and communication fields to avoid ambiguity.

- Public: Without a token responses omit secure and communication fields.
- JWT roles: The profile owner or `administrator`/`admin` roles may view secure fields.
- M2M scopes: `read:user_profiles` or `all:user_profiles`.
security:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ security]
The security definition uses 'bearer' which is typically associated with JWT tokens. Ensure that this aligns with the intended authentication mechanism and that the necessary scopes are properly documented and enforced.

- bearer: []
parameters:
- in: path
name: handle
required: true
type: string
- in: path
name: skillid
required: true
type: string
description: The skill id to retrieve
responses:
'200':
description: OK
schema:
$ref: '#/definitions/MemberSkillsWithActivity'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The response schema references 'MemberSkillsWithActivity'. Ensure that this definition is correctly implemented and includes all necessary fields to avoid runtime errors.

'400':
description: Bad request data
schema:
$ref: '#/definitions/ErrorModel'
'401':
description: Miss or wrong authentication credentials
schema:
$ref: '#/definitions/ErrorModel'
'403':
description: No permission
schema:
$ref: '#/definitions/ErrorModel'
'404':
description: Not found
schema:
$ref: '#/definitions/ErrorModel'
'500':
description: Internal server error
schema:
$ref: '#/definitions/ErrorModel'

/members:
get:
tags:
Expand Down Expand Up @@ -2727,6 +2776,63 @@ definitions:
type: string
example: 'Skill verified by proof of capability'

MemberSkillsWithActivity:
allOf:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The 'MemberSkillsWithActivity' definition extends 'MemberSkills'. Verify that all required fields in 'MemberSkills' are included and correctly mapped in 'MemberSkillsWithActivity' to prevent data inconsistencies.

- $ref: '#/definitions/MemberSkills'
- type: object
properties:
activity:
type: object

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ design]
The 'activity' object includes nested objects for 'challenge', 'certification', and 'course'. Consider adding validation rules to ensure that these objects are populated with valid data to maintain data integrity.

properties:
challenge:
type: object
properties:
count:
type: integer
format: int64
lastSources:
type: array
items:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
certification:
type: object
properties:
count:
type: integer
lastSources:
type: array
items:
type: object
properties:
completionEventId:
type: string
dashedName:
type: string
title:
type: string
course:
type: object
properties:
count:
type: integer
lastSources:
type: array
items:
type: object
properties:
completionEventId:
type: string
certification:
type: string
title:
type: string

MemberDistributionStats:
type: object
properties:
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"@topcoder/tc-finance-api": "topcoder-platform/tc-finance-api.git#dev",
"aws-sdk": "^2.466.0",
"@prisma/client": "^6.10.1",
"@react-pdf/renderer": "^3.4.4",
"@topcoder/challenge-api-v6": "github:topcoder-platform/challenge-api-v6#develop",
"@topcoder/learning-paths-api": "github:topcoder-platform/learning-paths-api#develop",
"@topcoder/standardized-skills-api": "topcoder-platform/standardized-skills-api.git#develop",
"@topcoder/resource-api-v6": "topcoder-platform/resource-api-v6.git#develop",
"@react-pdf/renderer": "^3.4.4",
"axios": "^0.27.2",
"bluebird": "^3.5.1",
"body-parser": "^1.15.1",
Expand Down Expand Up @@ -66,6 +68,9 @@
"standard": {
"env": [
"mocha"
],
"ignore": [
"/prisma/"
]
}
}
Loading
Loading