-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.raml
64 lines (59 loc) · 1.66 KB
/
api.raml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#%RAML 1.0
title: Smart home API# required title
version: 1
baseUri: http://127.0.0.1:3000/light/off
documentation:
- title: Welcome
content: |
API controle de l'appartement
/roller-shutter: # optional resource
description: This is the top level description for /roller-shutter.
get: # HTTP method declaration
responses: # declare a response
200: # HTTP status code
body: # declare content of response
application/json: # media type
type: | # structural definition of a response (schema or type)
{
"title": "Hello world Response",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
example: # example how a response looks like
{
"message": "Hello world"
}
/test:
displayName: TEST
get:
description: a sub resource
/{id}:
uriParameters:
id:
type: string
description: account identifier
minLength: 1
maxLength: 10
get:
headers:
Authorization:
type: string
description: Basic authentication header
example: |
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
put:
body:
application/x-www-form-urlencoded:
properties:
name:
description: name on account
type: string
examples:
example1: Naruto Uzumaki
example2: Kevin Renskers
gender:
enum: ["male", "female"]