title: Mobile Order API
baseUri: http://localhost:8081/api
version: 1.0
uses:
assets: assets.lib.raml
annotationTypes:
monitoringInterval:
type: integer
/orders:
displayName: Orders
get:
is: [ assets.paging ]
(monitoringInterval): 30
description: Lists all orders of a specific user
queryParameters:
userId:
type: string
description: use to query all orders of a user
post:
/{orderId}:
get:
responses:
200:
body:
application/json:
type: assets.Order
application/xml:
type: !include schemas/order.xsd
一句話:RAML面向‘設計者、API生產者’,OpenAPI面向‘使用者、API消費者’。
RAML.org – RAML規范的官方網站
JSON-schema.org – JSON模式的主頁
基于RAML的API接口文檔管理
Introduction to RAML