Skip to content

Commit c60d0a5

Browse files
Add support for challengeType.abbreviation, challengeType.legacyId, num of registrants/submissions
1 parent 7295559 commit c60d0a5

16 files changed

+640
-88
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ It starts Elasticsearch, DynamoDB and S3 compatible server.
7878
## Mock api
7979
For postman verification, please use the mock api under mock-api folder. It provides mock endpoint to fetch challenge resources and groups.
8080
You need to ensure DynamoDB configuration in `mock-api/config/default.js` is consistent with `config/default.js`
81-
Go to `mock-api` folder and run command `npm run start` to start the mock-api listening on port 4000
81+
Go to `mock-api` folder and run commands `npm i` and `npm start` to start the mock-api listening on port 4000
8282

8383
## Create Tables
8484
1. Make sure DynamoDB are running as per instructions above.

docs/swagger.yaml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,16 @@ paths:
423423
description: Filter by isActive flag.
424424
required: false
425425
type: boolean
426+
- name: abbreviation
427+
in: query
428+
description: Filter by abbreviation. Partial matches are allowed.
429+
required: false
430+
type: string
431+
- name: legacyId
432+
in: query
433+
description: Filter by legacy id.
434+
required: false
435+
type: integer
426436
responses:
427437
'200':
428438
description: OK
@@ -496,7 +506,7 @@ paths:
496506
$ref: '#/definitions/ErrorModel'
497507
'409':
498508
description: >
499-
Conflict. Other challenge type has already used the same name.
509+
Conflict. Other challenge type has already used the same name, abbreviation or legacyId.
500510
schema:
501511
$ref: '#/definitions/ErrorModel'
502512
'500':
@@ -579,7 +589,7 @@ paths:
579589
$ref: '#/definitions/ErrorModel'
580590
'409':
581591
description: >
582-
Conflict. Other challenge type has already used the same name.
592+
Conflict. Other challenge type has already used the same name, abbreviation or legacyId.
583593
schema:
584594
$ref: '#/definitions/ErrorModel'
585595
'500':
@@ -633,7 +643,7 @@ paths:
633643
$ref: '#/definitions/ErrorModel'
634644
'409':
635645
description: >
636-
Conflict. Other challenge type has already used the same name.
646+
Conflict. Other challenge type has already used the same name, abbreviation or legacyId.
637647
schema:
638648
$ref: '#/definitions/ErrorModel'
639649
'500':
@@ -1815,6 +1825,12 @@ definitions:
18151825
type: integer
18161826
description: the winner placement
18171827
example: 1
1828+
numOfSubmissions:
1829+
type: integer
1830+
description: number of submissions
1831+
numOfRegistrants:
1832+
type: integer
1833+
description: number of registrants
18181834
created:
18191835
type: string
18201836
format: date-time
@@ -1871,9 +1887,14 @@ definitions:
18711887
type: string
18721888
isActive:
18731889
type: boolean
1890+
abbreviation:
1891+
type: string
1892+
legacyId:
1893+
type: integer
18741894
required:
18751895
- name
18761896
- isActive
1897+
- abbreviation
18771898
ChallengeSettingsData:
18781899
type: object
18791900
properties:
@@ -2160,6 +2181,12 @@ definitions:
21602181
type: integer
21612182
description: the winner placement
21622183
example: 1
2184+
numOfSubmissions:
2185+
type: integer
2186+
description: number of submissions
2187+
numOfRegistrants:
2188+
type: integer
2189+
description: number of registrants
21632190
created:
21642191
type: string
21652192
format: date-time

0 commit comments

Comments
 (0)