apigee-127 / swagger-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
701 stars 373 forks source link

Exclude spec|test.js files from swagger-router #560

Closed morgs32 closed 6 years ago

morgs32 commented 6 years ago

I have some spec files along with the controller files in my controller directory. I should be able to ignore certain type of files.

Solves issue: #354

googlebot commented 6 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


morgs32 commented 6 years ago

Signed CLA

googlebot commented 6 years ago

CLAs look good, thanks!

whitlockjc commented 6 years ago

I'd much rather see this as a router middleware option so that we don't assume this naming convention for everyone. Thoughts?

morgs32 commented 6 years ago

I think that's a good idea. Something like an exclude prop that takes an array of regex's?

morgs32 commented 6 years ago

@whitlockjc how about this? Gimme the thumbs up and I'll make one more commit to docs

whitlockjc commented 6 years ago

How about you do it because it's the right thing to do? 👍 (That was said in a joking tone.)

I'll give this a review.

morgs32 commented 6 years ago

@whitlockjc bump