github.com/Axway/agent-sdk@v1.1.101/pkg/apic/testdata/raml_08.raml (about)

     1  #%RAML 0.8
     2  title: example 
     3  description: Sonny Forelli 
     4  version: 1.0
     5  protocols: HTTPS
     6  baseUri: example.local:8000/api
     7  
     8  traits:
     9    - secured:
    10        description: Some requests require authentication
    11        headers:
    12          X-User:
    13            description: Token to authenticate the user
    14            required: true
    15    - unsecured:
    16        description: This is not secured
    17    - pageable:
    18        queryParameters:
    19          offset:
    20            description: Skip over a number of elements by specifying an offset value for the query
    21            type: integer
    22            required: false
    23            example: 20
    24            default: 0
    25          limit:
    26            description: Limit the number of elements on the response
    27            type: integer
    28            required: false
    29            example: 80
    30            default: 10
    31    - unauthorized:
    32        responses:
    33          401:
    34            description: User Not Authorized, token invalid
    35            body:
    36              application/json:
    37                schema: |
    38                  {
    39                    "$schema": "http://json-schema.org/schema#",
    40                    "type": "object",
    41                    "description": "User not authorized",
    42                    "properties": {
    43                      "error": {
    44                        "description": "The error definition",
    45                        "type": "string"
    46                      }
    47                    },
    48                    "required": ["error"]
    49                  }
    50                example: |
    51                  {
    52                    "code": 401,
    53                    "error": "Not Authorized"
    54                  }
    55    - badRequest:
    56        responses:
    57          400:
    58            description: Bad Request
    59            body:
    60              application/json:
    61                example: |
    62                  {
    63                    "code": 400,
    64                    "error": "Bad Request"
    65                  }
    66                           
    67    - internalError:
    68        responses:
    69          500:
    70            description: Internal Server Error
    71            body:
    72              application/json:
    73                schema: |
    74                  {
    75                    "$schema": "http://json-schema.org/schema#",
    76                    "type": "object",
    77                    "description": "Internal Server Error",
    78                    "properties": {
    79                      "error": {
    80                        "description": "The error definition",
    81                        "type": "string"
    82                      }
    83                    },
    84                    "required": ["error"]
    85                  }
    86                example: |
    87                  {
    88                    "error": "Internal Server Error"
    89                  }
    90    - missingParams:
    91        responses:
    92          400:
    93            description: Bad Request, parameters missing
    94            body:
    95              application/json:
    96                schema: |
    97                  {
    98                    "$schema": "http://json-schema.org/schema#",
    99                    "type": "object",
   100                    "description": "Parametter Missing",
   101                    "properties": {
   102                      "error": {
   103                        "description": "The error definition",
   104                        "type": "string"
   105                      }
   106                    },
   107                    "required": ["error"]
   108                  }
   109                example: |
   110                  {
   111                    "error": "Parametter Missing"
   112                  }
   113                  
   114  /callback/order:
   115   /sim:
   116      displayName: postSimOrderAction
   117      description: Set New Sim from External Provider
   118      is: [ unauthorized, internalError]
   119      post: 
   120        is: [ unauthorized, internalError]
   121        description: " Set New Sim from External Provider"
   122        body:
   123          application/json:
   124            schema: callbacksim
   125            example: |
   126              {
   127               "trackingId": "dsn16zueuw",
   128               "iccid": "89341231321312",
   129               "checksum": "4d4fdcca079a2c98ef327f597b6cadfe8731feec94d8d2aabfcfe3db66d98410ca0201fc3df419a7534843f03fcbefe3afe4d9917f37719863254b45ae71fdf1"
   130              }
   131        responses:
   132          200:
   133            body:
   134              application/json:
   135                example: |
   136                  {
   137                    "result": "OK",
   138                  }
   139   /contract:
   140      displayName: postSignContractOrderAction
   141      description: Set ContractSign from External Provider
   142      is: [ unauthorized, internalError]
   143      post: 
   144        is: [ unauthorized, internalError]
   145        description: " Set New Sim from External Provider"
   146        body:
   147          application/json:
   148            schema: callbacksigncontract
   149            example: |
   150              {
   151               "trackingId": "dsn16zueuw",
   152               "date": "16/02/2016 15:23",
   153               "checksum": "4d4fdcca079a2c98ef327f597b6cadfe8731feec94d8d2aabfcfe3db66d98410ca0201fc3df419a7534843f03fcbefe3afe4d9917f37719863254b45ae71fdf1"
   154              }          
   155        responses:
   156          200:
   157            body:
   158              application/json:
   159                example: |
   160                  {
   161                    "result": "OK",
   162                  }