Blame view

api.raml 19.8 KB
90a48e21   Geoffrey PREUD'HOMME   Personnes
1
  #%RAML 0.8
ea2f57e1   Geoffrey PREUD'HOMME   Test API
2
3
4
  title: API d'Etunicorn
  baseUri: https://etunicorn.plil.net/{version}/
  version: v1
153931ca   Geoffrey PREUD'HOMME   Benoît, apprend à...
5
  # Les codes 400 sont implicites
509e1d6e   Geoffrey PREUD'HOMME   API: Login
6
  /login:
b8824e3a   Geoffrey PREUD'HOMME   Avec le login, ce...
7
8
    post:
      description: Instancie une nouvelle connexion
6ae819f3   badetitou   Go to JSON
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
      body:
          application/json:
              schema: |
                  {
                  "type": "object",
                  "$schema": "http://json-schema.org/draft-03/schema",
                  "id": "http://jsonschema.net",
                  "required": true,
                  "properties": {
                      "login": {
                          "type": "string",
                          "required": true
                      },
                      "password": {
                          "type": "string",
                          "required": true
                      }
                  }
                  }
e9bf0f84   badetitou   Evenement
28
      responses:
b8824e3a   Geoffrey PREUD'HOMME   Avec le login, ce...
29
30
31
32
        200:
          description: Authentification réussie
          body:
            application/json:
90a48e21   Geoffrey PREUD'HOMME   Personnes
33
              example: |
b8824e3a   Geoffrey PREUD'HOMME   Avec le login, ce...
34
35
                {
                  "token": "ooT6zahdura7vaethuiph1ugiph6co",
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
36
37
38
39
                  "expire": 1485607703,
                  "role": "admin",
                  "permissions": [
                    {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
40
                      "nom": "CREER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
41
42
                    },
                    {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
43
                      "nom": "SUPPRIMER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
44
45
                    }
                  ]
b8824e3a   Geoffrey PREUD'HOMME   Avec le login, ce...
46
47
48
                }
        401:
          description: Authentication échouée
474776a8   Geoffrey PREUD'HOMME   Implémentation JS...
49
50
51
52
53
54
55
    delete:
      description: Se déconnecter
      responses:
        204:
          description: Déconnecté avec succès
        404:
          description: Jeton non trouvé
ea2f57e1   Geoffrey PREUD'HOMME   Test API
56
  /personne:
509e1d6e   Geoffrey PREUD'HOMME   API: Login
57
    get:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
58
59
      description: Obtenir la liste des persones. Nécessite COMPTE_ADMIN
      responses:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
60
61
        200:
          body:
509e1d6e   Geoffrey PREUD'HOMME   API: Login
62
            application/json:
90a48e21   Geoffrey PREUD'HOMME   Personnes
63
              example: |
509e1d6e   Geoffrey PREUD'HOMME   API: Login
64
                [
90a48e21   Geoffrey PREUD'HOMME   Personnes
65
66
67
                 {
                    "id": 42,
                    "carte": "AAAAA",
790d94b4   Geoffrey PREUD'HOMME   Base de données, ...
68
                    "naissance": "855874800000",
509e1d6e   Geoffrey PREUD'HOMME   API: Login
69
                    "solde": 1337,
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
70
71
                    "login": "gbontoux",
                    "role": "etudiant"
509e1d6e   Geoffrey PREUD'HOMME   API: Login
72
73
                  }
                ]
90a48e21   Geoffrey PREUD'HOMME   Personnes
74
    /{idPersonne}:
790d94b4   Geoffrey PREUD'HOMME   Base de données, ...
75
76
77
78
79
80
      uriParameters:
        idPersonne:
          type: number
          required: true
          description: ID de la personne
          minimum: 0
90a48e21   Geoffrey PREUD'HOMME   Personnes
81
      get:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
82
        description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN
