krakenjs / swaggerize-routes

Swagger document driven route builder.
Other
58 stars 57 forks source link

swagger schema extensions (^x-) in info section are not allowed #67

Open subeeshcbabu-zz opened 8 years ago

subeeshcbabu-zz commented 8 years ago

Sample API - https://api.apis.guru/v2/specs/glugbot.com/1/swagger.json

The app fails with following schema validation error for schema extensions in info section

ValidationError: child "info" fails because ["x-origin" is not allowed, "x-preferred" is not allowed, "x-providerName" is not allowed]

Extensions:

   "x-origin": {
      "format": "swagger",
      "url": "http://www.glugbot.com/api-docs",
      "version": "1.2"
    },
    "x-preferred": true,
    "x-providerName": "glugbot.com"
kenjones-cisco commented 8 years ago

Have you considered using https://www.npmjs.com/package/swagger-parser as the parser / validator instead of maintaining the enjoi custom built one?

I know it definitely works with vendor extensions in the info section.

Features:

subeeshcbabu-zz commented 8 years ago

Yes. Huge plus for swagger parser and json validator. I am working on the next major version of the router, that is going to replace enjoi with swagger-parser and is-my-json-valid json validator. https://github.com/krakenjs/swaggerize-routes/milestone/1 Expect a PR by end of this week.

nakamorichi commented 7 years ago

How is the next version coming? I need to get the vendor extensions working...

subeeshcbabu-zz commented 7 years ago

sorry this PR got delayed. Working on it now. will update the status soon.