vincentlowe

acme-banking-api-day1.raml

Aug 15th, 2022
1,032
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.66 KB | None | 0 0
  1. #%RAML 1.0
  2. title: ACME Banking API
  3. version: 1.0.0
  4. mediaType:
  5.   - application/json
  6.  
  7. types:
  8.   Customer: !include datatypes/Customer.raml
  9.   Account: !include datatypes/Account.raml
  10.   Transaction: !include datatypes/Transaction.raml
  11.   CustomErrorMessage: !include /datatypes/CustomErrorMessage.raml
  12.  
  13. /customers:
  14.   get:
  15.     headers:
  16.       Accept?:
  17.     responses:
  18.       200:
  19.         headers:
  20.           Cache-Control:
  21.           Expires:
  22.             type: datetime
  23.         body:
  24.           application/json:
  25.             type: Customer[]
  26.             examples: !include /examples/CustomersExample.raml
  27.           application/xml:
  28.             type: Customer[]
  29.             examples: !include /examples/CustomersExample.raml
  30.       404:
  31.         body:
  32.           type: CustomErrorMessage
  33.   post:
  34.     body:
  35.       type: Customer
  36.     responses:
  37.       201:
  38.         headers:
  39.           Location:
  40.         body:
  41.           type: string
  42.       503:
  43.         body:
  44.           type: CustomErrorMessage
  45.  
  46.   /{ID}:
  47.     get:
  48.       responses:
  49.         200:
  50.           body:
  51.             type: array
  52.  
  53.     delete:
  54.     put:
  55.       body:
  56.       responses:
  57.         200:
  58.           body:
  59.         201:
  60.           headers:
  61.             Location:
  62.           body:
  63.            
  64.     /accounts:
  65.       get:
  66. /accounts:
  67.   get:
  68.   post:
  69.  
  70.   /{ID}:
  71.     get:
  72.     delete:
  73.       responses:
  74.         200:
  75.           body:
  76.         404:
  77.           body:
  78.             type: CustomErrorMessage
  79.     patch:
  80.       body:
  81.       responses:
  82.         204:
  83.         501:
  84.           body:
  85.             type: CustomErrorMessage
  86.    
  87.     /transactions:
  88.       get:
  89. /transactions:
  90.   get:
  91.   post:
  92.  
Advertisement