90a48e21   Geoffrey PREUD'HOMME   Personnes
83
84
85
86
87
88
89
90
91
        responses:
          200:
            description: Utilisateur récupéré
            body:
              application/json:
                example: |
                 {
                    "id": 42,
                    "carte": "AAAAA",
790d94b4   Geoffrey PREUD'HOMME   Base de données, ...
92
                    "naissance": "855874800000",
90a48e21   Geoffrey PREUD'HOMME   Personnes
93
                    "solde": 1337,
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
94
95
                    "login": "gbontoux",
                    "role": "etudiant"
90a48e21   Geoffrey PREUD'HOMME   Personnes
96
97
98
99
                  }
          404:
            description: Utilisateur non trouvé
      put:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
100
        description: Modifer les infos d'une personne. Nécessite COMPTE_ADMIN
6ae819f3   badetitou   Go to JSON
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
        body:
            application/json:
              schema: |
                  {
                    "type": "object",
                    "$schema": "http://json-schema.org/draft-03/schema",
                    "id": "http://jsonschema.net",
                    "required": true,
                    "properties": {
                        "carte": {
                            "type": "string",
                            "required": false,
                            "minLength": 14,
                            "maxLength": 14
                        },
                        "naissance": {
e0956603   badetitou   Raml with java.ut...
117
118
119
                            "type": "string",
                            "required": false,
                            "format": "date"
6ae819f3   badetitou   Go to JSON
120
121
122
123
124
125
126
127
128
129
130
                        },
                        "login": {
                          "type": "string",
                          "required": false
                        },
                        "role": {
                          "type": "role",
                          "required": false
                      }
                    }
                  }
90a48e21   Geoffrey PREUD'HOMME   Personnes
131
132
133
        responses:
          202:
            description: Utilisateur modifié
90a48e21   Geoffrey PREUD'HOMME   Personnes
134
135
136
          404:
            description: Utilisateur non trouvé
      delete:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
137
        description: Obtenir les infos sur une personne. Nécessite COMPTE_ADMIN
90a48e21   Geoffrey PREUD'HOMME   Personnes
138
139
140
141
142
143
        responses:
          204:
            description: Utilisateur supprimé
          404:
            description: Utilisateur non trouvé
    post:
90a48e21   Geoffrey PREUD'HOMME   Personnes
144
      description: Ajoute une nouvelle personne
6ae819f3   badetitou   Go to JSON
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
      body:
        application/json:
            schema: |
                {
                "type": "object",
                "$schema": "http://json-schema.org/draft-03/schema",
                "id": "http://jsonschema.net",
                "required": true,
                "properties": {
                    "carte": {
                        "type": "string",
                        "required": false,
                        "minLength": 14,
                        "maxLength": 14
                    },
                    "naissance": {
e0956603   badetitou   Raml with java.ut...
161
162
163
                        "type": "string",
                        "required": false,
                        "format": "date"
6ae819f3   badetitou   Go to JSON
164
165
                    },
                    "login": {
ae0f370c   badetitou   Login c'est du st...
166
                      "type": "string",
6ae819f3   badetitou   Go to JSON
167
168
169
170
171
172
173
174
                      "required": false
                    },
                    "role": {
                      "type": "role",
                      "required": false
                  }
                }
                }
e9bf0f84   badetitou   Evenement
175
      responses:
90a48e21   Geoffrey PREUD'HOMME   Personnes
176
177
178
179
180
181
182
183
        201:
          description: Personne ajoutée avec succès
          body:
            application/json:
              example: |
                {
                  "id": 42
                }
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
184
185
  /role:
    get:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
186
      description: Liste les rôles. Nécessite ROLE_ADMIN
e9bf0f84   badetitou   Evenement
187
      responses:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
188
        200:
e9bf0f84   badetitou   Evenement
189
          body:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
