inconsistent "Argument" documentation
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
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- r
- Lĩnh vực
- api, documentation
Hướng nghiên cứu
Start with the annotations page's Argument format and reproduce the documented @body examples, including @body :string and the unnamed form. Then inspect the register_parser example and raw parser behavior; done means the accepted syntax, parser interaction, and any backward-compatibility constraints are clearly documented or the requested inconsistency is resolved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the annotations page, the "@body" tag (among a few) suggests it can be Name[:Type][(Default)][*][Description]. In my experience, that means that:
Nameis required- if you want a
Type, it must be preceded by a colon - if you want a
Defaultvalue, it must be enclosed in parens - if you want it to be required, add
*after all of name, type, default (some optional) and before an optional description - if you want a
Description, it must be enclosed in brackets
However, the verbiage states
If a single @body tag is used the Name can be omitted to indicate that the body is not a named object but simply an instance of the given Type
Ignoring the "name is required" part, it then makes sense that in this case I should do #* @body :string, but that fails with
Caused by error in `type_caster(content$schema, isTRUE(desc$required), loc = "body")`:
! argument "name" is missing, with no default
What works is #* @body string, but that could mean Name="string" or Type="string".
I suggest plumber2 supports the format directed by the "Argument" string that says the type needs to be preceded by the Name. Whether or not you impose stricter parsing is a discussion for backward compatibility.
But even with that, @body, @body quux:quux, @body quux, and @body binary all make no difference to me, the function(body) still works as one might think. For this, Is my @parser raw impacting things?
plumber2::register_parser(
name = "raw",
fun = function() function(raw, directives) raw,
mime_types = "*/*",
default = FALSE
)
(Do you think adding a native parser that always always always returns "raw binary" regardless of what is claimed? "octet" fails when the caller specifies a content-type, I want to ignore what the caller claims.
- Ngôn ngữ chính
- R
- Star
- 119
- Fork
- 17
- 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
- Đọ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 posit-dev/plumber2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
`except` argument in `Plumber2$add_shiny` method is not respectedCó thể đã có người làm @cgiachalis đã nhận 139 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Update vignette `hosting.qmd`Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Development RoadmapĐang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 20/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Tất cả issue của posit-dev/plumber2
Issue tương tự
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothĐang mởarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Apich-Organization/rssn#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PRL-PRG/r-compile-server#70 · 1 bình luận ·
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
posit-dev/images-workbench#257 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
posit-dev/images-package-manager#188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
posit-dev/images-connect#222 ·
Maintainer thường phản hồi trong vòng 1 ngày