Unable to correctly import an OpenAPI 3.0 to API Gateway v2

0

Trying to import an OpenAPI 3.0 definition generated by FastAPI. The API only gets imported partially, and these warnings are listed in the response:

"Warnings": [
    "Parse issue: attribute components.schemas.Place.items is not of type `object`",
    "Parse issue: attribute components.schemas.Place.items is missing",
    "Unable to put method 'PUT' on resource at path '/place/': Part of the given route key path is empty Ignoring.",
    "Unable to put method 'GET' on resource at path '/schedule/': Part of the given route key path is empty Ignoring.",
    "Unable to put method 'PUT' on resource at path '/schedule/': Part of the given route key path is empty Ignoring.",
    "Unable to put method 'POST' on resource at path '/schedule/': Part of the given route key path is empty Ignoring.",
    "Unable to put method 'POST' on resource at path '/booking/': Part of the given route key path is empty Ignoring."
]

The process is importing only 1 method per route. As a workaround I can use the old REST API, but if anyone has any idea on how to fix this for the HTTP that would be helpful. Thanks!

scezar
已提問 2 年前檢視次數 1719 次
1 個回答
1

Please check if any of the limitations mentioned in this document https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html under the section "API Gateway supports most of the OpenAPI 2.0 specification and the OpenAPI 3.0 specification, with the following exceptions:" apply to you.

Is your imported API working correctly when using REST API as opposed to HTTP API. In that case, using REST API is probably a better option for you. You can use this document https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html to see the differences between the two and make an informed decision.

profile pictureAWS
專家
已回答 2 年前
  • Those limitations don't seem to apply. Also that document only talks about REST and WebSocket APIs, and REST works fine so I'll probably use that for now. But the HTTP API seems to be more fit for my application.

  • Yes if REST is working for you, please go ahead with REST. Functionally there is very little that can be done with HTTP that cannot be done with REST. But interested to know why you think HTTP API is a better fit for your application.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南