我有一個要求,我們必須將其中一個頭定義爲RAML 1.0中的一個數組。 它可以在任意點API平臺上正常工作。但是,我無法爲它提供輸入值。在RAML中定義數組
任何人都有類似的經驗,在raml 1.0頭定義一個數組?
#%RAML 1.0
baseUri: https://mocksvc.mulesoft.com/mocks/5b0f764c-844a-4a70-a188-d48a50bcc532
title: arraytest
version: v1
types:
array1:
type: object
properties:
name:
type: string
/arraycheck:
get:
headers:
x-arraynos:
type: array
items: array1
responses:
200:
body:
application/json:
example: {"aa":"aa"}
你能舉一個你爲該頭文件定義的RAML片段的例子嗎? –
#%RAML 1.0 基本URI:https://mocksvc.mulesoft.com/mocks/5b0f764c-844a-4a70-a188-d48a50bcc532 標題:ArrayTest中 版本:V1 類型: ARRAY1: 類型:對象 屬性: 名: 類型:字符串 /arraycheck: GET: 頭: 的x arraynos: 類型:陣列 項目:ARRAY1 響應: 200: 體: 應用/ JSON: 示例:{「AA 「:」aa「} –