apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

A swagger document (OAS 3.0.0) can not be opened #3715

Closed matleppa closed 5 years ago

matleppa commented 5 years ago

When tried to upload a swagger document with version OAS 3.0.0, the upload fails with error message [http://localhost:3000/gridfs/DocumentationFiles/id/b49bb50c07b7805873c3483c is not a valid Swagger API definition]

matleppa commented 5 years ago

In package.json "swagger-client": "^2.1.32", "swagger-parser": "^3.4.2",

In package-lock.json "swagger-parser": { "version": "3.4.2",

In yarn.lock swagger-client@^2.1.32: version "2.2.21" swagger-parser@^3.4.1: version "3.4.2"

It seems, that the OAS 3.0 version is after all not supported with current versions of swagger modules.

matleppa commented 5 years ago

Functionality can be verified with following test case:

  1. create tow APIs: API A and API B
  2. create two swagger documents, document AA according to OAS 2 and document BB with OAS 3
  3. connect document AA to API A
  4. connect document BB to API B

Expected results

  1. document is opened correctly
  2. document is opened correctly

Unexpected results

  1. error message "Document is not valid OAS documentaion