在AWS API模型中使用JSON模式创建映射映射

时间:2017-01-24 10:08:46

标签: aws-api-gateway

我想在SDK中创建一个Map变量 - AWS API - 我需要编写一个JSON模式输入/输出模型。

帮助我编写JSON Schema语法,以便实现我的目标

1 个答案:

答案 0 :(得分:1)

只制作一个Map变量 -

{
  "type" : "object",
  "required" : [ "answers" ],
  "properties" : {
    "answers" : {
      "type" : "object",
       "additionalProperties": { "type": "string" }
    }
  },
  "title" : "test"
}

创建地图使用地图:

"answers": {
         "type" :"object",
         "additionalProperties" : 
            {   "type" : "object",
                "additionalProperties" : {"type" : "string"}
             }
}