Commit 6ae819f3851eda4ecf22846dd6ba9d9232399a00
1 parent
dabc7821
Go to JSON
Showing
22 changed files
with
1735 additions
and
374 deletions
Show diff stats
api.raml
@@ -2,45 +2,29 @@ | @@ -2,45 +2,29 @@ | ||
2 | title: API d'Etunicorn | 2 | title: API d'Etunicorn |
3 | baseUri: https://etunicorn.plil.net/{version}/ | 3 | baseUri: https://etunicorn.plil.net/{version}/ |
4 | version: v1 | 4 | version: v1 |
5 | - | ||
6 | -securitySchemes: | ||
7 | - - oauth_2_0: | ||
8 | - settings: | ||
9 | - authorizationUri: /oauth2/authorize | ||
10 | - accessTokenUri: /oauth2/token | ||
11 | - authorizationGrants: [ code, token ] | ||
12 | - description: Il faut un token OAuth 2.0 pour utiliser cette API | ||
13 | - type: OAuth 2.0 | ||
14 | - describedBy: | ||
15 | - headers: | ||
16 | - Authorization: | ||
17 | - description: | | ||
18 | - Utilisé pour envoyer un token d'accès OAuth 2. Ne pas envoyer en même temps que le paramètre de requête "access_token" | ||
19 | - type: string | ||
20 | - queryParameters: | ||
21 | - access_token: | ||
22 | - description: | | ||
23 | - Utilisé pour envoyer un token d'accès OAuth 2. Ne pas envoyer en même temps que le header "Authorization" | ||
24 | - type: string | ||
25 | - responses: | ||
26 | - 401: | ||
27 | - description: Token expiré ou invalide. Reconnectez-vous | ||
28 | - 403: | ||
29 | - description: Permission refusée. Se re-connecter ne changera rien | ||
30 | - | ||
31 | # Les codes 400 sont implicites | 5 | # Les codes 400 sont implicites |
32 | /login: | 6 | /login: |
33 | post: | 7 | post: |
34 | description: Instancie une nouvelle connexion | 8 | description: Instancie une nouvelle connexion |
35 | - queryParameters: | ||
36 | - login: | ||
37 | - displayName: Login Polytech | ||
38 | - type: string | ||
39 | - required: true | ||
40 | - password: | ||
41 | - displayName: Mot de passe Polytech | ||
42 | - type: string | ||
43 | - required: true | 9 | + body: |
10 | + application/json: | ||
11 | + schema: | | ||
12 | + { | ||
13 | + "type": "object", | ||
14 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
15 | + "id": "http://jsonschema.net", | ||
16 | + "required": true, | ||
17 | + "properties": { | ||
18 | + "login": { | ||
19 | + "type": "string", | ||
20 | + "required": true | ||
21 | + }, | ||
22 | + "password": { | ||
23 | + "type": "string", | ||
24 | + "required": true | ||
25 | + } | ||
26 | + } | ||
27 | + } | ||
44 | responses: | 28 | responses: |
45 | 200: | 29 | 200: |
46 | description: Authentification réussie | 30 | description: Authentification réussie |
@@ -72,7 +56,6 @@ securitySchemes: | @@ -72,7 +56,6 @@ securitySchemes: | ||
72 | description: Jeton non trouvé | 56 | description: Jeton non trouvé |
73 | /personne: | 57 | /personne: |
74 | get: | 58 | get: |
75 | - securedBy: [oauth_2_0] | ||
76 | description: Obtenir la liste des persones. Nécessite COMPTE_ADMIN | 59 | description: Obtenir la liste des persones. Nécessite COMPTE_ADMIN |
77 | responses: | 60 | responses: |
78 | 200: | 61 | 200: |
@@ -97,7 +80,6 @@ securitySchemes: | @@ -97,7 +80,6 @@ securitySchemes: | ||
97 | description: ID de la personne | 80 | description: ID de la personne |
98 | minimum: 0 | 81 | minimum: 0 |
99 | get: | 82 | get: |
100 | - securedBy: [oauth_2_0] | ||
101 | description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN | 83 | description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN |
102 | responses: | 84 | responses: |
103 | 200: | 85 | 200: |
@@ -116,39 +98,42 @@ securitySchemes: | @@ -116,39 +98,42 @@ securitySchemes: | ||
116 | 404: | 98 | 404: |
117 | description: Utilisateur non trouvé | 99 | description: Utilisateur non trouvé |
118 | put: | 100 | put: |
119 | - securedBy: [oauth_2_0] | ||
120 | description: Modifer les infos d'une personne. Nécessite COMPTE_ADMIN | 101 | description: Modifer les infos d'une personne. Nécessite COMPTE_ADMIN |
121 | - queryParameters: | ||
122 | - carte: | ||
123 | - displayName: ID de la carte NFC | ||
124 | - type: string | ||
125 | - required: false | ||
126 | - minLength: 14 | ||
127 | - maxLength: 14 | ||
128 | - example: 39cdd9ed0b191d | ||
129 | - naissance: | ||
130 | - displayName: Date de naissance | ||
131 | - type: date | ||
132 | - example: "14-Feb-1997" | ||
133 | - required: false | ||
134 | - login: | ||
135 | - displayName: Login Polytech | ||
136 | - type: string | ||
137 | - required: false | ||
138 | - example: gbontoux | ||
139 | - role: | ||
140 | - displayName: Rôle | ||
141 | - description: Nécessite ROLE_ADMIN | ||
142 | - type: string | ||
143 | - required: false | ||
144 | - example: etudiant | 102 | + body: |
103 | + application/json: | ||
104 | + schema: | | ||
105 | + { | ||
106 | + "type": "object", | ||
107 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
108 | + "id": "http://jsonschema.net", | ||
109 | + "required": true, | ||
110 | + "properties": { | ||
111 | + "carte": { | ||
112 | + "type": "string", | ||
113 | + "required": false, | ||
114 | + "minLength": 14, | ||
115 | + "maxLength": 14 | ||
116 | + }, | ||
117 | + "naissance": { | ||
118 | + "type": "date", | ||
119 | + "required": false | ||
120 | + }, | ||
121 | + "login": { | ||
122 | + "type": "string", | ||
123 | + "required": false | ||
124 | + }, | ||
125 | + "role": { | ||
126 | + "type": "role", | ||
127 | + "required": false | ||
128 | + } | ||
129 | + } | ||
130 | + } | ||
145 | responses: | 131 | responses: |
146 | 202: | 132 | 202: |
147 | description: Utilisateur modifié | 133 | description: Utilisateur modifié |
148 | 404: | 134 | 404: |
149 | description: Utilisateur non trouvé | 135 | description: Utilisateur non trouvé |
150 | delete: | 136 | delete: |
151 | - securedBy: [oauth_2_0] | ||
152 | description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN | 137 | description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN |
153 | responses: | 138 | responses: |
154 | 204: | 139 | 204: |
@@ -157,30 +142,35 @@ securitySchemes: | @@ -157,30 +142,35 @@ securitySchemes: | ||
157 | description: Utilisateur non trouvé | 142 | description: Utilisateur non trouvé |
158 | post: | 143 | post: |
159 | description: Ajoute une nouvelle personne | 144 | description: Ajoute une nouvelle personne |
160 | - queryParameters: | ||
161 | - carte: | ||
162 | - displayName: ID de la carte NFC | ||
163 | - type: string | ||
164 | - required: false | ||
165 | - minLength: 14 | ||
166 | - maxLength: 14 | ||
167 | - example: 39cdd9ed0b191d | ||
168 | - naissance: | ||
169 | - displayName: Date de naissance | ||
170 | - type: date | ||
171 | - required: false | ||
172 | - example: 1997-02-14 | ||
173 | - login: | ||
174 | - displayName: Login Polytech | ||
175 | - type: string | ||
176 | - required: false | ||
177 | - example: gbontoux | ||
178 | - role: | ||
179 | - displayName: Rôle | ||
180 | - description: Nécessite ROLE_ADMIN | ||
181 | - type: string | ||
182 | - required: false | ||
183 | - example: etudiant | 145 | + body: |
146 | + application/json: | ||
147 | + schema: | | ||
148 | + { | ||
149 | + "type": "object", | ||
150 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
151 | + "id": "http://jsonschema.net", | ||
152 | + "required": true, | ||
153 | + "properties": { | ||
154 | + "carte": { | ||
155 | + "type": "string", | ||
156 | + "required": false, | ||
157 | + "minLength": 14, | ||
158 | + "maxLength": 14 | ||
159 | + }, | ||
160 | + "naissance": { | ||
161 | + "type": "date", | ||
162 | + "required": false | ||
163 | + }, | ||
164 | + "login": { | ||
165 | + "type": "false", | ||
166 | + "required": false | ||
167 | + }, | ||
168 | + "role": { | ||
169 | + "type": "role", | ||
170 | + "required": false | ||
171 | + } | ||
172 | + } | ||
173 | + } | ||
184 | responses: | 174 | responses: |
185 | 201: | 175 | 201: |
186 | description: Personne ajoutée avec succès | 176 | description: Personne ajoutée avec succès |
@@ -192,7 +182,6 @@ securitySchemes: | @@ -192,7 +182,6 @@ securitySchemes: | ||
192 | } | 182 | } |
193 | /role: | 183 | /role: |
194 | get: | 184 | get: |
195 | - securedBy: [oauth_2_0] | ||
196 | description: Liste les rôles. Nécessite ROLE_ADMIN | 185 | description: Liste les rôles. Nécessite ROLE_ADMIN |
197 | responses: | 186 | responses: |
198 | 200: | 187 | 200: |
@@ -217,22 +206,36 @@ securitySchemes: | @@ -217,22 +206,36 @@ securitySchemes: | ||
217 | } | 206 | } |
218 | ] | 207 | ] |
219 | post: | 208 | post: |
220 | - securedBy: [oauth_2_0] | ||
221 | description: Ajoute un nouveau rôle. Nécessite ROLE_ADMIN | 209 | description: Ajoute un nouveau rôle. Nécessite ROLE_ADMIN |
222 | - queryParameters: | ||
223 | - nom: | ||
224 | - type: string | ||
225 | - minLength: 3 | ||
226 | - required: true | ||
227 | - example: bde | 210 | + body: |
211 | + application/json: | ||
212 | + schema: | | ||
213 | + { | ||
214 | + "type": "object", | ||
215 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
216 | + "id": "http://jsonschema.net", | ||
217 | + "required": true, | ||
218 | + "properties": { | ||
219 | + "nom": { | ||
220 | + "type": "string", | ||
221 | + "required": true, | ||
222 | + "minLength": 3 | ||
223 | + } | ||
224 | + } | ||
225 | + } | ||
228 | responses: | 226 | responses: |
229 | 201: | 227 | 201: |
230 | description: Rôle créé avec succès | 228 | description: Rôle créé avec succès |
231 | 409: | 229 | 409: |
232 | description: Un rôle avec le même nom existe déjà | 230 | description: Un rôle avec le même nom existe déjà |
233 | /{nomRole}: | 231 | /{nomRole}: |
232 | + uriParameters: | ||
233 | + nomRole: | ||
234 | + type: number | ||
235 | + required: true | ||
236 | + description: ID du role | ||
237 | + minimum: 0 | ||
234 | delete: | 238 | delete: |
235 | - securedBy: [oauth_2_0] | ||
236 | description: Supprime un rôle. Nécessite ROLE_ADMIN | 239 | description: Supprime un rôle. Nécessite ROLE_ADMIN |
237 | responses: | 240 | responses: |
238 | 204: | 241 | 204: |
@@ -240,21 +243,34 @@ securitySchemes: | @@ -240,21 +243,34 @@ securitySchemes: | ||
240 | 404: | 243 | 404: |
241 | description: Rôle inconnu | 244 | description: Rôle inconnu |
242 | post: | 245 | post: |
243 | - securedBy: [oauth_2_0] | ||
244 | description: Ajoute une permission à un rôle. Nécessite ROLE_ADMIN | 246 | description: Ajoute une permission à un rôle. Nécessite ROLE_ADMIN |
245 | - queryParameters: | ||
246 | - nom: | ||
247 | - type: string | ||
248 | - required: true | ||
249 | - minLength: 3 | 247 | + body: |
248 | + application/json: | ||
249 | + schema: | | ||
250 | + { | ||
251 | + "type": "object", | ||
252 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
253 | + "id": "http://jsonschema.net", | ||
254 | + "required": true, | ||
255 | + "properties": { | ||
256 | + "nom": { | ||
257 | + "type": "string", | ||
258 | + "required": true | ||
259 | + } | ||
260 | + } | ||
261 | + } | ||
250 | responses: | 262 | responses: |
251 | 201: | 263 | 201: |
252 | description: Permission ajouté avec succès | 264 | description: Permission ajouté avec succès |
253 | 404: | 265 | 404: |
254 | description: Permission ou rôle inconnu | 266 | description: Permission ou rôle inconnu |
255 | /{nomPermission}: | 267 | /{nomPermission}: |
268 | + uriParameters: | ||
269 | + nomPermission: | ||
270 | + type: string | ||
271 | + required: true | ||
272 | + description: nom de la permission | ||
256 | delete: | 273 | delete: |
257 | - securedBy: [oauth_2_0] | ||
258 | description: Enlève la permission du rôle. Nécessite ROLE_ADMIN | 274 | description: Enlève la permission du rôle. Nécessite ROLE_ADMIN |
259 | responses: | 275 | responses: |
260 | 204: | 276 | 204: |
@@ -263,7 +279,6 @@ securitySchemes: | @@ -263,7 +279,6 @@ securitySchemes: | ||
263 | description: Permission ou rôle inconnu | 279 | description: Permission ou rôle inconnu |
264 | /permission: | 280 | /permission: |
265 | get: | 281 | get: |
266 | - securedBy: [oauth_2_0] | ||
267 | description: Liste les permissions. Nécessite ROLE_ADMIN | 282 | description: Liste les permissions. Nécessite ROLE_ADMIN |
268 | responses: | 283 | responses: |
269 | 200: | 284 | 200: |
@@ -278,10 +293,8 @@ securitySchemes: | @@ -278,10 +293,8 @@ securitySchemes: | ||
278 | "nom": "SUPPRIMER_EVNMT" | 293 | "nom": "SUPPRIMER_EVNMT" |
279 | } | 294 | } |
280 | ] | 295 | ] |
281 | - | ||
282 | /evenement: | 296 | /evenement: |
283 | get: | 297 | get: |
284 | - securedBy: [oauth_2_0] | ||
285 | description: Obtenir la liste de tout les evenements. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER | 298 | description: Obtenir la liste de tout les evenements. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER |
286 | responses: | 299 | responses: |
287 | 200: | 300 | 200: |
@@ -291,60 +304,83 @@ securitySchemes: | @@ -291,60 +304,83 @@ securitySchemes: | ||
291 | [ | 304 | [ |
292 | { | 305 | { |
293 | "id": 1, | 306 | "id": 1, |
294 | - "nomEvenement": "patate", | 307 | + "nom": "patate", |
295 | "prix": 4, | 308 | "prix": 4, |
296 | "date": "2001-09-11" | 309 | "date": "2001-09-11" |
297 | }, | 310 | }, |
298 | { | 311 | { |
299 | "id": 2, | 312 | "id": 2, |
300 | - "nomEvenement": "patate flambe", | 313 | + "nom": "patate flambe", |
301 | "prix": 5, | 314 | "prix": 5, |
302 | "date": "2001-09-11" | 315 | "date": "2001-09-11" |
303 | } | 316 | } |
304 | ] | 317 | ] |
305 | post: | 318 | post: |
306 | - securedBy: [oauth_2_0] | ||
307 | description: Permet de creer un nouvel evenement. Nécessite EVNMT_ADMIN | 319 | description: Permet de creer un nouvel evenement. Nécessite EVNMT_ADMIN |
308 | - queryParameters: | ||
309 | - nomEvenement: | ||
310 | - description: Le nom de l'evenement | ||
311 | - type: string | ||
312 | - required: true | ||
313 | - prix: | ||
314 | - description: Le prix de l'evenement | ||
315 | - type: number | ||
316 | - required: true | ||
317 | - date: | ||
318 | - description: La date de l'evenement | ||
319 | - type: date | ||
320 | - required: true | 320 | + body: |
321 | + application/json: | ||
322 | + schema: | | ||
323 | + { | ||
324 | + "type": "object", | ||
325 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
326 | + "id": "http://jsonschema.net", | ||
327 | + "required": true, | ||
328 | + "properties": { | ||
329 | + "nom": { | ||
330 | + "type": "string", | ||
331 | + "required": true | ||
332 | + }, | ||
333 | + "prix": { | ||
334 | + "type": "number", | ||
335 | + "required": true | ||
336 | + }, | ||
337 | + "date": { | ||
338 | + "type": "date", | ||
339 | + "required": true | ||
340 | + } | ||
341 | + } | ||
342 | + } | ||
321 | responses: | 343 | responses: |
322 | 201: | 344 | 201: |
323 | 345 | ||
324 | /{evenementId}: | 346 | /{evenementId}: |
347 | + uriParameters: | ||
348 | + evenementId: | ||
349 | + type: integer | ||
350 | + required: true | ||
351 | + description: id de l'evenement | ||
352 | + minimum: 0 | ||
325 | put: | 353 | put: |
326 | description: Permet de modifier un évènement existant. Nécessite EVNMT_ADMIN | 354 | description: Permet de modifier un évènement existant. Nécessite EVNMT_ADMIN |
327 | - securedBy: [oauth_2_0] | ||
328 | - queryParameters: | ||
329 | - nomEvenement: | ||
330 | - description: Le nom de l'evenement | ||
331 | - type: string | ||
332 | - required: false | ||
333 | - prix: | ||
334 | - description: Le prix de l'evenement | ||
335 | - type: number | ||
336 | - required: false | ||
337 | - date: | ||
338 | - description: La date de l'evenement | ||
339 | - type: date | ||
340 | - required: false | 355 | + body: |
356 | + application/json: | ||
357 | + schema: | | ||
358 | + { | ||
359 | + "type": "object", | ||
360 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
361 | + "id": "http://jsonschema.net", | ||
362 | + "required": true, | ||
363 | + "properties": { | ||
364 | + "nom": { | ||
365 | + "type": "string", | ||
366 | + "required": false | ||
367 | + }, | ||
368 | + "prix": { | ||
369 | + "type": "number", | ||
370 | + "required": false | ||
371 | + }, | ||
372 | + "date": { | ||
373 | + "type": "date", | ||
374 | + "required": false | ||
375 | + } | ||
376 | + } | ||
377 | + } | ||
341 | responses: | 378 | responses: |
342 | 202: | 379 | 202: |
343 | description: Modification pris en compte | 380 | description: Modification pris en compte |
344 | 404: | 381 | 404: |
345 | description: L'evenement n'existe pas | 382 | description: L'evenement n'existe pas |
346 | get: | 383 | get: |
347 | - securedBy: [oauth_2_0] | ||
348 | description: Obtenir l'evenement {evenementId}. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER | 384 | description: Obtenir l'evenement {evenementId}. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER |
349 | responses: | 385 | responses: |
350 | 200: | 386 | 200: |
@@ -354,7 +390,7 @@ securitySchemes: | @@ -354,7 +390,7 @@ securitySchemes: | ||
354 | [ | 390 | [ |
355 | { | 391 | { |
356 | "id": 1, | 392 | "id": 1, |
357 | - "nomEvenement": "patate", | 393 | + "nom": "patate", |
358 | "prix": 4, | 394 | "prix": 4, |
359 | "date": "2001-09-11" | 395 | "date": "2001-09-11" |
360 | } | 396 | } |
@@ -362,18 +398,35 @@ securitySchemes: | @@ -362,18 +398,35 @@ securitySchemes: | ||
362 | 404: | 398 | 404: |
363 | description: Evenement non existant | 399 | description: Evenement non existant |
364 | delete: | 400 | delete: |
365 | - securedBy: [oauth_2_0] | ||
366 | description: Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_ADMIN | 401 | description: Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_ADMIN |
367 | responses: | 402 | responses: |
368 | 200: | 403 | 200: |
369 | description: L'evenement a été bien supprimé | 404 | description: L'evenement a été bien supprimé |
370 | - | ||
371 | - | ||
372 | - | ||
373 | - | 405 | + /participe: |
406 | + post: | ||
407 | + description: Permet de notifier que quelqu'un a participer à l'evenement (id de la personne a envoyer) | ||
408 | + body: | ||
409 | + application/json: | ||
410 | + schema: | | ||
411 | + { | ||
412 | + "type": "object", | ||
413 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
414 | + "id": "http://jsonschema.net", | ||
415 | + "required": true, | ||
416 | + "properties": { | ||
417 | + "id": { | ||
418 | + "type": "integer", | ||
419 | + "required": true | ||
420 | + } | ||
421 | + } | ||
422 | + } | ||
423 | + responses: | ||
424 | + 201: | ||
425 | + description: La personne est bien inscrite a cet evenement ou a bien était ajouté a la liste des participant | ||
426 | + 402: | ||
427 | + description: La personne n'a pas payé pour participer à l'evenement | ||
374 | /consommation: | 428 | /consommation: |
375 | get: | 429 | get: |
376 | - securedBy: [oauth_2_0] | ||
377 | description: Obtenir la liste de toutes les consommations. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER | 430 | description: Obtenir la liste de toutes les consommations. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER |
378 | responses: | 431 | responses: |
379 | 200: | 432 | 200: |
@@ -383,50 +436,72 @@ securitySchemes: | @@ -383,50 +436,72 @@ securitySchemes: | ||
383 | [ | 436 | [ |
384 | { | 437 | { |
385 | "id": 1, | 438 | "id": 1, |
386 | - "nomconsommation": "juis de fruit", | 439 | + "nom": "juis de fruit", |
387 | "prix": 4 | 440 | "prix": 4 |
388 | }, | 441 | }, |
389 | { | 442 | { |
390 | "id": 2, | 443 | "id": 2, |
391 | - "nomEvenement": "juis de fruit flambe", | 444 | + "nom": "juis de fruit flambe", |
392 | "prix": 5 | 445 | "prix": 5 |
393 | } | 446 | } |
394 | ] | 447 | ] |
395 | post: | 448 | post: |
396 | - securedBy: [oauth_2_0] | ||
397 | description: Permet de creer une nouvelle consommation. Nécessite CONSO_ADMIN | 449 | description: Permet de creer une nouvelle consommation. Nécessite CONSO_ADMIN |
398 | - queryParameters: | ||
399 | - nomconsommation: | ||
400 | - description: Le nom de la consommation | ||
401 | - type: string | ||
402 | - required: true | ||
403 | - prix: | ||
404 | - description: Le prix de la consommation | ||
405 | - type: number | ||
406 | - required: true | 450 | + body: |
451 | + application/json: | ||
452 | + schema: | | ||
453 | + { | ||
454 | + "type": "object", | ||
455 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
456 | + "id": "http://jsonschema.net", | ||
457 | + "required": true, | ||
458 | + "properties": { | ||
459 | + "nom": { | ||
460 | + "type": "string", | ||
461 | + "required": true | ||
462 | + }, | ||
463 | + "prix": { | ||
464 | + "type": "number", | ||
465 | + "required": true | ||
466 | + } | ||
467 | + } | ||
468 | + } | ||
407 | responses: | 469 | responses: |
408 | 201: | 470 | 201: |
409 | - | ||
410 | /{consommationId}: | 471 | /{consommationId}: |
472 | + uriParameters: | ||
473 | + consommationId: | ||
474 | + type: integer | ||
475 | + required: true | ||
476 | + description: id de la consommation | ||
477 | + minimum: 0 | ||
411 | put: | 478 | put: |
412 | - securedBy: [oauth_2_0] | ||
413 | description: Permet de modifier une consommation. Nécessite CONSO_ADMIN | 479 | description: Permet de modifier une consommation. Nécessite CONSO_ADMIN |
414 | - queryParameters: | ||
415 | - nomEvenement: | ||
416 | - description: Le nom de la consommation | ||
417 | - type: string | ||
418 | - required: false | ||
419 | - prix: | ||
420 | - description: Le prix de la consommation | ||
421 | - type: number | ||
422 | - required: false | 480 | + body: |
481 | + application/json: | ||
482 | + schema: | | ||
483 | + { | ||
484 | + "type": "object", | ||
485 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
486 | + "id": "http://jsonschema.net", | ||
487 | + "required": true, | ||
488 | + "properties": { | ||
489 | + "nom": { | ||
490 | + "type": "string", | ||
491 | + "required": false | ||
492 | + }, | ||
493 | + "prix": { | ||
494 | + "type": "number", | ||
495 | + "required": false | ||
496 | + } | ||
497 | + } | ||
498 | + } | ||
423 | responses: | 499 | responses: |
424 | 202: | 500 | 202: |
425 | description: Modification pris en compte | 501 | description: Modification pris en compte |
426 | 404: | 502 | 404: |
427 | description: L'evenement n'existe pas | 503 | description: L'evenement n'existe pas |
428 | get: | 504 | get: |
429 | - securedBy: [oauth_2_0] | ||
430 | description: Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER | 505 | description: Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER |
431 | responses: | 506 | responses: |
432 | 200: | 507 | 200: |
@@ -444,43 +519,10 @@ securitySchemes: | @@ -444,43 +519,10 @@ securitySchemes: | ||
444 | 404: | 519 | 404: |
445 | description: consommation non existante | 520 | description: consommation non existante |
446 | delete: | 521 | delete: |
447 | - securedBy: [oauth_2_0] | ||
448 | description: Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN | 522 | description: Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN |
449 | responses: | 523 | responses: |
450 | 200: | 524 | 200: |
451 | description: La consommation a été bien supprime | 525 | description: La consommation a été bien supprime |
452 | -/participe: | ||
453 | - post: | ||
454 | - description: Permet d'ajouter une personne a un evenement | ||
455 | - queryParameters: | ||
456 | - idPersonne: | ||
457 | - type: integer | ||
458 | - required: true | ||
459 | - description: l'identifiant unique de l'utilisateur | ||
460 | - idEvenement: | ||
461 | - type: integer | ||
462 | - required: true | ||
463 | - description: l'identifiant unique d'un evenement | ||
464 | - responses: | ||
465 | - 201: | ||
466 | - description: La personne est bien inscrite a cet evenement | ||
467 | - get: | ||
468 | - description: Permet de savoir si une personne participe a un evenement | ||
469 | - queryParameters: | ||
470 | - idPersonne: | ||
471 | - type: integer | ||
472 | - required: true | ||
473 | - description: l'identifiant unique de l'utilisateur | ||
474 | - idEvenement: | ||
475 | - type: integer | ||
476 | - required: true | ||
477 | - description: l'identifiant unique d'un evenement | ||
478 | - responses: | ||
479 | - 200: | ||
480 | - description: La personne est bien inscrite à l'evenement | ||
481 | - 404: | ||
482 | - description: La personne n'est pas inscrite à l'evenement | ||
483 | - | ||
484 | 526 | ||
485 | /transaction: | 527 | /transaction: |
486 | get: | 528 | get: |
@@ -511,65 +553,85 @@ securitySchemes: | @@ -511,65 +553,85 @@ securitySchemes: | ||
511 | ] | 553 | ] |
512 | /consommation: | 554 | /consommation: |
513 | post: | 555 | post: |
514 | - description: Permet de faire payer ou de crediter un Compte. >0 la personne a crediter de l'argent. <0 la personne a été débité. | ||
515 | - queryParameters: | ||
516 | - participant: | ||
517 | - type: integer | ||
518 | - required: true | ||
519 | - description: L'identifiant de la personne qui utilise son compte | ||
520 | - id: | ||
521 | - type: integer | ||
522 | - required: true | ||
523 | - description: l'indentification de la consommation qui vient d'être payé | 556 | + description: Achat d'une consomation (id) par un participant à un acteur |
557 | + body: | ||
558 | + application/json: | ||
559 | + schema: | | ||
560 | + { | ||
561 | + "type": "object", | ||
562 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
563 | + "id": "http://jsonschema.net", | ||
564 | + "required": true, | ||
565 | + "properties": { | ||
566 | + "participant": { | ||
567 | + "type": "Personne", | ||
568 | + "required": true | ||
569 | + }, | ||
570 | + "id": { | ||
571 | + "type": "Consommation", | ||
572 | + "required": true | ||
573 | + } | ||
574 | + } | ||
575 | + } | ||
524 | responses: | 576 | responses: |
525 | 201: | 577 | 201: |
526 | description: La consommation a été bien payé | 578 | description: La consommation a été bien payé |
527 | /evenement: | 579 | /evenement: |
528 | post: | 580 | post: |
529 | - description: | ||
530 | - queryParameters: | ||
531 | - participant: | ||
532 | - type: integer | ||
533 | - required: true | ||
534 | - description: L'identifiant de la personne qui utilise son compte | ||
535 | - id: | ||
536 | - type: integer | ||
537 | - required: true | ||
538 | - description: l'identifiant de l'evenement | 581 | + body: |
582 | + application/json: | ||
583 | + schema: | | ||
584 | + { | ||
585 | + "type": "object", | ||
586 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
587 | + "id": "http://jsonschema.net", | ||
588 | + "required": true, | ||
589 | + "properties": { | ||
590 | + "participant": { | ||
591 | + "type": "Personne", | ||
592 | + "required": true | ||
593 | + }, | ||
594 | + "id": { | ||
595 | + "type": "Evenement", | ||
596 | + "required": true | ||
597 | + } | ||
598 | + } | ||
599 | + } | ||
539 | responses: | 600 | responses: |
540 | 201: | 601 | 201: |
541 | description: L'evenement a bien été payé | 602 | description: L'evenement a bien été payé |
542 | /credit: | 603 | /credit: |
543 | post: | 604 | post: |
544 | - description: Permet de recharger un compte | ||
545 | - queryParameters: | ||
546 | - participant: | ||
547 | - type: integer | ||
548 | - required: true | ||
549 | - description: L'identifiant de la personne crédité | ||
550 | - prix: | ||
551 | - type: number | ||
552 | - required: true | ||
553 | - description: La valeur credité sur le solde de participant | 605 | + description: Permet de recharger ou debiter un compte |
606 | + body: | ||
607 | + application/json: | ||
608 | + schema: | | ||
609 | + { | ||
610 | + "type": "object", | ||
611 | + "$schema": "http://json-schema.org/draft-03/schema", | ||
612 | + "id": "http://jsonschema.net", | ||
613 | + "required": true, | ||
614 | + "properties": { | ||
615 | + "participant": { | ||
616 | + "type": "Personne", | ||
617 | + "required": true | ||
618 | + }, | ||
619 | + "prix": { | ||
620 | + "type": "number", | ||
621 | + "required": true | ||
622 | + } | ||
623 | + } | ||
624 | + } | ||
554 | responses: | 625 | responses: |
555 | 201: | 626 | 201: |
556 | description: La personne a bien été crédité | 627 | description: La personne a bien été crédité |
557 | - /debit: | ||
558 | - post: | ||
559 | - description: Permet de debiter la carte | ||
560 | - queryParameters: | ||
561 | - participant: | ||
562 | - type: integer | ||
563 | - required: true | ||
564 | - description: L'identifiant de la personne debité | ||
565 | - prix: | ||
566 | - type: number | ||
567 | - required: true | ||
568 | - description: La valeur debité sur le solde de participant | ||
569 | - responses: | ||
570 | - 201: | ||
571 | - description: La personne a bien été débité | ||
572 | - /participant/{idPersonne}: | 628 | + /{idPersonne}: |
629 | + uriParameters: | ||
630 | + idPersonne: | ||
631 | + type: integer | ||
632 | + required: true | ||
633 | + description: id de la personne dont on veut regarder les transactions | ||
634 | + minimum: 0 | ||
573 | get: | 635 | get: |
574 | description: Permet de recuperer la liste des transaction d'une personne | 636 | description: Permet de recuperer la liste des transaction d'une personne |
575 | responses: | 637 | responses: |
@@ -589,7 +651,7 @@ securitySchemes: | @@ -589,7 +651,7 @@ securitySchemes: | ||
589 | }, | 651 | }, |
590 | { | 652 | { |
591 | "participant": 1, | 653 | "participant": 1, |
592 | - "acteur": 12, | 654 | + "acteur": 12, |
593 | "id": 43, | 655 | "id": 43, |
594 | "type": true, | 656 | "type": true, |
595 | "date": "2003-12-01", | 657 | "date": "2003-12-01", |
@@ -597,6 +659,12 @@ securitySchemes: | @@ -597,6 +659,12 @@ securitySchemes: | ||
597 | } | 659 | } |
598 | ] | 660 | ] |
599 | /acteur/{idPersonne}: | 661 | /acteur/{idPersonne}: |
662 | + uriParameters: | ||
663 | + idPersonne: | ||
664 | + type: integer | ||
665 | + required: true | ||
666 | + description: id de la personne dont on veut regarder les transactions | ||
667 | + minimum: 0 | ||
600 | get: | 668 | get: |
601 | description: Permet de recuperer la liste des transaction d'une personne | 669 | description: Permet de recuperer la liste des transaction d'une personne |
602 | responses: | 670 | responses: |
@@ -622,4 +690,4 @@ securitySchemes: | @@ -622,4 +690,4 @@ securitySchemes: | ||
622 | "date": "2003-12-01", | 690 | "date": "2003-12-01", |
623 | "prix": -25.23 | 691 | "prix": -25.23 |
624 | } | 692 | } |
625 | - ] | 693 | - ] |
694 | + ] | ||
626 | \ No newline at end of file | 695 | \ No newline at end of file |
etunicorn-server.iml
@@ -10,7 +10,6 @@ | @@ -10,7 +10,6 @@ | ||
10 | </content> | 10 | </content> |
11 | <orderEntry type="inheritedJdk" /> | 11 | <orderEntry type="inheritedJdk" /> |
12 | <orderEntry type="sourceFolder" forTests="false" /> | 12 | <orderEntry type="sourceFolder" forTests="false" /> |
13 | - <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.16.1" level="project" /> | ||
14 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-rest:1.4.4.RELEASE" level="project" /> | 13 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-rest:1.4.4.RELEASE" level="project" /> |
15 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.4.4.RELEASE" level="project" /> | 14 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.4.4.RELEASE" level="project" /> |
16 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.4.4.RELEASE" level="project" /> | 15 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.4.4.RELEASE" level="project" /> |
@@ -86,5 +85,6 @@ | @@ -86,5 +85,6 @@ | ||
86 | <orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.3" level="project" /> | 85 | <orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.3" level="project" /> |
87 | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.22" level="project" /> | 86 | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.22" level="project" /> |
88 | <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.16.1" level="project" /> | 87 | <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.16.1" level="project" /> |
88 | + <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.3" level="project" /> | ||
89 | </component> | 89 | </component> |
90 | </module> | 90 | </module> |
91 | \ No newline at end of file | 91 | \ No newline at end of file |
pom.xml
@@ -36,7 +36,14 @@ | @@ -36,7 +36,14 @@ | ||
36 | <artifactId>sqlite-jdbc</artifactId> | 36 | <artifactId>sqlite-jdbc</artifactId> |
37 | <version>3.16.1</version> | 37 | <version>3.16.1</version> |
38 | </dependency> | 38 | </dependency> |
39 | - | 39 | + |
40 | + <dependency> | ||
41 | + <groupId>commons-lang</groupId> | ||
42 | + <artifactId>commons-lang</artifactId> | ||
43 | + <version>2.3</version> | ||
44 | + </dependency> | ||
45 | + | ||
46 | + | ||
40 | </dependencies> | 47 | </dependencies> |
41 | 48 | ||
42 | <properties> | 49 | <properties> |
src/main/java/etunicorn/LoginController.java
1 | package etunicorn; | 1 | package etunicorn; |
2 | 2 | ||
3 | +import net.minidev.json.JSONObject; | ||
3 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
4 | import org.springframework.http.HttpStatus; | 5 | import org.springframework.http.HttpStatus; |
5 | import org.springframework.http.ResponseEntity; | 6 | import org.springframework.http.ResponseEntity; |
src/main/java/etunicorn/generated/ConsommationController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | -import java.math.BigDecimal; | 4 | +import etunicorn.generated.model.UpdateConsommationByIdRequest; |
5 | +import etunicorn.generated.model.UpdateConsommationRequest; | ||
5 | import org.springframework.http.ResponseEntity; | 6 | import org.springframework.http.ResponseEntity; |
6 | import org.springframework.web.bind.annotation.PathVariable; | 7 | import org.springframework.web.bind.annotation.PathVariable; |
7 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
8 | import org.springframework.web.bind.annotation.RequestMethod; | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
9 | -import org.springframework.web.bind.annotation.RequestParam; | ||
10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
11 | 11 | ||
12 | 12 | ||
@@ -33,10 +33,9 @@ public interface ConsommationController { | @@ -33,10 +33,9 @@ public interface ConsommationController { | ||
33 | */ | 33 | */ |
34 | @RequestMapping(value = "", method = RequestMethod.POST) | 34 | @RequestMapping(value = "", method = RequestMethod.POST) |
35 | public ResponseEntity<?> updateConsommation( | 35 | public ResponseEntity<?> updateConsommation( |
36 | - @RequestParam | ||
37 | - String nomconsommation, | ||
38 | - @RequestParam | ||
39 | - BigDecimal prix); | 36 | + @javax.validation.Valid |
37 | + @org.springframework.web.bind.annotation.RequestBody | ||
38 | + UpdateConsommationRequest updateConsommationRequest); | ||
40 | 39 | ||
41 | /** | 40 | /** |
42 | * Permet de modifier une consommation. Nécessite CONSO_ADMIN | 41 | * Permet de modifier une consommation. Nécessite CONSO_ADMIN |
@@ -45,11 +44,10 @@ public interface ConsommationController { | @@ -45,11 +44,10 @@ public interface ConsommationController { | ||
45 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.PUT) | 44 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.PUT) |
46 | public ResponseEntity<?> updateConsommationById( | 45 | public ResponseEntity<?> updateConsommationById( |
47 | @PathVariable | 46 | @PathVariable |
48 | - String consommationId, | ||
49 | - @RequestParam(required = false) | ||
50 | - String nomEvenement, | ||
51 | - @RequestParam(required = false) | ||
52 | - BigDecimal prix); | 47 | + Long consommationId, |
48 | + @javax.validation.Valid | ||
49 | + @org.springframework.web.bind.annotation.RequestBody | ||
50 | + UpdateConsommationByIdRequest updateConsommationByIdRequest); | ||
53 | 51 | ||
54 | /** | 52 | /** |
55 | * Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER | 53 | * Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER |
@@ -58,7 +56,7 @@ public interface ConsommationController { | @@ -58,7 +56,7 @@ public interface ConsommationController { | ||
58 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.GET) | 56 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.GET) |
59 | public ResponseEntity<?> getConsommationById( | 57 | public ResponseEntity<?> getConsommationById( |
60 | @PathVariable | 58 | @PathVariable |
61 | - String consommationId); | 59 | + Long consommationId); |
62 | 60 | ||
63 | /** | 61 | /** |
64 | * Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN | 62 | * Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN |
@@ -67,6 +65,6 @@ public interface ConsommationController { | @@ -67,6 +65,6 @@ public interface ConsommationController { | ||
67 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.DELETE) | 65 | @RequestMapping(value = "/{consommationId}", method = RequestMethod.DELETE) |
68 | public ResponseEntity<?> deleteConsommationById( | 66 | public ResponseEntity<?> deleteConsommationById( |
69 | @PathVariable | 67 | @PathVariable |
70 | - String consommationId); | 68 | + Long consommationId); |
71 | 69 | ||
72 | } | 70 | } |
src/main/java/etunicorn/generated/EvenementController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | -import java.math.BigDecimal; | ||
5 | -import java.util.Date; | 4 | +import etunicorn.generated.model.UpdateEvenementByIdRequest; |
5 | +import etunicorn.generated.model.UpdateEvenementRequest; | ||
6 | +import etunicorn.generated.model.UpdateParticipeRequest; | ||
6 | import org.springframework.http.ResponseEntity; | 7 | import org.springframework.http.ResponseEntity; |
7 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
8 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
9 | import org.springframework.web.bind.annotation.RequestMethod; | 10 | import org.springframework.web.bind.annotation.RequestMethod; |
10 | -import org.springframework.web.bind.annotation.RequestParam; | ||
11 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
12 | 12 | ||
13 | 13 | ||
@@ -34,12 +34,9 @@ public interface EvenementController { | @@ -34,12 +34,9 @@ public interface EvenementController { | ||
34 | */ | 34 | */ |
35 | @RequestMapping(value = "", method = RequestMethod.POST) | 35 | @RequestMapping(value = "", method = RequestMethod.POST) |
36 | public ResponseEntity<?> updateEvenement( | 36 | public ResponseEntity<?> updateEvenement( |
37 | - @RequestParam | ||
38 | - String nomEvenement, | ||
39 | - @RequestParam | ||
40 | - BigDecimal prix, | ||
41 | - @RequestParam | ||
42 | - Date date); | 37 | + @javax.validation.Valid |
38 | + @org.springframework.web.bind.annotation.RequestBody | ||
39 | + UpdateEvenementRequest updateEvenementRequest); | ||
43 | 40 | ||
44 | /** | 41 | /** |
45 | * Permet de modifier un évènement existant. Nécessite EVNMT_ADMIN | 42 | * Permet de modifier un évènement existant. Nécessite EVNMT_ADMIN |
@@ -48,13 +45,10 @@ public interface EvenementController { | @@ -48,13 +45,10 @@ public interface EvenementController { | ||
48 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.PUT) | 45 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.PUT) |
49 | public ResponseEntity<?> updateEvenementById( | 46 | public ResponseEntity<?> updateEvenementById( |
50 | @PathVariable | 47 | @PathVariable |
51 | - String evenementId, | ||
52 | - @RequestParam(required = false) | ||
53 | - String nomEvenement, | ||
54 | - @RequestParam(required = false) | ||
55 | - BigDecimal prix, | ||
56 | - @RequestParam(required = false) | ||
57 | - Date date); | 48 | + Long evenementId, |
49 | + @javax.validation.Valid | ||
50 | + @org.springframework.web.bind.annotation.RequestBody | ||
51 | + UpdateEvenementByIdRequest updateEvenementByIdRequest); | ||
58 | 52 | ||
59 | /** | 53 | /** |
60 | * Obtenir l'evenement {evenementId}. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER | 54 | * Obtenir l'evenement {evenementId}. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER |
@@ -63,7 +57,7 @@ public interface EvenementController { | @@ -63,7 +57,7 @@ public interface EvenementController { | ||
63 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.GET) | 57 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.GET) |
64 | public ResponseEntity<?> getEvenementById( | 58 | public ResponseEntity<?> getEvenementById( |
65 | @PathVariable | 59 | @PathVariable |
66 | - String evenementId); | 60 | + Long evenementId); |
67 | 61 | ||
68 | /** | 62 | /** |
69 | * Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_ADMIN | 63 | * Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_ADMIN |
@@ -72,6 +66,18 @@ public interface EvenementController { | @@ -72,6 +66,18 @@ public interface EvenementController { | ||
72 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.DELETE) | 66 | @RequestMapping(value = "/{evenementId}", method = RequestMethod.DELETE) |
73 | public ResponseEntity<?> deleteEvenementById( | 67 | public ResponseEntity<?> deleteEvenementById( |
74 | @PathVariable | 68 | @PathVariable |
75 | - String evenementId); | 69 | + Long evenementId); |
70 | + | ||
71 | + /** | ||
72 | + * Permet de notifier que quelqu'un a participer à l'evenement (id de la personne a envoyer) | ||
73 | + * | ||
74 | + */ | ||
75 | + @RequestMapping(value = "/{evenementId}/participe", method = RequestMethod.POST) | ||
76 | + public ResponseEntity<?> updateParticipe( | ||
77 | + @PathVariable | ||
78 | + Long evenementId, | ||
79 | + @javax.validation.Valid | ||
80 | + @org.springframework.web.bind.annotation.RequestBody | ||
81 | + UpdateParticipeRequest updateParticipeRequest); | ||
76 | 82 | ||
77 | } | 83 | } |
src/main/java/etunicorn/generated/LoginController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | +import javax.validation.Valid; | ||
5 | +import etunicorn.generated.model.UpdateLoginRequest; | ||
4 | import org.springframework.http.ResponseEntity; | 6 | import org.springframework.http.ResponseEntity; |
5 | import org.springframework.web.bind.annotation.PathVariable; | 7 | import org.springframework.web.bind.annotation.PathVariable; |
8 | +import org.springframework.web.bind.annotation.RequestBody; | ||
6 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
7 | import org.springframework.web.bind.annotation.RequestMethod; | 10 | import org.springframework.web.bind.annotation.RequestMethod; |
8 | -import org.springframework.web.bind.annotation.RequestParam; | ||
9 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
10 | 12 | ||
11 | 13 | ||
@@ -25,10 +27,9 @@ public interface LoginController { | @@ -25,10 +27,9 @@ public interface LoginController { | ||
25 | */ | 27 | */ |
26 | @RequestMapping(value = "", method = RequestMethod.POST) | 28 | @RequestMapping(value = "", method = RequestMethod.POST) |
27 | public ResponseEntity<?> updateLogin( | 29 | public ResponseEntity<?> updateLogin( |
28 | - @RequestParam | ||
29 | - String login, | ||
30 | - @RequestParam(required = false) | ||
31 | - String password); | 30 | + @Valid |
31 | + @RequestBody | ||
32 | + UpdateLoginRequest updateLoginRequest); | ||
32 | 33 | ||
33 | /** | 34 | /** |
34 | * Se déconnecter | 35 | * Se déconnecter |
src/main/java/etunicorn/generated/ParticipeController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | +import javax.validation.Valid; | ||
5 | +import etunicorn.generated.model.UpdateParticipeRequest; | ||
4 | import org.springframework.http.ResponseEntity; | 6 | import org.springframework.http.ResponseEntity; |
7 | +import org.springframework.web.bind.annotation.RequestBody; | ||
5 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
6 | import org.springframework.web.bind.annotation.RequestMethod; | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
7 | -import org.springframework.web.bind.annotation.RequestParam; | ||
8 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
9 | 11 | ||
10 | 12 | ||
@@ -24,20 +26,8 @@ public interface ParticipeController { | @@ -24,20 +26,8 @@ public interface ParticipeController { | ||
24 | */ | 26 | */ |
25 | @RequestMapping(value = "", method = RequestMethod.POST) | 27 | @RequestMapping(value = "", method = RequestMethod.POST) |
26 | public ResponseEntity<?> updateParticipe( | 28 | public ResponseEntity<?> updateParticipe( |
27 | - @RequestParam | ||
28 | - Long idPersonne, | ||
29 | - @RequestParam | ||
30 | - Long idEvenement); | ||
31 | - | ||
32 | - /** | ||
33 | - * Permet de savoir si une personne participe a un evenement | ||
34 | - * | ||
35 | - */ | ||
36 | - @RequestMapping(value = "", method = RequestMethod.GET) | ||
37 | - public ResponseEntity<?> getParticipe( | ||
38 | - @RequestParam | ||
39 | - Long idPersonne, | ||
40 | - @RequestParam | ||
41 | - Long idEvenement); | 29 | + @Valid |
30 | + @RequestBody | ||
31 | + UpdateParticipeRequest updateParticipeRequest); | ||
42 | 32 | ||
43 | } | 33 | } |
src/main/java/etunicorn/generated/PersonneController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | -import org.springframework.http.ResponseEntity; | ||
5 | -import org.springframework.web.bind.annotation.*; | ||
6 | - | ||
7 | import java.math.BigDecimal; | 4 | import java.math.BigDecimal; |
8 | -import java.util.Date; | 5 | +import etunicorn.generated.model.UpdatePersonneByIdRequest; |
6 | +import etunicorn.generated.model.UpdatePersonneRequest; | ||
7 | +import org.springframework.http.ResponseEntity; | ||
8 | +import org.springframework.web.bind.annotation.PathVariable; | ||
9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
10 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
11 | +import org.springframework.web.bind.annotation.RestController; | ||
9 | 12 | ||
10 | 13 | ||
11 | /** | 14 | /** |
@@ -23,56 +26,46 @@ public interface PersonneController { | @@ -23,56 +26,46 @@ public interface PersonneController { | ||
23 | * | 26 | * |
24 | */ | 27 | */ |
25 | @RequestMapping(value = "", method = RequestMethod.GET) | 28 | @RequestMapping(value = "", method = RequestMethod.GET) |
26 | - ResponseEntity<?> getPersonne(); | 29 | + public ResponseEntity<?> getPersonne(); |
27 | 30 | ||
28 | /** | 31 | /** |
29 | * Ajoute une nouvelle personne | 32 | * Ajoute une nouvelle personne |
30 | * | 33 | * |
31 | */ | 34 | */ |
32 | @RequestMapping(value = "", method = RequestMethod.POST) | 35 | @RequestMapping(value = "", method = RequestMethod.POST) |
33 | - ResponseEntity<?> updatePersonne( | ||
34 | - @RequestParam(required = false) | ||
35 | - String carte, | ||
36 | - @RequestParam(required = false) | ||
37 | - Date naissance, | ||
38 | - @RequestParam(required = false) | ||
39 | - String login, | ||
40 | - @RequestParam(required = false) | ||
41 | - String role); | 36 | + public ResponseEntity<?> updatePersonne( |
37 | + @javax.validation.Valid | ||
38 | + @org.springframework.web.bind.annotation.RequestBody | ||
39 | + UpdatePersonneRequest updatePersonneRequest); | ||
42 | 40 | ||
43 | /** | 41 | /** |
44 | * Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN | 42 | * Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN |
45 | * | 43 | * |
46 | */ | 44 | */ |
47 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.GET) | 45 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.GET) |
48 | - ResponseEntity<?> getPersonneById( | ||
49 | - @PathVariable | ||
50 | - BigDecimal idPersonne); | 46 | + public ResponseEntity<?> getPersonneById( |
47 | + @PathVariable | ||
48 | + BigDecimal idPersonne); | ||
51 | 49 | ||
52 | /** | 50 | /** |
53 | * Modifer les infos d'une personne. Nécessite COMPTE_ADMIN | 51 | * Modifer les infos d'une personne. Nécessite COMPTE_ADMIN |
54 | * | 52 | * |
55 | */ | 53 | */ |
56 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.PUT) | 54 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.PUT) |
57 | - ResponseEntity<?> updatePersonneById( | ||
58 | - @PathVariable | ||
59 | - BigDecimal idPersonne, | ||
60 | - @RequestParam(required = false) | ||
61 | - String carte, | ||
62 | - @RequestParam(required = false) | ||
63 | - Date naissance, | ||
64 | - @RequestParam(required = false) | ||
65 | - String login, | ||
66 | - @RequestParam(required = false) | ||
67 | - String role); | 55 | + public ResponseEntity<?> updatePersonneById( |
56 | + @PathVariable | ||
57 | + BigDecimal idPersonne, | ||
58 | + @javax.validation.Valid | ||
59 | + @org.springframework.web.bind.annotation.RequestBody | ||
60 | + UpdatePersonneByIdRequest updatePersonneByIdRequest); | ||
68 | 61 | ||
69 | /** | 62 | /** |
70 | * Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN | 63 | * Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN |
71 | * | 64 | * |
72 | */ | 65 | */ |
73 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.DELETE) | 66 | @RequestMapping(value = "/{idPersonne}", method = RequestMethod.DELETE) |
74 | - ResponseEntity<?> deletePersonneById( | ||
75 | - @PathVariable | ||
76 | - BigDecimal idPersonne); | 67 | + public ResponseEntity<?> deletePersonneById( |
68 | + @PathVariable | ||
69 | + BigDecimal idPersonne); | ||
77 | 70 | ||
78 | } | 71 | } |
src/main/java/etunicorn/generated/RoleController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | +import java.math.BigDecimal; | ||
5 | +import etunicorn.generated.model.UpdateRoleByIdRequest; | ||
6 | +import etunicorn.generated.model.UpdateRoleRequest; | ||
4 | import org.springframework.http.ResponseEntity; | 7 | import org.springframework.http.ResponseEntity; |
5 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
6 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
7 | import org.springframework.web.bind.annotation.RequestMethod; | 10 | import org.springframework.web.bind.annotation.RequestMethod; |
8 | -import org.springframework.web.bind.annotation.RequestParam; | ||
9 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
10 | 12 | ||
11 | 13 | ||
@@ -32,8 +34,9 @@ public interface RoleController { | @@ -32,8 +34,9 @@ public interface RoleController { | ||
32 | */ | 34 | */ |
33 | @RequestMapping(value = "", method = RequestMethod.POST) | 35 | @RequestMapping(value = "", method = RequestMethod.POST) |
34 | public ResponseEntity<?> updateRole( | 36 | public ResponseEntity<?> updateRole( |
35 | - @RequestParam | ||
36 | - String nom); | 37 | + @javax.validation.Valid |
38 | + @org.springframework.web.bind.annotation.RequestBody | ||
39 | + UpdateRoleRequest updateRoleRequest); | ||
37 | 40 | ||
38 | /** | 41 | /** |
39 | * Supprime un rôle. Nécessite ROLE_ADMIN | 42 | * Supprime un rôle. Nécessite ROLE_ADMIN |
@@ -42,7 +45,7 @@ public interface RoleController { | @@ -42,7 +45,7 @@ public interface RoleController { | ||
42 | @RequestMapping(value = "/{nomRole}", method = RequestMethod.DELETE) | 45 | @RequestMapping(value = "/{nomRole}", method = RequestMethod.DELETE) |
43 | public ResponseEntity<?> deleteRoleById( | 46 | public ResponseEntity<?> deleteRoleById( |
44 | @PathVariable | 47 | @PathVariable |
45 | - String nomRole); | 48 | + BigDecimal nomRole); |
46 | 49 | ||
47 | /** | 50 | /** |
48 | * Ajoute une permission à un rôle. Nécessite ROLE_ADMIN | 51 | * Ajoute une permission à un rôle. Nécessite ROLE_ADMIN |
@@ -51,9 +54,10 @@ public interface RoleController { | @@ -51,9 +54,10 @@ public interface RoleController { | ||
51 | @RequestMapping(value = "/{nomRole}", method = RequestMethod.POST) | 54 | @RequestMapping(value = "/{nomRole}", method = RequestMethod.POST) |
52 | public ResponseEntity<?> updateRoleById( | 55 | public ResponseEntity<?> updateRoleById( |
53 | @PathVariable | 56 | @PathVariable |
54 | - String nomRole, | ||
55 | - @RequestParam | ||
56 | - String nom); | 57 | + BigDecimal nomRole, |
58 | + @javax.validation.Valid | ||
59 | + @org.springframework.web.bind.annotation.RequestBody | ||
60 | + UpdateRoleByIdRequest updateRoleByIdRequest); | ||
57 | 61 | ||
58 | /** | 62 | /** |
59 | * Enlève la permission du rôle. Nécessite ROLE_ADMIN | 63 | * Enlève la permission du rôle. Nécessite ROLE_ADMIN |
@@ -64,7 +68,7 @@ public interface RoleController { | @@ -64,7 +68,7 @@ public interface RoleController { | ||
64 | @PathVariable | 68 | @PathVariable |
65 | String nomPermission, | 69 | String nomPermission, |
66 | @PathVariable | 70 | @PathVariable |
67 | - String nomRole); | 71 | + BigDecimal nomRole); |
68 | 72 | ||
69 | /** | 73 | /** |
70 | * Liste les permissions. Nécessite ROLE_ADMIN | 74 | * Liste les permissions. Nécessite ROLE_ADMIN |
src/main/java/etunicorn/generated/TransactionController.java
1 | 1 | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | -import java.math.BigDecimal; | 4 | +import etunicorn.generated.model.UpdateConsommationRequest; |
5 | +import etunicorn.generated.model.UpdateEvenementCreditRequest; | ||
6 | +import etunicorn.generated.model.UpdateEvenementRequest; | ||
5 | import org.springframework.http.ResponseEntity; | 7 | import org.springframework.http.ResponseEntity; |
6 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
7 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
8 | import org.springframework.web.bind.annotation.RequestMethod; | 10 | import org.springframework.web.bind.annotation.RequestMethod; |
9 | -import org.springframework.web.bind.annotation.RequestParam; | ||
10 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
11 | 12 | ||
12 | 13 | ||
@@ -28,57 +29,43 @@ public interface TransactionController { | @@ -28,57 +29,43 @@ public interface TransactionController { | ||
28 | public ResponseEntity<?> getTransaction(); | 29 | public ResponseEntity<?> getTransaction(); |
29 | 30 | ||
30 | /** | 31 | /** |
31 | - * Permet de faire payer ou de crediter un Compte. >0 la personne a crediter de l'argent. <0 la personne a été débité. | 32 | + * Achat d'une consomation (id) par un participant à un acteur |
32 | * | 33 | * |
33 | */ | 34 | */ |
34 | @RequestMapping(value = "/consommation", method = RequestMethod.POST) | 35 | @RequestMapping(value = "/consommation", method = RequestMethod.POST) |
35 | public ResponseEntity<?> updateConsommation( | 36 | public ResponseEntity<?> updateConsommation( |
36 | - @RequestParam | ||
37 | - Long participant, | ||
38 | - @RequestParam | ||
39 | - Long id); | 37 | + @javax.validation.Valid |
38 | + @org.springframework.web.bind.annotation.RequestBody | ||
39 | + UpdateConsommationRequest updateConsommationRequest); | ||
40 | 40 | ||
41 | /** | 41 | /** |
42 | - * | 42 | + * No description |
43 | * | 43 | * |
44 | */ | 44 | */ |
45 | @RequestMapping(value = "/evenement", method = RequestMethod.POST) | 45 | @RequestMapping(value = "/evenement", method = RequestMethod.POST) |
46 | public ResponseEntity<?> updateEvenement( | 46 | public ResponseEntity<?> updateEvenement( |
47 | - @RequestParam | ||
48 | - Long participant, | ||
49 | - @RequestParam | ||
50 | - Long id); | 47 | + @javax.validation.Valid |
48 | + @org.springframework.web.bind.annotation.RequestBody | ||
49 | + UpdateEvenementRequest updateEvenementRequest); | ||
51 | 50 | ||
52 | /** | 51 | /** |
53 | - * Permet de recharger un compte | 52 | + * Permet de recharger ou debiter un compte |
54 | * | 53 | * |
55 | */ | 54 | */ |
56 | @RequestMapping(value = "/evenement/credit", method = RequestMethod.POST) | 55 | @RequestMapping(value = "/evenement/credit", method = RequestMethod.POST) |
57 | public ResponseEntity<?> updateEvenementCredit( | 56 | public ResponseEntity<?> updateEvenementCredit( |
58 | - @RequestParam | ||
59 | - Long participant, | ||
60 | - @RequestParam | ||
61 | - BigDecimal prix); | ||
62 | - | ||
63 | - /** | ||
64 | - * Permet de debiter la carte | ||
65 | - * | ||
66 | - */ | ||
67 | - @RequestMapping(value = "/evenement/debit", method = RequestMethod.POST) | ||
68 | - public ResponseEntity<?> updateEvenementDebit( | ||
69 | - @RequestParam | ||
70 | - Long participant, | ||
71 | - @RequestParam | ||
72 | - BigDecimal prix); | 57 | + @javax.validation.Valid |
58 | + @org.springframework.web.bind.annotation.RequestBody | ||
59 | + UpdateEvenementCreditRequest updateEvenementCreditRequest); | ||
73 | 60 | ||
74 | /** | 61 | /** |
75 | * Permet de recuperer la liste des transaction d'une personne | 62 | * Permet de recuperer la liste des transaction d'une personne |
76 | * | 63 | * |
77 | */ | 64 | */ |
78 | - @RequestMapping(value = "/participant/{idPersonne}", method = RequestMethod.GET) | ||
79 | - public ResponseEntity<?> getParticipantByIdPersonne( | 65 | + @RequestMapping(value = "/{idPersonne}", method = RequestMethod.GET) |
66 | + public ResponseEntity<?> getTransactionByIdPersonne( | ||
80 | @PathVariable | 67 | @PathVariable |
81 | - String idPersonne); | 68 | + Long idPersonne); |
82 | 69 | ||
83 | /** | 70 | /** |
84 | * Permet de recuperer la liste des transaction d'une personne | 71 | * Permet de recuperer la liste des transaction d'une personne |
@@ -87,6 +74,6 @@ public interface TransactionController { | @@ -87,6 +74,6 @@ public interface TransactionController { | ||
87 | @RequestMapping(value = "/acteur/{idPersonne}", method = RequestMethod.GET) | 74 | @RequestMapping(value = "/acteur/{idPersonne}", method = RequestMethod.GET) |
88 | public ResponseEntity<?> getActeurByIdPersonne( | 75 | public ResponseEntity<?> getActeurByIdPersonne( |
89 | @PathVariable | 76 | @PathVariable |
90 | - String idPersonne); | 77 | + Long idPersonne); |
91 | 78 | ||
92 | } | 79 | } |
src/main/java/etunicorn/generated/model/UpdateConsommationByIdRequest.java
0 → 100644
@@ -0,0 +1,108 @@ | @@ -0,0 +1,108 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "nom", | ||
19 | + "prix" | ||
20 | +}) | ||
21 | +public class UpdateConsommationByIdRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + */ | ||
26 | + @JsonProperty("nom") | ||
27 | + private String nom; | ||
28 | + /** | ||
29 | + * | ||
30 | + */ | ||
31 | + @JsonProperty("prix") | ||
32 | + private Float prix; | ||
33 | + @JsonIgnore | ||
34 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
35 | + | ||
36 | + /** | ||
37 | + * | ||
38 | + * @return | ||
39 | + * The nom | ||
40 | + */ | ||
41 | + @JsonProperty("nom") | ||
42 | + public String getNom() { | ||
43 | + return nom; | ||
44 | + } | ||
45 | + | ||
46 | + /** | ||
47 | + * | ||
48 | + * @param nom | ||
49 | + * The nom | ||
50 | + */ | ||
51 | + @JsonProperty("nom") | ||
52 | + public void setNom(String nom) { | ||
53 | + this.nom = nom; | ||
54 | + } | ||
55 | + | ||
56 | + /** | ||
57 | + * | ||
58 | + * @return | ||
59 | + * The prix | ||
60 | + */ | ||
61 | + @JsonProperty("prix") | ||
62 | + public Float getPrix() { | ||
63 | + return prix; | ||
64 | + } | ||
65 | + | ||
66 | + /** | ||
67 | + * | ||
68 | + * @param prix | ||
69 | + * The prix | ||
70 | + */ | ||
71 | + @JsonProperty("prix") | ||
72 | + public void setPrix(Float prix) { | ||
73 | + this.prix = prix; | ||
74 | + } | ||
75 | + | ||
76 | + @Override | ||
77 | + public String toString() { | ||
78 | + return ToStringBuilder.reflectionToString(this); | ||
79 | + } | ||
80 | + | ||
81 | + @JsonAnyGetter | ||
82 | + public Map<String, Object> getAdditionalProperties() { | ||
83 | + return this.additionalProperties; | ||
84 | + } | ||
85 | + | ||
86 | + @JsonAnySetter | ||
87 | + public void setAdditionalProperty(String name, Object value) { | ||
88 | + this.additionalProperties.put(name, value); | ||
89 | + } | ||
90 | + | ||
91 | + @Override | ||
92 | + public int hashCode() { | ||
93 | + return new HashCodeBuilder().append(nom).append(prix).append(additionalProperties).toHashCode(); | ||
94 | + } | ||
95 | + | ||
96 | + @Override | ||
97 | + public boolean equals(Object other) { | ||
98 | + if (other == this) { | ||
99 | + return true; | ||
100 | + } | ||
101 | + if ((other instanceof UpdateConsommationByIdRequest) == false) { | ||
102 | + return false; | ||
103 | + } | ||
104 | + UpdateConsommationByIdRequest rhs = ((UpdateConsommationByIdRequest) other); | ||
105 | + return new EqualsBuilder().append(nom, rhs.nom).append(prix, rhs.prix).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
106 | + } | ||
107 | + | ||
108 | +} |
src/main/java/etunicorn/generated/model/UpdateConsommationRequest.java
0 → 100644
@@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "participant", | ||
19 | + "id" | ||
20 | +}) | ||
21 | +public class UpdateConsommationRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + * (Required) | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("participant") | ||
29 | + private Object participant; | ||
30 | + /** | ||
31 | + * | ||
32 | + * (Required) | ||
33 | + * | ||
34 | + */ | ||
35 | + @JsonProperty("id") | ||
36 | + private Object id; | ||
37 | + @JsonIgnore | ||
38 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
39 | + | ||
40 | + /** | ||
41 | + * | ||
42 | + * (Required) | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The participant | ||
46 | + */ | ||
47 | + @JsonProperty("participant") | ||
48 | + public Object getParticipant() { | ||
49 | + return participant; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * (Required) | ||
55 | + * | ||
56 | + * @param participant | ||
57 | + * The participant | ||
58 | + */ | ||
59 | + @JsonProperty("participant") | ||
60 | + public void setParticipant(Object participant) { | ||
61 | + this.participant = participant; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * | ||
66 | + * (Required) | ||
67 | + * | ||
68 | + * @return | ||
69 | + * The id | ||
70 | + */ | ||
71 | + @JsonProperty("id") | ||
72 | + public Object getId() { | ||
73 | + return id; | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * | ||
78 | + * (Required) | ||
79 | + * | ||
80 | + * @param id | ||
81 | + * The id | ||
82 | + */ | ||
83 | + @JsonProperty("id") | ||
84 | + public void setId(Object id) { | ||
85 | + this.id = id; | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public String toString() { | ||
90 | + return ToStringBuilder.reflectionToString(this); | ||
91 | + } | ||
92 | + | ||
93 | + @JsonAnyGetter | ||
94 | + public Map<String, Object> getAdditionalProperties() { | ||
95 | + return this.additionalProperties; | ||
96 | + } | ||
97 | + | ||
98 | + @JsonAnySetter | ||
99 | + public void setAdditionalProperty(String name, Object value) { | ||
100 | + this.additionalProperties.put(name, value); | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public int hashCode() { | ||
105 | + return new HashCodeBuilder().append(participant).append(id).append(additionalProperties).toHashCode(); | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public boolean equals(Object other) { | ||
110 | + if (other == this) { | ||
111 | + return true; | ||
112 | + } | ||
113 | + if ((other instanceof UpdateConsommationRequest) == false) { | ||
114 | + return false; | ||
115 | + } | ||
116 | + UpdateConsommationRequest rhs = ((UpdateConsommationRequest) other); | ||
117 | + return new EqualsBuilder().append(participant, rhs.participant).append(id, rhs.id).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/etunicorn/generated/model/UpdateEvenementByIdRequest.java
0 → 100644
@@ -0,0 +1,134 @@ | @@ -0,0 +1,134 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "nom", | ||
19 | + "prix", | ||
20 | + "date" | ||
21 | +}) | ||
22 | +public class UpdateEvenementByIdRequest { | ||
23 | + | ||
24 | + /** | ||
25 | + * | ||
26 | + */ | ||
27 | + @JsonProperty("nom") | ||
28 | + private String nom; | ||
29 | + /** | ||
30 | + * | ||
31 | + */ | ||
32 | + @JsonProperty("prix") | ||
33 | + private Float prix; | ||
34 | + /** | ||
35 | + * | ||
36 | + */ | ||
37 | + @JsonProperty("date") | ||
38 | + private Object date; | ||
39 | + @JsonIgnore | ||
40 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
41 | + | ||
42 | + /** | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The nom | ||
46 | + */ | ||
47 | + @JsonProperty("nom") | ||
48 | + public String getNom() { | ||
49 | + return nom; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * @param nom | ||
55 | + * The nom | ||
56 | + */ | ||
57 | + @JsonProperty("nom") | ||
58 | + public void setNom(String nom) { | ||
59 | + this.nom = nom; | ||
60 | + } | ||
61 | + | ||
62 | + /** | ||
63 | + * | ||
64 | + * @return | ||
65 | + * The prix | ||
66 | + */ | ||
67 | + @JsonProperty("prix") | ||
68 | + public Float getPrix() { | ||
69 | + return prix; | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * | ||
74 | + * @param prix | ||
75 | + * The prix | ||
76 | + */ | ||
77 | + @JsonProperty("prix") | ||
78 | + public void setPrix(Float prix) { | ||
79 | + this.prix = prix; | ||
80 | + } | ||
81 | + | ||
82 | + /** | ||
83 | + * | ||
84 | + * @return | ||
85 | + * The date | ||
86 | + */ | ||
87 | + @JsonProperty("date") | ||
88 | + public Object getDate() { | ||
89 | + return date; | ||
90 | + } | ||
91 | + | ||
92 | + /** | ||
93 | + * | ||
94 | + * @param date | ||
95 | + * The date | ||
96 | + */ | ||
97 | + @JsonProperty("date") | ||
98 | + public void setDate(Object date) { | ||
99 | + this.date = date; | ||
100 | + } | ||
101 | + | ||
102 | + @Override | ||
103 | + public String toString() { | ||
104 | + return ToStringBuilder.reflectionToString(this); | ||
105 | + } | ||
106 | + | ||
107 | + @JsonAnyGetter | ||
108 | + public Map<String, Object> getAdditionalProperties() { | ||
109 | + return this.additionalProperties; | ||
110 | + } | ||
111 | + | ||
112 | + @JsonAnySetter | ||
113 | + public void setAdditionalProperty(String name, Object value) { | ||
114 | + this.additionalProperties.put(name, value); | ||
115 | + } | ||
116 | + | ||
117 | + @Override | ||
118 | + public int hashCode() { | ||
119 | + return new HashCodeBuilder().append(nom).append(prix).append(date).append(additionalProperties).toHashCode(); | ||
120 | + } | ||
121 | + | ||
122 | + @Override | ||
123 | + public boolean equals(Object other) { | ||
124 | + if (other == this) { | ||
125 | + return true; | ||
126 | + } | ||
127 | + if ((other instanceof UpdateEvenementByIdRequest) == false) { | ||
128 | + return false; | ||
129 | + } | ||
130 | + UpdateEvenementByIdRequest rhs = ((UpdateEvenementByIdRequest) other); | ||
131 | + return new EqualsBuilder().append(nom, rhs.nom).append(prix, rhs.prix).append(date, rhs.date).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
132 | + } | ||
133 | + | ||
134 | +} |
src/main/java/etunicorn/generated/model/UpdateEvenementCreditRequest.java
0 → 100644
@@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "participant", | ||
19 | + "prix" | ||
20 | +}) | ||
21 | +public class UpdateEvenementCreditRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + * (Required) | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("participant") | ||
29 | + private Object participant; | ||
30 | + /** | ||
31 | + * | ||
32 | + * (Required) | ||
33 | + * | ||
34 | + */ | ||
35 | + @JsonProperty("prix") | ||
36 | + private Float prix; | ||
37 | + @JsonIgnore | ||
38 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
39 | + | ||
40 | + /** | ||
41 | + * | ||
42 | + * (Required) | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The participant | ||
46 | + */ | ||
47 | + @JsonProperty("participant") | ||
48 | + public Object getParticipant() { | ||
49 | + return participant; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * (Required) | ||
55 | + * | ||
56 | + * @param participant | ||
57 | + * The participant | ||
58 | + */ | ||
59 | + @JsonProperty("participant") | ||
60 | + public void setParticipant(Object participant) { | ||
61 | + this.participant = participant; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * | ||
66 | + * (Required) | ||
67 | + * | ||
68 | + * @return | ||
69 | + * The prix | ||
70 | + */ | ||
71 | + @JsonProperty("prix") | ||
72 | + public Float getPrix() { | ||
73 | + return prix; | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * | ||
78 | + * (Required) | ||
79 | + * | ||
80 | + * @param prix | ||
81 | + * The prix | ||
82 | + */ | ||
83 | + @JsonProperty("prix") | ||
84 | + public void setPrix(Float prix) { | ||
85 | + this.prix = prix; | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public String toString() { | ||
90 | + return ToStringBuilder.reflectionToString(this); | ||
91 | + } | ||
92 | + | ||
93 | + @JsonAnyGetter | ||
94 | + public Map<String, Object> getAdditionalProperties() { | ||
95 | + return this.additionalProperties; | ||
96 | + } | ||
97 | + | ||
98 | + @JsonAnySetter | ||
99 | + public void setAdditionalProperty(String name, Object value) { | ||
100 | + this.additionalProperties.put(name, value); | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public int hashCode() { | ||
105 | + return new HashCodeBuilder().append(participant).append(prix).append(additionalProperties).toHashCode(); | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public boolean equals(Object other) { | ||
110 | + if (other == this) { | ||
111 | + return true; | ||
112 | + } | ||
113 | + if ((other instanceof UpdateEvenementCreditRequest) == false) { | ||
114 | + return false; | ||
115 | + } | ||
116 | + UpdateEvenementCreditRequest rhs = ((UpdateEvenementCreditRequest) other); | ||
117 | + return new EqualsBuilder().append(participant, rhs.participant).append(prix, rhs.prix).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/etunicorn/generated/model/UpdateEvenementRequest.java
0 → 100644
@@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "participant", | ||
19 | + "id" | ||
20 | +}) | ||
21 | +public class UpdateEvenementRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + * (Required) | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("participant") | ||
29 | + private Object participant; | ||
30 | + /** | ||
31 | + * | ||
32 | + * (Required) | ||
33 | + * | ||
34 | + */ | ||
35 | + @JsonProperty("id") | ||
36 | + private Object id; | ||
37 | + @JsonIgnore | ||
38 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
39 | + | ||
40 | + /** | ||
41 | + * | ||
42 | + * (Required) | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The participant | ||
46 | + */ | ||
47 | + @JsonProperty("participant") | ||
48 | + public Object getParticipant() { | ||
49 | + return participant; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * (Required) | ||
55 | + * | ||
56 | + * @param participant | ||
57 | + * The participant | ||
58 | + */ | ||
59 | + @JsonProperty("participant") | ||
60 | + public void setParticipant(Object participant) { | ||
61 | + this.participant = participant; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * | ||
66 | + * (Required) | ||
67 | + * | ||
68 | + * @return | ||
69 | + * The id | ||
70 | + */ | ||
71 | + @JsonProperty("id") | ||
72 | + public Object getId() { | ||
73 | + return id; | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * | ||
78 | + * (Required) | ||
79 | + * | ||
80 | + * @param id | ||
81 | + * The id | ||
82 | + */ | ||
83 | + @JsonProperty("id") | ||
84 | + public void setId(Object id) { | ||
85 | + this.id = id; | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public String toString() { | ||
90 | + return ToStringBuilder.reflectionToString(this); | ||
91 | + } | ||
92 | + | ||
93 | + @JsonAnyGetter | ||
94 | + public Map<String, Object> getAdditionalProperties() { | ||
95 | + return this.additionalProperties; | ||
96 | + } | ||
97 | + | ||
98 | + @JsonAnySetter | ||
99 | + public void setAdditionalProperty(String name, Object value) { | ||
100 | + this.additionalProperties.put(name, value); | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public int hashCode() { | ||
105 | + return new HashCodeBuilder().append(participant).append(id).append(additionalProperties).toHashCode(); | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public boolean equals(Object other) { | ||
110 | + if (other == this) { | ||
111 | + return true; | ||
112 | + } | ||
113 | + if ((other instanceof UpdateEvenementRequest) == false) { | ||
114 | + return false; | ||
115 | + } | ||
116 | + UpdateEvenementRequest rhs = ((UpdateEvenementRequest) other); | ||
117 | + return new EqualsBuilder().append(participant, rhs.participant).append(id, rhs.id).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/etunicorn/generated/model/UpdateLoginRequest.java
0 → 100644
@@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "login", | ||
19 | + "password" | ||
20 | +}) | ||
21 | +public class UpdateLoginRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + * (Required) | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("login") | ||
29 | + private String login; | ||
30 | + /** | ||
31 | + * | ||
32 | + * (Required) | ||
33 | + * | ||
34 | + */ | ||
35 | + @JsonProperty("password") | ||
36 | + private String password; | ||
37 | + @JsonIgnore | ||
38 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
39 | + | ||
40 | + /** | ||
41 | + * | ||
42 | + * (Required) | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The login | ||
46 | + */ | ||
47 | + @JsonProperty("login") | ||
48 | + public String getLogin() { | ||
49 | + return login; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * (Required) | ||
55 | + * | ||
56 | + * @param login | ||
57 | + * The login | ||
58 | + */ | ||
59 | + @JsonProperty("login") | ||
60 | + public void setLogin(String login) { | ||
61 | + this.login = login; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * | ||
66 | + * (Required) | ||
67 | + * | ||
68 | + * @return | ||
69 | + * The password | ||
70 | + */ | ||
71 | + @JsonProperty("password") | ||
72 | + public String getPassword() { | ||
73 | + return password; | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * | ||
78 | + * (Required) | ||
79 | + * | ||
80 | + * @param password | ||
81 | + * The password | ||
82 | + */ | ||
83 | + @JsonProperty("password") | ||
84 | + public void setPassword(String password) { | ||
85 | + this.password = password; | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public String toString() { | ||
90 | + return ToStringBuilder.reflectionToString(this); | ||
91 | + } | ||
92 | + | ||
93 | + @JsonAnyGetter | ||
94 | + public Map<String, Object> getAdditionalProperties() { | ||
95 | + return this.additionalProperties; | ||
96 | + } | ||
97 | + | ||
98 | + @JsonAnySetter | ||
99 | + public void setAdditionalProperty(String name, Object value) { | ||
100 | + this.additionalProperties.put(name, value); | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public int hashCode() { | ||
105 | + return new HashCodeBuilder().append(login).append(password).append(additionalProperties).toHashCode(); | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public boolean equals(Object other) { | ||
110 | + if (other == this) { | ||
111 | + return true; | ||
112 | + } | ||
113 | + if ((other instanceof UpdateLoginRequest) == false) { | ||
114 | + return false; | ||
115 | + } | ||
116 | + UpdateLoginRequest rhs = ((UpdateLoginRequest) other); | ||
117 | + return new EqualsBuilder().append(login, rhs.login).append(password, rhs.password).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/etunicorn/generated/model/UpdateParticipeRequest.java
0 → 100644
@@ -0,0 +1,88 @@ | @@ -0,0 +1,88 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "id" | ||
19 | +}) | ||
20 | +public class UpdateParticipeRequest { | ||
21 | + | ||
22 | + /** | ||
23 | + * | ||
24 | + * (Required) | ||
25 | + * | ||
26 | + */ | ||
27 | + @JsonProperty("id") | ||
28 | + private Integer id; | ||
29 | + @JsonIgnore | ||
30 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
31 | + | ||
32 | + /** | ||
33 | + * | ||
34 | + * (Required) | ||
35 | + * | ||
36 | + * @return | ||
37 | + * The id | ||
38 | + */ | ||
39 | + @JsonProperty("id") | ||
40 | + public Integer getId() { | ||
41 | + return id; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * | ||
46 | + * (Required) | ||
47 | + * | ||
48 | + * @param id | ||
49 | + * The id | ||
50 | + */ | ||
51 | + @JsonProperty("id") | ||
52 | + public void setId(Integer id) { | ||
53 | + this.id = id; | ||
54 | + } | ||
55 | + | ||
56 | + @Override | ||
57 | + public String toString() { | ||
58 | + return ToStringBuilder.reflectionToString(this); | ||
59 | + } | ||
60 | + | ||
61 | + @JsonAnyGetter | ||
62 | + public Map<String, Object> getAdditionalProperties() { | ||
63 | + return this.additionalProperties; | ||
64 | + } | ||
65 | + | ||
66 | + @JsonAnySetter | ||
67 | + public void setAdditionalProperty(String name, Object value) { | ||
68 | + this.additionalProperties.put(name, value); | ||
69 | + } | ||
70 | + | ||
71 | + @Override | ||
72 | + public int hashCode() { | ||
73 | + return new HashCodeBuilder().append(id).append(additionalProperties).toHashCode(); | ||
74 | + } | ||
75 | + | ||
76 | + @Override | ||
77 | + public boolean equals(Object other) { | ||
78 | + if (other == this) { | ||
79 | + return true; | ||
80 | + } | ||
81 | + if ((other instanceof UpdateParticipeRequest) == false) { | ||
82 | + return false; | ||
83 | + } | ||
84 | + UpdateParticipeRequest rhs = ((UpdateParticipeRequest) other); | ||
85 | + return new EqualsBuilder().append(id, rhs.id).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
86 | + } | ||
87 | + | ||
88 | +} |
src/main/java/etunicorn/generated/model/UpdatePersonneByIdRequest.java
0 → 100644
@@ -0,0 +1,160 @@ | @@ -0,0 +1,160 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "carte", | ||
19 | + "naissance", | ||
20 | + "login", | ||
21 | + "role" | ||
22 | +}) | ||
23 | +public class UpdatePersonneByIdRequest { | ||
24 | + | ||
25 | + /** | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("carte") | ||
29 | + private String carte; | ||
30 | + /** | ||
31 | + * | ||
32 | + */ | ||
33 | + @JsonProperty("naissance") | ||
34 | + private Object naissance; | ||
35 | + /** | ||
36 | + * | ||
37 | + */ | ||
38 | + @JsonProperty("login") | ||
39 | + private String login; | ||
40 | + /** | ||
41 | + * | ||
42 | + */ | ||
43 | + @JsonProperty("role") | ||
44 | + private Object role; | ||
45 | + @JsonIgnore | ||
46 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
47 | + | ||
48 | + /** | ||
49 | + * | ||
50 | + * @return | ||
51 | + * The carte | ||
52 | + */ | ||
53 | + @JsonProperty("carte") | ||
54 | + public String getCarte() { | ||
55 | + return carte; | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * | ||
60 | + * @param carte | ||
61 | + * The carte | ||
62 | + */ | ||
63 | + @JsonProperty("carte") | ||
64 | + public void setCarte(String carte) { | ||
65 | + this.carte = carte; | ||
66 | + } | ||
67 | + | ||
68 | + /** | ||
69 | + * | ||
70 | + * @return | ||
71 | + * The naissance | ||
72 | + */ | ||
73 | + @JsonProperty("naissance") | ||
74 | + public Object getNaissance() { | ||
75 | + return naissance; | ||
76 | + } | ||
77 | + | ||
78 | + /** | ||
79 | + * | ||
80 | + * @param naissance | ||
81 | + * The naissance | ||
82 | + */ | ||
83 | + @JsonProperty("naissance") | ||
84 | + public void setNaissance(Object naissance) { | ||
85 | + this.naissance = naissance; | ||
86 | + } | ||
87 | + | ||
88 | + /** | ||
89 | + * | ||
90 | + * @return | ||
91 | + * The login | ||
92 | + */ | ||
93 | + @JsonProperty("login") | ||
94 | + public String getLogin() { | ||
95 | + return login; | ||
96 | + } | ||
97 | + | ||
98 | + /** | ||
99 | + * | ||
100 | + * @param login | ||
101 | + * The login | ||
102 | + */ | ||
103 | + @JsonProperty("login") | ||
104 | + public void setLogin(String login) { | ||
105 | + this.login = login; | ||
106 | + } | ||
107 | + | ||
108 | + /** | ||
109 | + * | ||
110 | + * @return | ||
111 | + * The role | ||
112 | + */ | ||
113 | + @JsonProperty("role") | ||
114 | + public Object getRole() { | ||
115 | + return role; | ||
116 | + } | ||
117 | + | ||
118 | + /** | ||
119 | + * | ||
120 | + * @param role | ||
121 | + * The role | ||
122 | + */ | ||
123 | + @JsonProperty("role") | ||
124 | + public void setRole(Object role) { | ||
125 | + this.role = role; | ||
126 | + } | ||
127 | + | ||
128 | + @Override | ||
129 | + public String toString() { | ||
130 | + return ToStringBuilder.reflectionToString(this); | ||
131 | + } | ||
132 | + | ||
133 | + @JsonAnyGetter | ||
134 | + public Map<String, Object> getAdditionalProperties() { | ||
135 | + return this.additionalProperties; | ||
136 | + } | ||
137 | + | ||
138 | + @JsonAnySetter | ||
139 | + public void setAdditionalProperty(String name, Object value) { | ||
140 | + this.additionalProperties.put(name, value); | ||
141 | + } | ||
142 | + | ||
143 | + @Override | ||
144 | + public int hashCode() { | ||
145 | + return new HashCodeBuilder().append(carte).append(naissance).append(login).append(role).append(additionalProperties).toHashCode(); | ||
146 | + } | ||
147 | + | ||
148 | + @Override | ||
149 | + public boolean equals(Object other) { | ||
150 | + if (other == this) { | ||
151 | + return true; | ||
152 | + } | ||
153 | + if ((other instanceof UpdatePersonneByIdRequest) == false) { | ||
154 | + return false; | ||
155 | + } | ||
156 | + UpdatePersonneByIdRequest rhs = ((UpdatePersonneByIdRequest) other); | ||
157 | + return new EqualsBuilder().append(carte, rhs.carte).append(naissance, rhs.naissance).append(login, rhs.login).append(role, rhs.role).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
158 | + } | ||
159 | + | ||
160 | +} |
src/main/java/etunicorn/generated/model/UpdatePersonneRequest.java
0 → 100644
@@ -0,0 +1,160 @@ | @@ -0,0 +1,160 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "carte", | ||
19 | + "naissance", | ||
20 | + "login", | ||
21 | + "role" | ||
22 | +}) | ||
23 | +public class UpdatePersonneRequest { | ||
24 | + | ||
25 | + /** | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("carte") | ||
29 | + private String carte; | ||
30 | + /** | ||
31 | + * | ||
32 | + */ | ||
33 | + @JsonProperty("naissance") | ||
34 | + private Object naissance; | ||
35 | + /** | ||
36 | + * | ||
37 | + */ | ||
38 | + @JsonProperty("login") | ||
39 | + private Object login; | ||
40 | + /** | ||
41 | + * | ||
42 | + */ | ||
43 | + @JsonProperty("role") | ||
44 | + private Object role; | ||
45 | + @JsonIgnore | ||
46 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
47 | + | ||
48 | + /** | ||
49 | + * | ||
50 | + * @return | ||
51 | + * The carte | ||
52 | + */ | ||
53 | + @JsonProperty("carte") | ||
54 | + public String getCarte() { | ||
55 | + return carte; | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * | ||
60 | + * @param carte | ||
61 | + * The carte | ||
62 | + */ | ||
63 | + @JsonProperty("carte") | ||
64 | + public void setCarte(String carte) { | ||
65 | + this.carte = carte; | ||
66 | + } | ||
67 | + | ||
68 | + /** | ||
69 | + * | ||
70 | + * @return | ||
71 | + * The naissance | ||
72 | + */ | ||
73 | + @JsonProperty("naissance") | ||
74 | + public Object getNaissance() { | ||
75 | + return naissance; | ||
76 | + } | ||
77 | + | ||
78 | + /** | ||
79 | + * | ||
80 | + * @param naissance | ||
81 | + * The naissance | ||
82 | + */ | ||
83 | + @JsonProperty("naissance") | ||
84 | + public void setNaissance(Object naissance) { | ||
85 | + this.naissance = naissance; | ||
86 | + } | ||
87 | + | ||
88 | + /** | ||
89 | + * | ||
90 | + * @return | ||
91 | + * The login | ||
92 | + */ | ||
93 | + @JsonProperty("login") | ||
94 | + public Object getLogin() { | ||
95 | + return login; | ||
96 | + } | ||
97 | + | ||
98 | + /** | ||
99 | + * | ||
100 | + * @param login | ||
101 | + * The login | ||
102 | + */ | ||
103 | + @JsonProperty("login") | ||
104 | + public void setLogin(Object login) { | ||
105 | + this.login = login; | ||
106 | + } | ||
107 | + | ||
108 | + /** | ||
109 | + * | ||
110 | + * @return | ||
111 | + * The role | ||
112 | + */ | ||
113 | + @JsonProperty("role") | ||
114 | + public Object getRole() { | ||
115 | + return role; | ||
116 | + } | ||
117 | + | ||
118 | + /** | ||
119 | + * | ||
120 | + * @param role | ||
121 | + * The role | ||
122 | + */ | ||
123 | + @JsonProperty("role") | ||
124 | + public void setRole(Object role) { | ||
125 | + this.role = role; | ||
126 | + } | ||
127 | + | ||
128 | + @Override | ||
129 | + public String toString() { | ||
130 | + return ToStringBuilder.reflectionToString(this); | ||
131 | + } | ||
132 | + | ||
133 | + @JsonAnyGetter | ||
134 | + public Map<String, Object> getAdditionalProperties() { | ||
135 | + return this.additionalProperties; | ||
136 | + } | ||
137 | + | ||
138 | + @JsonAnySetter | ||
139 | + public void setAdditionalProperty(String name, Object value) { | ||
140 | + this.additionalProperties.put(name, value); | ||
141 | + } | ||
142 | + | ||
143 | + @Override | ||
144 | + public int hashCode() { | ||
145 | + return new HashCodeBuilder().append(carte).append(naissance).append(login).append(role).append(additionalProperties).toHashCode(); | ||
146 | + } | ||
147 | + | ||
148 | + @Override | ||
149 | + public boolean equals(Object other) { | ||
150 | + if (other == this) { | ||
151 | + return true; | ||
152 | + } | ||
153 | + if ((other instanceof UpdatePersonneRequest) == false) { | ||
154 | + return false; | ||
155 | + } | ||
156 | + UpdatePersonneRequest rhs = ((UpdatePersonneRequest) other); | ||
157 | + return new EqualsBuilder().append(carte, rhs.carte).append(naissance, rhs.naissance).append(login, rhs.login).append(role, rhs.role).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
158 | + } | ||
159 | + | ||
160 | +} |
src/main/java/etunicorn/generated/model/UpdateRoleByIdRequest.java
0 → 100644
@@ -0,0 +1,88 @@ | @@ -0,0 +1,88 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "nom" | ||
19 | +}) | ||
20 | +public class UpdateRoleByIdRequest { | ||
21 | + | ||
22 | + /** | ||
23 | + * | ||
24 | + * (Required) | ||
25 | + * | ||
26 | + */ | ||
27 | + @JsonProperty("nom") | ||
28 | + private String nom; | ||
29 | + @JsonIgnore | ||
30 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
31 | + | ||
32 | + /** | ||
33 | + * | ||
34 | + * (Required) | ||
35 | + * | ||
36 | + * @return | ||
37 | + * The nom | ||
38 | + */ | ||
39 | + @JsonProperty("nom") | ||
40 | + public String getNom() { | ||
41 | + return nom; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * | ||
46 | + * (Required) | ||
47 | + * | ||
48 | + * @param nom | ||
49 | + * The nom | ||
50 | + */ | ||
51 | + @JsonProperty("nom") | ||
52 | + public void setNom(String nom) { | ||
53 | + this.nom = nom; | ||
54 | + } | ||
55 | + | ||
56 | + @Override | ||
57 | + public String toString() { | ||
58 | + return ToStringBuilder.reflectionToString(this); | ||
59 | + } | ||
60 | + | ||
61 | + @JsonAnyGetter | ||
62 | + public Map<String, Object> getAdditionalProperties() { | ||
63 | + return this.additionalProperties; | ||
64 | + } | ||
65 | + | ||
66 | + @JsonAnySetter | ||
67 | + public void setAdditionalProperty(String name, Object value) { | ||
68 | + this.additionalProperties.put(name, value); | ||
69 | + } | ||
70 | + | ||
71 | + @Override | ||
72 | + public int hashCode() { | ||
73 | + return new HashCodeBuilder().append(nom).append(additionalProperties).toHashCode(); | ||
74 | + } | ||
75 | + | ||
76 | + @Override | ||
77 | + public boolean equals(Object other) { | ||
78 | + if (other == this) { | ||
79 | + return true; | ||
80 | + } | ||
81 | + if ((other instanceof UpdateRoleByIdRequest) == false) { | ||
82 | + return false; | ||
83 | + } | ||
84 | + UpdateRoleByIdRequest rhs = ((UpdateRoleByIdRequest) other); | ||
85 | + return new EqualsBuilder().append(nom, rhs.nom).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
86 | + } | ||
87 | + | ||
88 | +} |
src/main/java/etunicorn/generated/model/UpdateRoleRequest.java
0 → 100644
@@ -0,0 +1,88 @@ | @@ -0,0 +1,88 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "nom" | ||
19 | +}) | ||
20 | +public class UpdateRoleRequest { | ||
21 | + | ||
22 | + /** | ||
23 | + * | ||
24 | + * (Required) | ||
25 | + * | ||
26 | + */ | ||
27 | + @JsonProperty("nom") | ||
28 | + private String nom; | ||
29 | + @JsonIgnore | ||
30 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
31 | + | ||
32 | + /** | ||
33 | + * | ||
34 | + * (Required) | ||
35 | + * | ||
36 | + * @return | ||
37 | + * The nom | ||
38 | + */ | ||
39 | + @JsonProperty("nom") | ||
40 | + public String getNom() { | ||
41 | + return nom; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * | ||
46 | + * (Required) | ||
47 | + * | ||
48 | + * @param nom | ||
49 | + * The nom | ||
50 | + */ | ||
51 | + @JsonProperty("nom") | ||
52 | + public void setNom(String nom) { | ||
53 | + this.nom = nom; | ||
54 | + } | ||
55 | + | ||
56 | + @Override | ||
57 | + public String toString() { | ||
58 | + return ToStringBuilder.reflectionToString(this); | ||
59 | + } | ||
60 | + | ||
61 | + @JsonAnyGetter | ||
62 | + public Map<String, Object> getAdditionalProperties() { | ||
63 | + return this.additionalProperties; | ||
64 | + } | ||
65 | + | ||
66 | + @JsonAnySetter | ||
67 | + public void setAdditionalProperty(String name, Object value) { | ||
68 | + this.additionalProperties.put(name, value); | ||
69 | + } | ||
70 | + | ||
71 | + @Override | ||
72 | + public int hashCode() { | ||
73 | + return new HashCodeBuilder().append(nom).append(additionalProperties).toHashCode(); | ||
74 | + } | ||
75 | + | ||
76 | + @Override | ||
77 | + public boolean equals(Object other) { | ||
78 | + if (other == this) { | ||
79 | + return true; | ||
80 | + } | ||
81 | + if ((other instanceof UpdateRoleRequest) == false) { | ||
82 | + return false; | ||
83 | + } | ||
84 | + UpdateRoleRequest rhs = ((UpdateRoleRequest) other); | ||
85 | + return new EqualsBuilder().append(nom, rhs.nom).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
86 | + } | ||
87 | + | ||
88 | +} |