ruby-grape / ruby-grape/grape-swagger

namespace with desc not work

Open
#611 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.1k
Forks
479
Avg merge
2d 14h
Merged PRs (30d)
6

Description

I am using rails 5.1.1 and ruby 2.4.1, grape and grape-swagger is the latest version

this following code did not generate swagger tag description,

resource :medicals, desc: "医生" do
  params do
    requires :phone
    requires :sms_code
    requires :password
  end
  post 'sign_up' do
    medical = Medical.new(phone: params[:phone], password: params[:password])

    if medical.save
      present_v medical, with: V1::Entities::Medical
    else
      resource_error!(medical)
    end
  end
end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example using Rails 5.1.1, Ruby 2.4.1, Grape, and the latest grape-swagger, then trace how the resource :medicals, desc: "医生" declaration becomes Swagger tags. Done means the generated Swagger documentation includes the resource description.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.