Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to select which routes should be documented #8

Open
AlexisNo opened this issue Oct 15, 2015 · 12 comments
Open

Add options to select which routes should be documented #8

AlexisNo opened this issue Oct 15, 2015 · 12 comments

Comments

@AlexisNo
Copy link
Contributor

Today, all routes are added to the swagger document.
A user should be allowed to select what kind of routes he wants to document:

  • blueprints RESTful routes
  • blueprints shortcuts routes
  • blueprints actions routes
  • manual routes

One may want to document the REST API of the application and not necessarily want to expose the documentation of the requests to get HTML pages.

It could be an array with these default values:

sails.config.swagger.route: ['rest', 'shortcuts', 'blueprint_actions', 'manual']

Maybe the options could be limited to ['rest', 'shortcuts', 'actions'] where 'actions' stands for blueprint_actions and manual.

I guess it would be easier to implement this when sails.getRoutes() is available.

@tjwebb
Copy link
Member

tjwebb commented Nov 12, 2015

I think this would be good; a PR would be appreciated.

@AlexisNo
Copy link
Contributor Author

I would love to work on it! :)

I proposed at small PR on Sails that would make it very easy to implement. This PR would also allow to simplify the current code and to implement many other functionalities (to disable or enrich the documentation for some specific routes for example).

Unfortunately, I don't have feedback about it since three weeks. I guess the core team is very busy nowadays. But as soon as I know if I can rely on that PR, I'll work on it.

Thanks

@moisesrodriguez
Copy link
Contributor

@AlexisNo looks like the PR was merged balderdashy/sails#3326, waiting to see this implemented

@AlexisNo
Copy link
Contributor Author

@moisesrodriguez Cool ! I will try to find some time to work on it this week.

@riemers
Copy link

riemers commented Jan 5, 2016

Looking forward to it, just bumped into it myself too ;)

@AlexisNo
Copy link
Contributor Author

AlexisNo commented Jan 6, 2016

Sorry, I began to do some refactoring to achieve that, but I think I will need another little modification in the blueprint hook to archive that correctly. And theses days I really had no time to work on it :(

@arthur-kv
Copy link

any news about this feature?

@krewx
Copy link

krewx commented Aug 3, 2016

+1

@varunsingh9
Copy link

any updates on this ?

@lucj
Copy link

lucj commented Sep 7, 2016

Hi, any update ? Is there an option to have only the manual routes to be documented ? Also, any way to remove a whole model documentation to be exposed ?

@joseasrocha
Copy link

@lucj I've done some bug fixes and made this available through
magik-sails-swagger

Check de Readme and you should get this solved

@lucj
Copy link

lucj commented Sep 7, 2016

thanks a lot, I'll check that.

On Wed, Sep 7, 2016 at 4:19 PM, José Rocha [email protected] wrote:

@lucj https://github.com/lucj I've done some bug fixes and made this
available through
magik-sails-swagger
https://github.com/Magikevolution/sails-magik-swagger

Check de Readme and you should get this solved


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALIhscNvUmm3Tscl4JCFxAwcgjqy_G7ks5qnsgOgaJpZM4GPzw3
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants