[Schema Inaccuracy] Repository Advisory's author and publisher fields
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- openapi
- Lĩnh vực
- api
Hướng nghiên cứu
Bắt đầu bằng cách tìm schema #/components/schemas/repository-advisory trong mô tả OpenAPI và kiểm tra các trường author và publisher. Kiểm tra cách các quy ước schema của dự án và các công cụ OpenAPI liên quan diễn giải các khai báo allOf và type nullable của chúng. Hoàn tất khi cả hai trường đều có biểu diễn hợp lệ, không mơ hồ và hỗ trợ trường hợp sử dụng tạo client đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Schema Inaccuracy
Currently, the #/components/schemas/repository-advisory schema has two fields with interesting types:
author:
readOnly: true
description: The author of the advisory.
allOf:
- "$ref": "#/components/schemas/simple-user"
type:
- 'null'
publisher:
readOnly: true
description: The publisher of the advisory.
allOf:
- "$ref": "#/components/schemas/simple-user"
type:
- 'null'
This appears to be somewhat contradictory, though it's always possible I'm misunderstanding the intent and the spec. The impact is that I'm currently unable to generate client code using a custom code generator (which, of course, might be wrong).
Expected
I believe the contents of the allOf property should be part of type, creating a nullable union:
author:
readOnly: true
description: The author of the advisory.
type:
- "$ref": "#/components/schemas/simple-user"
- 'null'
publisher:
readOnly: true
description: The publisher of the advisory.
type:
- "$ref": "#/components/schemas/simple-user"
- 'null'
Reproduction Steps
This issue arose while generating code from the description, so no API endpoint calls are involved. The code generator is language-specific, so it's unlikely to be useful during reproduction.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1.6k
- Fork
- 342
- Merge trung bình
- 2 giờ 23 phút
- Pull request đã merge (30 ngày)
- 57
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/rest-api-description
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
github/rest-api-description#7220 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
github/rest-api-description#7201 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Đang mởfeature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7162 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7135 ·
Tất cả issue của github/rest-api-description
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100