File: helloworld.raml

package info (click to toggle)
cloc 2.06-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,064 kB
  • sloc: perl: 30,146; cpp: 1,219; python: 623; ansic: 334; asm: 267; makefile: 244; sh: 186; sql: 144; java: 136; ruby: 111; cs: 104; pascal: 52; lisp: 50; haskell: 35; f90: 35; cobol: 35; objc: 25; php: 22; javascript: 15; fortran: 9; ml: 8; xml: 7; tcl: 2
file content (70 lines) | stat: -rw-r--r-- 1,967 bytes parent folder | download | duplicates (5)
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
65
66
67
68
69
70
# https://raw.githubusercontent.com/raml2html/raml2html/master/examples/helloworld.raml
#
#%RAML 1.0
title: Hello world # required title
version: 1
baseUri: http://example.com/{version}
documentation:
  - title: Welcome
    content: |
      Welcome to the Example Documentation. The Example API allows you
      to do stuff. See also [example.com](https://www.example.com).
  - title: Chapter two
    content: |
      More content here. Including **bold** text!

/helloworld: # optional resource
  description: This is the top level description for /helloworld.

  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"]