190
191
192
193
194
195
196
197
198
199
200
            application/json:
              example: |
                [
                  {
                    "nom": "etudiant",
                    "permissions": []
                  },
                  {
                    "nom": "bde",
                      "permissions": [
                      {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
201
                        "nom": "CREER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
202
203
                      },
                      {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
204
                        "nom": "SUPPRIMER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
205
206
207
208
209
                      }
                    ]
                  }
                ]
    post:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
210
      description: Ajoute un nouveau rôle. Nécessite ROLE_ADMIN
6ae819f3   badetitou   Go to JSON
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
      body:
        application/json:
          schema: |
                {
                "type": "object",
                "$schema": "http://json-schema.org/draft-03/schema",
                "id": "http://jsonschema.net",
                "required": true,
                "properties": {
                    "nom": {
                        "type": "string",
                        "required": true,
                        "minLength": 3
                    }
                }
                }
e9bf0f84   badetitou   Evenement
227
      responses:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
228
229
230
231
232
        201:
          description: Rôle créé avec succès
        409:
          description: Un rôle avec le même nom existe déjà
    /{nomRole}:
6ae819f3   badetitou   Go to JSON
233
234
      uriParameters:
        nomRole:
474776a8   Geoffrey PREUD'HOMME   Implémentation JS...
235
          type: string
6ae819f3   badetitou   Go to JSON
236
          required: true
474776a8   Geoffrey PREUD'HOMME   Implémentation JS...
237
          description: Nom du role
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
238
      delete:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
239
        description: Supprime un rôle. Nécessite ROLE_ADMIN
e9bf0f84   badetitou   Evenement
240
        responses:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
241
242
243
244
245
          204:
            description: Rôle supprimé
          404:
            description: Rôle inconnu
      post:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
246
        description: Ajoute une permission à un rôle. Nécessite ROLE_ADMIN
6ae819f3   badetitou   Go to JSON
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
        body:
          application/json:
            schema: |
              {
              "type": "object",
              "$schema": "http://json-schema.org/draft-03/schema",
              "id": "http://jsonschema.net",
              "required": true,
              "properties": {
                  "nom": {
                      "type": "string",
                      "required": true
                  }
              }
              }
e9bf0f84   badetitou   Evenement
262
        responses:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
263
264
265
266
267
          201:
            description: Permission ajouté avec succès
          404:
            description: Permission ou rôle inconnu
      /{nomPermission}:
6ae819f3   badetitou   Go to JSON
268
269
270
271
272
        uriParameters:
          nomPermission:
            type: string
            required: true
            description: nom de la permission
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
273
        delete:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
274
          description: Enlève la permission du rôle. Nécessite ROLE_ADMIN
e9bf0f84   badetitou   Evenement
275
          responses:
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
276
277
278
279
280
281
            204:
              description: Permission enlevée avec succès
            404:
              description: Permission ou rôle inconnu
    /permission:
      get:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
282
        description: Liste les permissions. Nécessite ROLE_ADMIN
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
283
284
285
286
287
288
289
        responses:
          200:
            body:
              application/json:
                example: |
                  [
                    {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
290
                      "nom": "CREER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
291
292
                    },
                    {
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
293
                      "nom": "SUPPRIMER_EVNMT"
377081e3   Geoffrey PREUD'HOMME   Rôles et permissions
294
295
                    }
                  ]
ff2fc742   badetitou   untab
296
297
  /evenement:
    get:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
298
      description: Obtenir la liste de tout les evenements. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER
ff2fc742   badetitou   untab
299
300
301
302
303
304
305
306
      responses:
        200:
          body:
            application/json:
              example: |
                [
                  {
                    "id": 1,
6ae819f3   badetitou   Go to JSON
307
                    "nom": "patate",
ff2fc742   badetitou   untab
308
309
310
311
312
                    "prix": 4,
                    "date": "2001-09-11"
                  },
                  {
                    "id": 2,
6ae819f3   badetitou   Go to JSON
313
                    "nom": "patate flambe",
ff2fc742   badetitou   untab
314
315
316
317
318
                    "prix": 5,
                    "date": "2001-09-11"
                  }
                ]
    post:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
