Я конвертирую json в raml, чтобы / alert / он получал правильный ответ, но для /alert/{alertid}
он не принимает ответ. Мне нужен ответ для конкретного API-интерфейса alertId. Вот мой код raml. Есть много идентификаторов в предупреждении, я хочу получить ответ для определенного идентификатора. И для конкретного идентификатора я нажимаю 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