krakenjs / swaggerize-express

Design-driven apis with swagger 2.0 and express.
Other
355 stars 81 forks source link

swaggerize-express should allow swagger 2.0 vendor extensions #63

Closed dimichgh closed 9 years ago

dimichgh commented 9 years ago

if I try to add vendor extension to the root of the swagger schema, it would fail saying the extension is not allowed. Example:

{
    "swagger": "2.0",
    "x-property": "custom property",
    "info": {
        "version": "1.0.0",
        "title": "Swagger Petstore",
        "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
        "termsOfService": "http://helloreverb.com/terms/",
        "contact": {
            "name": "Wordnik API Team"
        },
        "license": {
            "name": "MIT"
        }
    },
    "basePath": "/svc/v1",
    "host": "petstore.swagger.wordnik.com",
    "schemes": [
        "http"
    ],
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "paths": {}
}
tlivings commented 9 years ago

Sorry this wasn't on my radar. Are you using 4.0.0?

dimichgh commented 9 years ago

Not yet? Is it supported there?

tlivings commented 9 years ago

Yes.