如何使用AWS API Gateway从具有多个定义的另一个模型中引用一个模型

时间:2019-04-06 00:40:00

标签: amazon-web-services api-gateway

我正在尝试使用此模型来引用模型:

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-step-by-step.html#getting-started-models-add-models

"deets": {
"$ref":"https://apigateway.amazonaws.com/restapis/<rest_api_id>/models/stuff
}

问题是东西中有多个定义。我该如何只引用一个?

例如: 东西    -框    -罐    -杯子

我尝试添加/ box,但随后收到“指定的模型无效:验证结果:警告:[],错误:[模型引用必须采用规范形式]”

我已经读过How do I reference one model from another model using aws API Gateway,它解决了一半的问题,即实际引用,但没有说明如何引用特定的定义。

0 个答案:

没有答案