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

Fix: params is not the same in RESTful APIs with different verbs #474

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

khiav223577
Copy link

@khiav223577 khiav223577 commented Apr 15, 2020

Currently I have two APIs with same route but different parameters.
It will generate wrong documents in this case. The parameter is duplicate and should not be listed in GET /admin/laboratories API. See my test cases and screenshot below:

route '/admin/laboratories', 'Laboratory List' do
  get 'Get Labs' do
    it do
      # ...
    end
  end
end

route '/admin/laboratories', 'Laboratory List' do
  post 'Create New Lab' do
    parameter :name, with_example: true, required: true
    parameter :products, with_example: true, required: true

    it do
      # ...
    end
  end
end

image

This PR will fix the problem.

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

Successfully merging this pull request may close these issues.

None yet

1 participant