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

"is_default" is not unique per species

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
api, backend-api-design

Hướng nghiên cứu

Bắt đầu với tài liệu PokemonForm và dữ liệu pokemon.csv được tham chiếu trong issue, sau đó theo dõi cách API expose is_default và form_order. Xem lại các comment hiện có trước khi xác định quy tắc thay thế. Công việc được xem là hoàn tất khi hành vi của form chính đã được thống nhất, triển khai và ghi tài liệu, mà không để ngữ nghĩa của field hiện tại trở nên mơ hồ.

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

Mô tả

The PokemonForm documentation describes is_default as

True for exactly one form used as the default for each Pokémon.

Of the 249 Pokémon with more than one form in pokemon.csv, 222 of them have more than one form with is_default set to True.

While the easiest fix would just be to purge these secondary is_default forms, I think that field should just be deprecated and replaced with a different method of determining the primary form. I have to imagine this field is not widely used by API consumers, as it would not work for its documented purpose.

My preferred design would be to simply have the form of the species with the first form ID be the primary form. It looks like there isn't strictly a form_id field, but it roughly corresponds to the form_order field. So my suggestion would be to just define that the form of the Pokémon with the smallest value in form_order is considered the default form.

Ngôn ngữ chính
Python
Star
5.4k
Fork
1.2k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
18

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 PokeAPI/pokeapi

Tất cả issue của PokeAPI/pokeapi

Issue tương tự

Thêm issue về Python

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.