|
58 | 58 | produces:
|
59 | 59 | - application/json
|
60 | 60 | parameters:
|
| 61 | + - $ref: "#/parameters/app-version" |
61 | 62 | - $ref: "#/parameters/page"
|
62 | 63 | - $ref: "#/parameters/perPage"
|
63 | 64 | - name: id
|
@@ -472,6 +473,7 @@ paths:
|
472 | 473 | produces:
|
473 | 474 | - application/json
|
474 | 475 | parameters:
|
| 476 | + - $ref: "#/parameters/app-version" |
475 | 477 | - in: body
|
476 | 478 | name: body
|
477 | 479 | required: true
|
@@ -512,6 +514,7 @@ paths:
|
512 | 514 | produces:
|
513 | 515 | - application/json
|
514 | 516 | parameters:
|
| 517 | + - $ref: "#/parameters/app-version" |
515 | 518 | - name: challengeId
|
516 | 519 | in: path
|
517 | 520 | required: true
|
@@ -548,6 +551,7 @@ paths:
|
548 | 551 | produces:
|
549 | 552 | - application/json
|
550 | 553 | parameters:
|
| 554 | + - $ref: "#/parameters/app-version" |
551 | 555 | - name: challengeId
|
552 | 556 | in: path
|
553 | 557 | required: true
|
@@ -593,6 +597,7 @@ paths:
|
593 | 597 | produces:
|
594 | 598 | - application/json
|
595 | 599 | parameters:
|
| 600 | + - $ref: "#/parameters/app-version" |
596 | 601 | - name: challengeId
|
597 | 602 | in: path
|
598 | 603 | required: true
|
@@ -2398,6 +2403,19 @@ parameters:
|
2398 | 2403 | minimum: 1
|
2399 | 2404 | default: 100
|
2400 | 2405 | maximum: 100
|
| 2406 | + app-version: |
| 2407 | + name: app-version |
| 2408 | + in: header |
| 2409 | + description: > |
| 2410 | + The app version: |
| 2411 | +
|
| 2412 | + - 1.1.0: With 1.1.0 or later version, challenge-api supports create/update challenge with "skills" data in request payload, |
| 2413 | + and with "skills" data in response body when get/search/create/update challenges. |
| 2414 | +
|
| 2415 | + - 2.0.0: With 2.0.0 or later version, challenge-api supports "payments" data in response body when get/search/create/update challenges for admin/m2m user. |
| 2416 | + required: false |
| 2417 | + type: string |
| 2418 | + default: 1.0.0 |
2401 | 2419 | definitions:
|
2402 | 2420 | Challenge:
|
2403 | 2421 | type: object
|
@@ -2643,6 +2661,39 @@ definitions:
|
2643 | 2661 | type: string
|
2644 | 2662 | description: Auto-generated
|
2645 | 2663 | example: Development
|
| 2664 | + payments: |
| 2665 | + type: array |
| 2666 | + description: The payments of the challenge, only applicable when "app-version" header >= 2.0.0 for admin/m2m user |
| 2667 | + items: |
| 2668 | + type: object |
| 2669 | + properties: |
| 2670 | + handle: |
| 2671 | + type: string |
| 2672 | + type: |
| 2673 | + type: string |
| 2674 | + amount: |
| 2675 | + type: number |
| 2676 | + userId: |
| 2677 | + type: number |
| 2678 | + skills: |
| 2679 | + type: array |
| 2680 | + description: The skills of the challenge, only applicable when "app-version" header >= 1.1.0 |
| 2681 | + items: |
| 2682 | + type: object |
| 2683 | + properties: |
| 2684 | + id: |
| 2685 | + type: string |
| 2686 | + format: UUID |
| 2687 | + name: |
| 2688 | + type: string |
| 2689 | + category: |
| 2690 | + type: object |
| 2691 | + properties: |
| 2692 | + id: |
| 2693 | + type: string |
| 2694 | + format: UUID |
| 2695 | + name: |
| 2696 | + type: string |
2646 | 2697 | required:
|
2647 | 2698 | - typeId
|
2648 | 2699 | - trackId
|
@@ -2792,6 +2843,17 @@ definitions:
|
2792 | 2843 | required:
|
2793 | 2844 | - id
|
2794 | 2845 | - roleId
|
| 2846 | + skills: |
| 2847 | + type: array |
| 2848 | + description: The ids of the skills to add for the challenge, only applicable when "app-version" header >= 1.1.0 |
| 2849 | + items: |
| 2850 | + type: object |
| 2851 | + properties: |
| 2852 | + id: |
| 2853 | + type: string |
| 2854 | + format: UUID |
| 2855 | + required: |
| 2856 | + - id |
2795 | 2857 | required:
|
2796 | 2858 | - typeId
|
2797 | 2859 | - trackId
|
@@ -2975,6 +3037,17 @@ definitions:
|
2975 | 3037 | required:
|
2976 | 3038 | - id
|
2977 | 3039 | - roleId
|
| 3040 | + skills: |
| 3041 | + type: array |
| 3042 | + description: The ids of the skills to add for the challenge, only applicable when "app-version" header >= 1.1.0 |
| 3043 | + items: |
| 3044 | + type: object |
| 3045 | + properties: |
| 3046 | + id: |
| 3047 | + type: string |
| 3048 | + format: UUID |
| 3049 | + required: |
| 3050 | + - id |
2978 | 3051 | required:
|
2979 | 3052 | - typeId
|
2980 | 3053 | - trackId
|
@@ -3159,6 +3232,17 @@ definitions:
|
3159 | 3232 | required:
|
3160 | 3233 | - id
|
3161 | 3234 | - roleId
|
| 3235 | + skills: |
| 3236 | + type: array |
| 3237 | + description: The ids of the skills to add for the challenge, only applicable when "app-version" header >= 1.1.0 |
| 3238 | + items: |
| 3239 | + type: object |
| 3240 | + properties: |
| 3241 | + id: |
| 3242 | + type: string |
| 3243 | + format: UUID |
| 3244 | + required: |
| 3245 | + - id |
3162 | 3246 | SearchChallengeRequestBody:
|
3163 | 3247 | type: object
|
3164 | 3248 | properties:
|
|
0 commit comments