I'm converting json to raml , for /alert/ it to taking get proper response, but for /alert/{alertid}
, its not taking response. I want the response for particular alertId API. Here is my raml code. There are many id's in alert I want response for particular id . And for particular id I am hitting an API.
#%RAML 1.0
title: Test the load customer REST Services
version: 1.0
protocols: [ HTTPS ]
baseUri: http://myapi.mysite.com/api/
mediaType: application/json
securitySchemes:
basicAuth:
description: Each request must contain the header
type: Basic Authentication
describedBy:
headers:
Authorization:
description: Used to send
type: string
responses:
401:
description: |
Provided username and password is invalid.
types:
alert:
type: object
properties:
id: string
description: string
assetId: string
alertId: string
code: integer
ownerId?: string
metadata:
type: object
properties:
indicatorId: string
types:
837a-dcf2a7d556c5:
type: object
properties:
id: string
description: string
assetId: string
alertId: string
code: integer
ownerId?: string
metadata:
type: object
properties:
indicatorId: string
/alert:
get:
description: Get list of alert API.
headers:
body:
responses:
200:
body:
type: !include alert.json
/{alertId}:
get:
description: Get list of by Id.
headers:
body:
responses:
200:
body:
type: !include 837a-dcf2a7d556c5.json
You can try something like this: