AKIRA-MIYAKE / serverless-import-swagger

Import functions from OpenAPI spec file to serverless.yml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI 3.0 specification is not supported

exoego opened this issue · comments

OpenAPI 3.0 has been released in 2017-7-26, as the successor to Swagger 2.0. The official Swagger documentation is now OpenAPI 3.0 documentation.

I started to migrate from Swagger 2.0 to OpenAPI 3.0 that sophisticates structures and introduces lots of new features. Current severless-import-swagger can not parse OpenAPI 3.0 file and throws syntax error like below:

{
  "name": "SyntaxError",
  "message": "/home/foo/swagger.yaml is not a valid Swagger API definition",
  "stack": "SyntaxError: /home/foo/swagger.yaml is not a valid Swagger API definition
    at /home/foo/node_modules/swagger-parser/lib/index.js:75:19
    at <anonymous>"
}

It would be benefical for Swagger-and-Serverless user, like me, if severless-import-swagger supports OpenAPI 3.0.

I am happy to work on pull request to add OpenAPI 3.0 support !!

There are no npm module to parse OpenAPI 3.0 as of today.

I think we need to wait until OpenAPI 3.0 support lands on https://www.npmjs.com/package/swagger-parser (it says coming soon).

ref: APIDevTools/swagger-parser#72

it seems that OpenAPI is now supported.
do you plan to work on this issue? if so, when?

@iaconba
OpenAPI 3.0 support had been added in PR #15 and released to npm!!