319
      description: Permet de creer un nouvel evenement. Nécessite EVNMT_ADMIN
6ae819f3   badetitou   Go to JSON
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
      body:
        application/json:
          schema: |
              {
              "type": "object",
              "$schema": "http://json-schema.org/draft-03/schema",
              "id": "http://jsonschema.net",
              "required": true,
              "properties": {
                  "nom": {
                      "type": "string",
                      "required": true
                  },
                  "prix": {
                      "type": "number",
                      "required": true
                  },
                  "date": {
e0956603   badetitou   Raml with java.ut...
338
339
340
                      "type": "string",
                      "required": true,
                      "format": "date"
6ae819f3   badetitou   Go to JSON
341
342
343
                  }
              }
              }
ff2fc742   badetitou   untab
344
345
      responses:
        201:
e9bf0f84   badetitou   Evenement
346
  
ff2fc742   badetitou   untab
347
    /{evenementId}:
6ae819f3   badetitou   Go to JSON
348
349
350
351
352
353
      uriParameters:
          evenementId:
            type: integer
            required: true
            description: id de l'evenement
            minimum: 0
ff2fc742   badetitou   untab
354
      put:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
355
        description: Permet de modifier un évènement existant. Nécessite EVNMT_ADMIN
6ae819f3   badetitou   Go to JSON
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
        body:
          application/json:
            schema: |
                {
                "type": "object",
                "$schema": "http://json-schema.org/draft-03/schema",
                "id": "http://jsonschema.net",
                "required": true,
                "properties": {
                    "nom": {
                        "type": "string",
                        "required": false
                    },
                    "prix": {
                        "type": "number",
                        "required": false
                    },
                    "date": {
e0956603   badetitou   Raml with java.ut...
374
375
376
                        "type": "string",
                        "required": false,
                        "format": "date"
6ae819f3   badetitou   Go to JSON
377
378
379
                    }
                }
                }
ff2fc742   badetitou   untab
380
381
382
383
384
385
        responses:
          202:
            description: Modification pris en compte
          404:
            description: L'evenement n'existe pas
      get:
1ae1d9d5   badetitou   Ajout de transact...
386
        description: Obtenir l'evenement {evenementId}. Nécessite EVNMT_ADMIN ou EVNMT_ACHETER ou EVNMT_REMBOURSER
ff2fc742   badetitou   untab
387
388
389
390
391
392
393
394
        responses:
          200:
            body:
              application/json:
                example: |
                  [
                     {
                      "id": 1,
6ae819f3   badetitou   Go to JSON
395
                      "nom": "patate",
ff2fc742   badetitou   untab
396
397
398
399
400
401
402
                      "prix": 4,
                      "date": "2001-09-11"
                    }
                  ]
          404:
            description: Evenement non existant
      delete:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
403
        description: Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_ADMIN
ff2fc742   badetitou   untab
404
405
406
        responses:
          200:
            description: L'evenement a été bien supprimé
6ae819f3   badetitou   Go to JSON
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
      /participe:
        post:
          description: Permet de notifier que quelqu'un a participer à l'evenement (id de la personne a envoyer)
          body:
            application/json:
              schema: |
                  {
                  "type": "object",
                  "$schema": "http://json-schema.org/draft-03/schema",
                  "id": "http://jsonschema.net",
                  "required": true,
                  "properties": {
                      "id": {
                          "type": "integer",
                          "required": true
                      }
                  }
                  }
          responses:
            201:
              description: La personne est bien inscrite a cet evenement ou a bien était ajouté a la liste des participant
            402:
              description: La personne n'a pas payé pour participer à l'evenement
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
430
  /consommation:
ff2fc742   badetitou   untab
431
    get:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
432
      description: Obtenir la liste de toutes les consommations. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER
