StackOverthrow
StackOverthrow

Reputation: 1284

Can NSwag invoke a custom Swagger generator?

Is there a way to specify a custom ISwaggerGenerator or invoke some method or program to produce the output swagger spec in the swaggerGenerator section of nswag.json?

The standard fromSwagger generator seems to work with only an output path, so as a last resort, I may use an exec task to create the file named there. But it would seem less hacky to specify my generator directly in nswag.json.

"swaggerGenerator": {
    "fromSwagger": {
        "output": "swagger.json"
    }
}

Upvotes: 0

Views: 257

Answers (1)

Rico Suter
Rico Suter

Reputation: 11858

At the moment, the input can be a file/url or one of NSwag’s Swagger generators (use NSwagStudio to see the available inputs).

Upvotes: 1

Related Questions