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

path/{template} per service -> per method #46

Closed
idealley opened this issue Mar 29, 2017 · 1 comment
Closed

path/{template} per service -> per method #46

idealley opened this issue Mar 29, 2017 · 1 comment

Comments

@idealley
Copy link

Expected behavior

By default the path template uses idas path parameter. We can set an id with a value that overrides the default path parameter. This is for the whole service

Actual behavior

It would be nice if we could have the option to override per method. Let say I want the path parameter to be called slug for the get method and use the default id for the patch one

@idealley
Copy link
Author

idealley commented Sep 1, 2017

You can "manually" modify the docs object:

  app.docs.paths = Object.assign(app.docs.paths, {['/courses/{my-new-var}']:app.docs.paths['/courses/{id}']});
  delete app.docs.paths['/courses/{id}'];

@Mairu Mairu closed this as completed in 483c812 Jun 1, 2019
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

1 participant