ff2fc742   badetitou   untab
433
434
435
436
437
438
439
440
      responses:
        200:
          body:
            application/json:
              example: |
                [
                  {
                    "id": 1,
6ae819f3   badetitou   Go to JSON
441
                    "nom": "juis de fruit",
e8c4d43f   Geoffrey PREUD'HOMME   Encore plus de sé...
442
                    "prix": 4
ff2fc742   badetitou   untab
443
444
445
                  },
                  {
                    "id": 2,
6ae819f3   badetitou   Go to JSON
446
                    "nom": "juis de fruit flambe",
e8c4d43f   Geoffrey PREUD'HOMME   Encore plus de sé...
447
                    "prix": 5
ff2fc742   badetitou   untab
448
449
450
                  }
                ]
    post:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
451
      description: Permet de creer une nouvelle consommation. Nécessite CONSO_ADMIN
6ae819f3   badetitou   Go to JSON
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
      body:
        application/json:
          schema: |
            {
            "type": "object",
            "$schema": "http://json-schema.org/draft-03/schema",
            "id": "http://jsonschema.net",
            "required": true,
            "properties": {
                "nom": {
                    "type": "string",
                    "required": true
                },
                "prix": {
                    "type": "number",
                    "required": true
                }
            }
            }
ff2fc742   badetitou   untab
471
472
      responses:
        201:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
473
    /{consommationId}:
6ae819f3   badetitou   Go to JSON
474
475
476
477
478
479
      uriParameters:
        consommationId:
          type: integer
          required: true
          description: id de la consommation
          minimum: 0
ff2fc742   badetitou   untab
480
      put:
3b818f18   Geoffrey PREUD'HOMME   Ajout des permiss...
481
        description: Permet de modifier une consommation. Nécessite CONSO_ADMIN
6ae819f3   badetitou   Go to JSON
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
        body:
            application/json:
              schema: |
                  {
                  "type": "object",
                  "$schema": "http://json-schema.org/draft-03/schema",
                  "id": "http://jsonschema.net",
                  "required": true,
                  "properties": {
                      "nom": {
                          "type": "string",
                          "required": false
                      },
                      "prix": {
                          "type": "number",
                          "required": false
                      }
                  }
                  }
ff2fc742   badetitou   untab
501
502
503
504
505
506
        responses:
          202:
            description: Modification pris en compte
          404:
            description: L'evenement n'existe pas
      get:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
507
        description: Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER
ff2fc742   badetitou   untab
508
509
510
511
512
513
514
515
516
517
518
519
520
521
        responses:
          200:
            body:
              application/json:
                example: |
                  [
                     {
                      "id": 1,
                      "nomEvenement": "patate",
                      "prix": 4,
                      "date": "2001-09-11"
                    }
                  ]
          404:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
522
            description: consommation non existante
ff2fc742   badetitou   untab
523
      delete:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
524
        description: Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN
ff2fc742   badetitou   untab
525
526
        responses:
          200:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
527
            description: La consommation a été bien supprime
7fa0cd71   badetitou   Les Transactions
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
  
  /transaction:
    get:
      description: Permet de recuperer la liste des transaction
      responses:
        200:
          description: On recupere la liste des transactions
          body:
            application/json:
              example: |
                [
                  {
                    "participant": 1,
                    "acteur": 18,
                    "idTransaction": 42,
                    "type": true,
                    "date": "2003-12-01",
                    "prix": 25.23
                  },
                  {
                    "participant": 5,
                    "acteur": 1,
                    "idTransaction": 43,
                    "type": true,
                    "date": "2003-12-01",
                    "prix": -25.23
                  }
                ]
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
556
    /consommation:
09db76a6   Geoffrey PREUD'HOMME   Et on génère tout...
557
      post:
