|
| 1 | +openapi: 3.0.0 |
| 2 | +info: |
| 3 | + title: Community APP |
| 4 | + description: Community APP |
| 5 | + version: 1.0.0 |
| 6 | +servers: |
| 7 | + - url: http://local.topcoder-dev.com:3000 |
| 8 | +tags: |
| 9 | + - name: Profile |
| 10 | +paths: |
| 11 | + /api/recruit/profile: |
| 12 | + get: |
| 13 | + tags: |
| 14 | + - Profile |
| 15 | + description: | |
| 16 | + Get Profile of current user |
| 17 | +
|
| 18 | + **Authorization** All topcoder members are allowed. |
| 19 | + security: |
| 20 | + - bearerAuth: [] |
| 21 | + responses: |
| 22 | + "200": |
| 23 | + description: OK |
| 24 | + content: |
| 25 | + application/json: |
| 26 | + schema: |
| 27 | + type: array |
| 28 | + items: |
| 29 | + $ref: "#/components/schemas/Profile" |
| 30 | + "401": |
| 31 | + description: Not authenticated |
| 32 | + content: |
| 33 | + application/json: |
| 34 | + schema: |
| 35 | + $ref: "#/components/schemas/AuthError" |
| 36 | + "403": |
| 37 | + description: Forbidden |
| 38 | + content: |
| 39 | + application/json: |
| 40 | + schema: |
| 41 | + $ref: "#/components/schemas/AuthError" |
| 42 | + "404": |
| 43 | + description: Not Found |
| 44 | + content: |
| 45 | + application/json: |
| 46 | + schema: |
| 47 | + $ref: "#/components/schemas/Profile" |
| 48 | + "500": |
| 49 | + description: Internal Server Error |
| 50 | + content: |
| 51 | + text/plain:: |
| 52 | + schema: |
| 53 | + type: string |
| 54 | + post: |
| 55 | + tags: |
| 56 | + - Profile |
| 57 | + description: | |
| 58 | + Update Profile details of current user |
| 59 | + **Authorization** All topcoder members are allowed. |
| 60 | + security: |
| 61 | + - bearerAuth: [] |
| 62 | + requestBody: |
| 63 | + content: |
| 64 | + multipart/form-data: |
| 65 | + schema: |
| 66 | + $ref: "#/components/schemas/ProfileUpdate" |
| 67 | + responses: |
| 68 | + "204": |
| 69 | + description: OK |
| 70 | + "400": |
| 71 | + description: Bad request |
| 72 | + content: |
| 73 | + application/json: |
| 74 | + schema: |
| 75 | + oneOf: |
| 76 | + - $ref: "#/components/schemas/JoiError" |
| 77 | + - $ref: "#/components/schemas/Error" |
| 78 | + "401": |
| 79 | + description: Not authenticated |
| 80 | + content: |
| 81 | + application/json: |
| 82 | + schema: |
| 83 | + $ref: "#/components/schemas/AuthError" |
| 84 | + "403": |
| 85 | + description: Forbidden |
| 86 | + content: |
| 87 | + application/json: |
| 88 | + schema: |
| 89 | + $ref: "#/components/schemas/AuthError" |
| 90 | + "404": |
| 91 | + description: Not Found |
| 92 | + content: |
| 93 | + application/json: |
| 94 | + schema: |
| 95 | + $ref: "#/components/schemas/Error" |
| 96 | + "500": |
| 97 | + description: Internal Server Error |
| 98 | + content: |
| 99 | + text/plain:: |
| 100 | + schema: |
| 101 | + type: string |
| 102 | +components: |
| 103 | + securitySchemes: |
| 104 | + bearerAuth: |
| 105 | + type: http |
| 106 | + scheme: bearer |
| 107 | + bearerFormat: JWT |
| 108 | + schemas: |
| 109 | + Profile: |
| 110 | + required: |
| 111 | + - availability |
| 112 | + properties: |
| 113 | + phone: |
| 114 | + type: string |
| 115 | + description: "The phone number of the user" |
| 116 | + example: "+1123226666" |
| 117 | + resume: |
| 118 | + type: string |
| 119 | + description: "The resume of the user" |
| 120 | + availability: |
| 121 | + type: boolean |
| 122 | + description: "The availability of the user" |
| 123 | + default: true |
| 124 | + example: true |
| 125 | + hasProfile: |
| 126 | + type: boolean |
| 127 | + description: "Whether has profile for the user" |
| 128 | + ProfileUpdate: |
| 129 | + required: |
| 130 | + - phone |
| 131 | + - availability |
| 132 | + - city |
| 133 | + - countryName |
| 134 | + properties: |
| 135 | + phone: |
| 136 | + type: string |
| 137 | + description: "The phone number of the user" |
| 138 | + example: "(123) 456-7890" |
| 139 | + city: |
| 140 | + type: string |
| 141 | + description: "The member's city" |
| 142 | + countryName: |
| 143 | + type: string |
| 144 | + description: "The member's country" |
| 145 | + resume: |
| 146 | + type: string |
| 147 | + format: binary |
| 148 | + description: "The resume file of the user" |
| 149 | + availability: |
| 150 | + type: boolean |
| 151 | + description: "The availability of the user" |
| 152 | + example: true |
| 153 | + Error: |
| 154 | + properties: |
| 155 | + error: |
| 156 | + type: boolean |
| 157 | + example: true |
| 158 | + status: |
| 159 | + type: integer |
| 160 | + example: 404 |
| 161 | + url: |
| 162 | + type: string |
| 163 | + format: uri |
| 164 | + errObj: |
| 165 | + type: object |
| 166 | + JoiError: |
| 167 | + required: |
| 168 | + - message |
| 169 | + properties: |
| 170 | + message: |
| 171 | + type: string |
| 172 | + AuthError: |
| 173 | + properties: |
| 174 | + version: |
| 175 | + type: string |
| 176 | + result: |
| 177 | + type: object |
| 178 | + properties: |
| 179 | + success: |
| 180 | + type: boolean |
| 181 | + example: false |
| 182 | + status: |
| 183 | + type: integer |
| 184 | + example: 403 |
| 185 | + content: |
| 186 | + type: object |
| 187 | + properties: |
| 188 | + message: |
| 189 | + type: string |
0 commit comments