Three code examples do not parse (HttpService, OAuth 2.0 flow, Scout config.json on Windows)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 91/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, json, typescript
研究方向
檢查指定的三個檔案:content/reference/api/extensions-sdk/HttpService.md、content/manuals/extensions/extensions-sdk/guides/oauth2-flow.md 和 content/manuals/scout/install.md。結合上下文檢查範例,並在每次修正後驗證 JavaScript 或 JSON 語法。三個範例都能依照原文解析即為完成。
由索引模型根據 Issue 內容生成。
描述
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
Three code examples can't be used as written, because they don't parse:
- HttpService
getexample (content/reference/api/extensions-sdk/HttpService.md, around line 25):
.then((value: any) => console.log(value)is missing the closing)and;. The other examples on the same page end withconsole.log(value));. - OAuth 2.0 flow (
content/manuals/extensions/extensions-sdk/guides/oauth2-flow.md, around line 48): theopenExternalURL is a double-quoted string that spans four lines, which is an unterminated string literal in JS/TS.${REDIRECT_URI}inside it would only be substituted in a template literal. - Scout
config.jsonon Windows (content/manuals/scout/install.md, around line 111):
"C:\Users\<USER>\.docker\scout"uses single backslashes. In JSON\U,\<,\.and\sare invalid escapes, so the file can't be parsed. They need to be\\.
Location
- https://docs.docker.com/reference/api/extensions-sdk/HttpService/
- https://docs.docker.com/extensions/extensions-sdk/guides/oauth2-flow/
- https://docs.docker.com/scout/install/
Suggestion
- Close the call:
.then((value: any) => console.log(value)); - Use one template literal:
`https://authorization-server.com/authorize?response_type=code&client_id=...&redirect_uri=${REDIRECT_URI}` - Double the backslashes:
"C:\\Users\\<USER>\\.docker\\scout"
I have a branch with these three one-line fixes ready and can open a PR that links this issue if a maintainer is OK with it. Following the moby AI policy: I found these with an AI coding assistant (a parser run over the docs' code blocks) and checked each one by hand.
- 主要語言
- Markdown
- 星號
- 4.7k
- 分支
- 8.6k
- 平均合併
- 2 天 8 小時
- 30 天內合併 PR
- 188
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
docker/docs 的其他 Issue
-
status/triage
難度 1/5 1 小時以內 新手友好度 68/100
維護者通常 1 天內回覆
-
[docs-scanner] Confusing temporal framing in company creation steps可能已有人在做 @sahithib20 於 2 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 89/100
維護者通常 1 天內回覆
-
status/triage
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆
-
missing a part未關閉status/triage
難度 1/5 1 小時以內 新手友好度 82/100
維護者通常 1 天內回覆
-
[docs-scanner] Confusing Datadog auth_token configuration with unexplained <TOKEN> placeholder可能已有人在做 @O1sumitkumar 於 4 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
nicobailon/pi-subagents#3420 ·
維護者通常 1 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 2 天內回覆
-
config easy first-contributor first-contributors good first issue help wanted toml up-for-grabs
難度 1/5 1 小時以內 新手友好度 95/100
fork-commit-merge/fork-commit-merge#8727 ·
維護者通常 1 天內回覆
-
documentation good first issue
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 5 天內回覆