6ae819f3   badetitou   Go to JSON
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
        description: Achat d'une consomation (id) par un participant à un acteur
        body:
          application/json:
            schema: |
              {
              "type": "object",
              "$schema": "http://json-schema.org/draft-03/schema",
              "id": "http://jsonschema.net",
              "required": true,
              "properties": {
                "participant": {
                  "type": "Personne",
                  "required": true
                },
                "id": {
                  "type": "Consommation",
                  "required": true
                }
              }
              }
09db76a6   Geoffrey PREUD'HOMME   Et on génère tout...
578
579
        responses:
          201:
0e498f62   Geoffrey PREUD'HOMME   Consomation → Con...
580
            description: La consommation a été bien payé
09db76a6   Geoffrey PREUD'HOMME   Et on génère tout...
581
582
    /evenement:
      post:
6ae819f3   badetitou   Go to JSON
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
        body:
            application/json:
              schema: |
                {
                "type": "object",
                "$schema": "http://json-schema.org/draft-03/schema",
                "id": "http://jsonschema.net",
                "required": true,
                "properties": {
                  "participant": {
                    "type": "Personne",
                    "required": true
                  },
                  "id": {
                    "type": "Evenement",
                    "required": true
                  }
                }
                }
09db76a6   Geoffrey PREUD'HOMME   Et on génère tout...
602
603
604
        responses:
          201:
            description: L'evenement a bien été payé
a901828f   badetitou   correction raml 3
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
    /credit:
      post:
        description: Permet de recharger ou debiter un compte
        body:
          application/json:
            schema: |
                {
                "type": "object",
                "$schema": "http://json-schema.org/draft-03/schema",
                "id": "http://jsonschema.net",
                "required": true,
                "properties": {
                  "participant": {
                    "type": "Personne",
                    "required": true
                  },
                  "prix": {
                    "type": "number",
                    "required": true
                  }
                }
                }
        responses:
          201:
            description: La personne a bien été crédité
6ae819f3   badetitou   Go to JSON
630
631
632
633
634
635
636
    /{idPersonne}:
      uriParameters:
        idPersonne:
          type: integer
          required: true
          description: id de la personne dont on veut regarder les transactions
          minimum: 0
7fa0cd71   badetitou   Les Transactions
637
638
639
640
641
642
643
644
645
646
647
648
      get:
        description: Permet de recuperer la liste des transaction d'une personne
        responses:
          200:
            description: On recupere la liste des transactions
            body:
              application/json:
                example: |
                  [
                    {
                      "participant": 1,
                      "acteur": 18,
1ae1d9d5   badetitou   Ajout de transact...
649
                      "id": 42,
7fa0cd71   badetitou   Les Transactions
650
651
652
653
654
655
                      "type": true,
                      "date": "2003-12-01",
                      "prix": 25.23
                    },
                    {
                      "participant": 1,
6ae819f3   badetitou   Go to JSON
656
                      "acteur": 12,
1ae1d9d5   badetitou   Ajout de transact...
657
                      "id": 43,
7fa0cd71   badetitou   Les Transactions
658
659
660
661
662
663
                      "type": true,
                      "date": "2003-12-01",
                      "prix": -25.23
                    }
                  ]
    /acteur/{idPersonne}:
6ae819f3   badetitou   Go to JSON
664
665
666
667
668
669
      uriParameters:
        idPersonne:
          type: integer
          required: true
          description: id de la personne dont on veut regarder les transactions
          minimum: 0
7fa0cd71   badetitou   Les Transactions
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
      get:
        description: Permet de recuperer la liste des transaction d'une personne
        responses:
          200:
            description: On recupere la liste des transactions
            body:
              application/json:
                example: |
                  [
                    {
                      "participant": 1,
                      "acteur": 18,
                      "idTransaction": 42,
                      "type": true,
                      "date": "2003-12-01",
                      "prix": 25.23
                    },
                    {
                      "participant": 1,
                      "acteur": 12,
                      "idTransaction": 43,
                      "type": true,
                      "date": "2003-12-01",
                      "prix": -25.23
                    }
6ae819f3   badetitou   Go to JSON
695
                  ]