Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ability to set description to whole entity

Đang mở
#276 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
api

Hướng nghiên cứu

Start by tracing how grape-swagger-entity handles entity definitions and how the desc entry point builds resource response descriptions. Confirm whether the entity-level description should populate the response description instead of the resource description, then add coverage for the shown User response shape.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

It seems there is no way to set global description for the whole Entity. If use grape-swagger-entity, it takes entity definition outside from resource, which I think is incorrect.

{  
   "definitions":{  
      "User":{  
         "type":"object",
         "properties":{  
            "username":{  
               "type":"string"
            }
         },
         "required":[  
            "username"
         ],
         "description":"Create a token from email/password pair"
      }
   }
}

This description seems being used nowhere, but it can be used as description on resource response section, when you set desc "Retrieve information about the signed user", entity: Entities::User

"responses":{"200":{"description":"User entity","schema":{"$ref":"#/definitions/User"}}

instead of

"responses":{"200":{"description":"Retrieve information about the signed user","schema":{"$ref":"#/definitions/User"}}

Ngôn ngữ chính
Ruby
Star
730
Fork
154
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby-grape/grape-entity

Tất cả issue của ruby-grape/grape-entity

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.