swagger-api / swagger-node

Swagger module for node.js
http://swagger.io
Apache License 2.0
3.97k stars 585 forks source link

Option to allow vendor extensions through "swagger_raw" #441

Open schourode opened 7 years ago

schourode commented 7 years ago

The section of the documentation dealing with swagger_raw has the following note:

Note: This automatically filters out all sections that are swagger extensions (x-) by using a predefined regular expression: /^(?!x-.)/.

We are using vendor extensions on our internal APIs, and we would like to see these when pulling the swagger file for a service.

Are there by any chance an option to disable this behavior? Or is something that could be added?

fmauNeko commented 7 years ago

You can pass a filter to the fitting in your default.yml. Something like this will make sure everything is shown

swagger_raw:
      name: swagger_raw
      filter: ^(.*)