feat: use HelpText.HTTP for Content-Type documentation#2248
Conversation
updates http-api-docs to read Content-Type from the new HelpText.HTTP.ResponseContentType field instead of cmd.Extra. changes: - extract contentType and httpDescription from Helptext.HTTP - add HTTPDescription field to Endpoint struct for future use - show Content-Type without backticks for better readability - improve response text for endpoints with/without Content-Type depends on: - go-ipfs-cmds@0ab930fef0cd (feat: add HTTPHelpText) - kubo@70b7f0736d5b (feat: use HelpText.HTTP for Content-Type)
🚀 Build Preview on IPFS ready
|
- tools/http-api-docs: kubo v0.39.1-pre → v0.40.0, go 1.25 → 1.26 - .github/actions/update-with-latest-versions: golang:1.25 → golang:1.26
- swarm/peers example showed {"Strings": [...]} format from years ago,
replaced with accurate {"Peers": [{...}]} matching v0.40.0 output
- flags example used removed object/get endpoint, replaced with block/stat
- added note that cli --enc=json produces the same json as http rpc api
- fix fmt.Fprintln vet error (redundant newline) in markdown.go
- go fix: interface{} -> any in endpoints.go
files:
- tools/http-api-docs/markdown.go: intro template fixes
- tools/http-api-docs/endpoints.go: go fix modernization
- docs/reference/kubo/generate-cli-docs.sh: same intro fix
- docs/reference/kubo/rpc.md: regenerated
- docs/reference/kubo/cli.md: regenerated
|
|
||
| This resolves all symlinks, including CLI arguments and those found inside | ||
| directories. Symlinks to files become regular file content, symlinks to | ||
| directories are traversed and their contents are added. |
There was a problem hiding this comment.
[LanguageTool] reported by reviewdog 🐶
Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2[4])
Suggestions: , and
URL: https://languagetool.org/insights/post/types-of-sentences/#compound-sentence
Rule: https://community.languagetool.org/rule/show/COMMA_COMPOUND_SENTENCE_2?lang=en-US&subId=4
Category: PUNCTUATION
| 'ipfs files write' creates a trickle-dag optimized for append-only operations. | ||
| See '--trickle' in 'ipfs add --help' for more information. | ||
|
|
||
| NOTE: The 'Import.UnixFSFileMaxLinks' config option does not apply to this command. |
There was a problem hiding this comment.
[LanguageTool] reported by reviewdog 🐶
Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses
Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
Category: PUNCTUATION
|
|
||
| Mode and mtime are optional UnixFS metadata. They are only present if the | ||
| content was imported with 'ipfs add --preserve-mode' and '--preserve-mtime'. | ||
| Without preserved metadata, both mode and mtime display '-'. Times are in UTC. |
There was a problem hiding this comment.
[LanguageTool] reported by reviewdog 🐶
Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses
Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
Category: PUNCTUATION
|
|
||
| Mode and mtime are optional UnixFS metadata. They are only present if the | ||
| content was imported with 'ipfs add --preserve-mode' and '--preserve-mtime'. | ||
| Without preserved metadata, both mode and mtime display '-'. Times are in UTC. |
There was a problem hiding this comment.
[LanguageTool] reported by reviewdog 🐶
Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses
Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
Category: PUNCTUATION
|
|
||
| Example: | ||
|
|
||
| > ipfs swarm addrs autonat |
There was a problem hiding this comment.
[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: autonat
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC
updates http-api-docs to read Content-Type from the new HelpText.HTTP.ResponseContentType field to document returned content-type at https://docs.ipfs.tech/reference/kubo/rpc/ when the next Kubo release (0.40) ships.
changes:
depends on: