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

Add body for default ResourceNotFound error

Đang mở
#285 0 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/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ệ
go
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu trong api-specs/api/traits/errorable.raml và kiểm tra response 404 ResourceNotFound mặc định cùng với mọi response 404 được mô tả đầy đủ. Thêm định nghĩa body còn thiếu, sau đó xác minh rằng trình tạo mã Go không còn coi ResourceNotFound là GenericRequestError.

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

Mô tả

Currently in api-specs/api/traits/errorable.raml the 404 response is missing a body description. During code generation this causes the Go code generator to skip generating a typed error for a ResourceNotFound response, defaulting to a GenericRequestError instead. I believe this happens because the 404 error gets filtered from the possible responses before being passed to the code generation method.

Would it be possible to add this body to the RAML definitions? Or do you maybe have other suggestions on how to deal with this type of missing body in described responses? I have tried hardcoding a 404 response in the code generation, but this conflicts with potential other raml definitions where there is a fully described 404.

Ngôn ngữ chính
RAML
Star
66
Fork
33
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

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 commercetools/commercetools-api-reference

Tất cả issue của commercetools/commercetools-api-reference

Issue tương tự

Thêm issue về Backend & API Design

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.