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

Improve handling of default value in responses for successful status codes

Đang mở
#199 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
openapi, typescript
Lĩnh vực
api, tooling

Hướng nghiên cứu

Start by locating the generator's handling of OpenAPI response defaults and how it decides whether a response is successful when no 200 schema is defined. Review the generator documentation or README and the CHANGELOG or user guide for the relevant response behavior. Done means the default is treated as a successful response in this case and the behavior is documented.

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

Mô tả

Hello,

I have noticed a potential issue with your OpenAPI code generator regarding the interpretation of the default value in the responses section.

The problem is that when there is no explicitly defined schema for the 200 status, the default value is considered as an error/unsuccessful response, whereas it would be logical to consider it as a successful response.

I propose the following changes:

  1. Improved interpretation of default: Make the default value be treated as a successful response when there are no explicitly defined schemas for the 200 status. This aligns with standard practice and meets developers' expectations for API responses.

  2. Documentation update: Clarify in the generator's documentation or README file how the default value is handled and how developers can use it for successful responses.

  3. Explain the changes: Describe in the CHANGELOG file or user guide that changes have been made regarding the interpretation of default and what benefits it brings.

The interpretation of the default value in the responses section is crucial for a proper understanding of API response schemas and the generation of client-side code that handles responses according to expectations. Clarifying this aspect will help developers make more effective use of your generator.

Thank you for your work on this generator, and I hope that the proposed changes will be considered.

Ngôn ngữ chính
TypeScript
Star
635
Fork
82
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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: 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 fabien0102/openapi-codegen

Tất cả issue của fabien0102/openapi-codegen

Issue tương tự

Thêm issue về TypeScript

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.