Skip to content

Commit 2b69054

Browse files
Merge pull request #1041 from danielgtaylor/docs/restish-v2-public-docs
docs: update Restish v2 references
2 parents 5e980c7 + 3c49bf5 commit 2b69054

7 files changed

Lines changed: 74 additions & 96 deletions

File tree

autoconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type AutoConfigVar struct {
1717
// are advertised via OpenAPI extension and picked up by the CLI to make it
1818
// easier to get started using an API. This struct should be put into the
1919
// `OpenAPI.Extensions` map under the key `x-cli-config`. See also:
20-
// https://rest.sh/#/openapi?id=autoconfiguration
20+
// https://rest.sh/docs/reference/openapi/
2121
type AutoConfig struct {
2222
Security string `json:"security"`
2323
Headers map[string]string `json:"headers,omitempty"`

docs/docs/features/auto-patch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If the `GET` returns an `ETag` or `Last-Modified` header, then these will be use
2222
The following formats are supported out of the box, selected via the `Content-Type` header:
2323

2424
- [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) `application/merge-patch+json`
25-
- [Shorthand Merge Patch](https://rest.sh/#/shorthand?id=patch-partial-update) `application/merge-patch+shorthand`
25+
- [Shorthand Merge Patch](https://rest.sh/docs/reference/shorthand/) `application/merge-patch+shorthand`
2626
- [JSON Patch](https://www.rfc-editor.org/rfc/rfc6902.html) `application/json-patch+json`
2727

2828
!!! info "Merge on Steroids"
@@ -63,5 +63,5 @@ huma.Register(api, huma.Operation{
6363
- External Links
6464
- [HTTP PATCH Method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH)
6565
- [RFC7386 JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386)
66-
- [Shorthand Merge Patch](https://rest.sh/#/shorthand?id=patch-partial-update)
66+
- [Shorthand Merge Patch](https://rest.sh/docs/reference/shorthand/)
6767
- [RFC6902 JSON Patch](https://www.rfc-editor.org/rfc/rfc6902.html)

docs/docs/features/cli-auto-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ o.Components.SecuritySchemes["my-scheme"] = &huma.SecurityScheme{
1212
Type: "oauth2",
1313
// ... security scheme definition ...
1414
}
15-
o.Extensions["x-cli-autoconfig"] = huma.AutoConfig{
15+
o.Extensions["x-cli-config"] = huma.AutoConfig{
1616
Security: "my-scheme",
1717
Params: map[string]string{
1818
"client_id": "abc123",
@@ -23,4 +23,4 @@ o.Extensions["x-cli-autoconfig"] = huma.AutoConfig{
2323
}
2424
```
2525

26-
See the [CLI AutoConfiguration](https://rest.sh/#/openapi?id=autoconfiguration) documentation for more info, including how to ask the user for custom parameters.
26+
See the [CLI AutoConfiguration](https://rest.sh/docs/reference/openapi/) documentation for more info, including how to ask the user for custom parameters.

docs/docs/features/json-schema-registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Alternatively, you can manually manage your `Transformers` and `OnAddOperation`
3838

3939
!!! info "Editing"
4040

41-
The `$schema` field is incredibly powerful when paired with Restish's [edit](https://rest.sh/#/guide?id=editing-resources) command, giving you a quick and easy way to edit strongly-typed resources in your favorite editor.
41+
The `$schema` field is incredibly powerful when paired with Restish's [edit](https://rest.sh/docs/reference/edit-command/) command, giving you a quick and easy way to edit strongly-typed resources in your favorite editor.
4242

4343
## Schema Registry
4444

docs/docs/how-to/oauth2-jwt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ As mentioned previously, the Oauth2.0 standard does not specify the format of th
212212

213213
## Optional: Client Auto-Configuration
214214

215-
Some clients like [Restish](https://rest.sh/) support [OpenAPI-based auth auto-configuration](https://rest.sh/#/openapi?id=autoconfiguration). This means that you can configure your client to fetch the OpenAPI document and automatically configure itself to use the correct auth mechanism. This is done by adding the `x-cli-config` extension to the OpenAPI:
215+
Some clients like [Restish](https://rest.sh/) support [OpenAPI-based auth auto-configuration](https://rest.sh/docs/reference/openapi/). This means that you can configure your client to fetch the OpenAPI document and automatically configure itself to use the correct auth mechanism. This is done by adding the `x-cli-config` extension to the OpenAPI:
216216

217217
```go title="main.go"
218218
config.Extensions["x-cli-config"] = huma.AutoConfig{ /* ... */ }
Lines changed: 54 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,54 @@
1-
{"version": 2, "width": 72, "height": 30, "timestamp": 1699509947, "idle_time_limit": 1.0, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2-
[0.024399, "o", "\u001b[?1034h\u001b[34m$\u001b[0m "]
3-
[0.49882, "o", "r"]
4-
[0.585517, "o", "e"]
5-
[0.670626, "o", "s"]
6-
[0.758715, "o", "t"]
7-
[0.837654, "o", "i"]
8-
[1.002379, "o", "s"]
9-
[1.202177, "o", "h"]
10-
[1.31646, "o", " "]
11-
[1.444513, "o", "a"]
12-
[1.568832, "o", "p"]
13-
[1.682237, "o", "i"]
14-
[1.768867, "o", " "]
15-
[1.941194, "o", "c"]
16-
[2.025374, "o", "o"]
17-
[2.08862, "o", "n"]
18-
[2.222313, "o", "f"]
19-
[2.305716, "o", "i"]
20-
[2.495639, "o", "g"]
21-
[2.693832, "o", "u"]
22-
[2.841225, "o", "r"]
23-
[2.926078, "o", "e"]
24-
[3.024863, "o", " "]
25-
[3.160123, "o", "t"]
26-
[3.294376, "o", "u"]
27-
[3.42395, "o", "t"]
28-
[3.536855, "o", "o"]
29-
[3.718715, "o", "r"]
30-
[3.812994, "o", "i"]
31-
[3.941427, "o", "a"]
32-
[4.233979, "o", "l"]
33-
[4.348669, "o", " "]
34-
[4.717842, "o", "h"]
35-
[4.796502, "o", "t"]
36-
[4.962324, "o", "t"]
37-
[5.045922, "o", "p"]
38-
[5.364332, "o", ":"]
39-
[5.581268, "o", "/"]
40-
[5.726223, "o", "/"]
41-
[5.831477, "o", "l"]
42-
[6.027057, "o", "o"]
43-
[6.118001, "o", "c"]
44-
[6.20297, "o", "a"]
45-
[6.253663, "o", "l"]
46-
[6.441775, "o", "h"]
47-
[6.505986, "o", "o"]
48-
[6.585059, "o", "s"]
49-
[6.774343, "o", "t"]
50-
[7.025055, "o", ":"]
51-
[7.379098, "o", "8"]
52-
[7.541677, "o", "8"]
53-
[7.724613, "o", "8"]
54-
[8.135692, "o", "8"]
55-
[8.575874, "o", "\r\n\u001b[0m"]
56-
[8.606146, "o", "\u001b7\u001b[?25l\u001b8\u001b[0G\u001b[2K"]
57-
[8.606451, "o", "\u001b[0;1;92m? \u001b[0m\u001b[0;1;99mSelect option\u001b[0m \u001b[0;36m[Use arrows to move, type to filter]\u001b[0m\r\n\u001b[0m\u001b[0;1;36m> Change base URI (http://localhost:8888)\u001b[0m\r\n\u001b[0m\u001b[0;39m Add profile\u001b[0m\r\n\u001b[0m\u001b[0;39m Edit profile default\u001b[0m\r\n\u001b[0m\u001b[0;39m Save and exit\u001b[0m\r\n\u001b[0m\u001b7"]
58-
[8.60661, "o", "\u001b[1A\u001b[0G\u001b[1A\u001b[0G\u001b[1A\u001b[0G\u001b[1A"]
59-
[8.60662, "o", "\u001b[0G"]
60-
[9.705099, "o", "\u001b8\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K"]
61-
[9.705426, "o", "\u001b[0;1;92m? \u001b[0m\u001b[0;1;99mSelect option\u001b[0m \u001b[0;36m[Use arrows to move, type to filter]\u001b[0m\r\n\u001b[0m\u001b[0;39m Change base URI (http://localhost:8888)\u001b[0m\r\n\u001b[0m\u001b[0;1;36m> Add profile\u001b[0m\r\n\u001b[0m\u001b[0;39m Edit profile default\u001b[0m\r\n\u001b[0m\u001b[0;39m Save and exit\u001b[0m\r\n\u001b[0m\u001b7"]
62-
[9.705752, "o", "\u001b[1A\u001b[0G\u001b[1A\u001b[0G\u001b[1A\u001b[0G"]
63-
[9.934581, "o", "\u001b8"]
64-
[9.935927, "o", "\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K"]
65-
[9.936108, "o", "\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K"]
66-
[9.93632, "o", "\u001b[0;1;92m? \u001b[0m\u001b[0;1;99mSelect option\u001b[0m \u001b[0;36m[Use arrows to move, type to filter]\u001b[0m\r\n\u001b[0m\u001b[0;39m Change base URI (http://localhost:8888)\u001b[0m\r\n\u001b[0m\u001b[0;39m Add profile\u001b[0m\r\n\u001b[0m\u001b[0;1;36m> Edit profile default\u001b[0m\r\n\u001b[0m\u001b[0;39m Save and exit\u001b[0m\r\n\u001b[0m\u001b7\u001b[1A\u001b[0G\u001b[1A\u001b[0G"]
67-
[10.243835, "o", "\u001b8"]
68-
[10.243892, "o", "\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K"]
69-
[10.244195, "o", "\u001b[0;1;92m? \u001b[0m\u001b[0;1;99mSelect option\u001b[0m \u001b[0;36m[Use arrows to move, type to filter]\u001b[0m\r\n\u001b[0m\u001b[0;39m Change base URI (http://localhost:8888)\u001b[0m\r\n\u001b[0m\u001b[0;39m Add profile\u001b[0m\r\n\u001b[0m\u001b[0;39m Edit profile default\u001b[0m\r\n\u001b[0m\u001b[0;1;36m> Save and exit\u001b[0m\r\n\u001b[0m\u001b7"]
70-
[10.244432, "o", "\u001b[1A\u001b[0G"]
71-
[10.830028, "o", "\u001b8\u001b[?25h\u001b8\u001b[0G"]
72-
[10.831493, "o", "\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A"]
73-
[10.831525, "o", "\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K\u001b[1A\u001b[0G\u001b[2K"]
74-
[10.83169, "o", "\u001b[0;1;92m? \u001b[0m\u001b[0;1;99mSelect option\u001b[0m\u001b[0;36m Save and exit\u001b[0m\r\n\u001b[0m\r\n"]
1+
{"version": 2, "width": 72, "height": 30, "timestamp": 1780516800, "idle_time_limit": 1.0, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2+
[0.018568, "o", "\u001b[?1034h\u001b[34m$\u001b[0m "]
3+
[0.188660, "o", "r"]
4+
[0.229757, "o", "e"]
5+
[0.270692, "o", "s"]
6+
[0.311781, "o", "t"]
7+
[0.352810, "o", "i"]
8+
[0.394051, "o", "s"]
9+
[0.434368, "o", "h"]
10+
[0.475367, "o", " "]
11+
[0.516407, "o", "a"]
12+
[0.556868, "o", "p"]
13+
[0.597752, "o", "i"]
14+
[0.639444, "o", " "]
15+
[0.681048, "o", "c"]
16+
[0.722430, "o", "o"]
17+
[0.763333, "o", "n"]
18+
[0.805948, "o", "n"]
19+
[0.845837, "o", "e"]
20+
[0.886664, "o", "c"]
21+
[0.927486, "o", "t"]
22+
[0.968549, "o", " "]
23+
[1.010207, "o", "t"]
24+
[1.051288, "o", "u"]
25+
[1.092439, "o", "t"]
26+
[1.132578, "o", "o"]
27+
[1.174078, "o", "r"]
28+
[1.215378, "o", "i"]
29+
[1.256107, "o", "a"]
30+
[1.297256, "o", "l"]
31+
[1.338090, "o", " "]
32+
[1.379593, "o", "h"]
33+
[1.420593, "o", "t"]
34+
[1.461593, "o", "t"]
35+
[1.502593, "o", "p"]
36+
[1.543593, "o", ":"]
37+
[1.584593, "o", "/"]
38+
[1.625593, "o", "/"]
39+
[1.666593, "o", "l"]
40+
[1.707593, "o", "o"]
41+
[1.748593, "o", "c"]
42+
[1.789593, "o", "a"]
43+
[1.830593, "o", "l"]
44+
[1.871593, "o", "h"]
45+
[1.912593, "o", "o"]
46+
[1.953593, "o", "s"]
47+
[1.994593, "o", "t"]
48+
[2.035593, "o", ":"]
49+
[2.076593, "o", "8"]
50+
[2.117593, "o", "8"]
51+
[2.158593, "o", "8"]
52+
[2.199593, "o", "8"]
53+
[2.240593, "o", "\r\n\u001b[0m"]
54+
[2.381000, "o", "Discovered My API\r\n\u001b[0mBase URL: http://localhost:8888\r\n\u001b[0mOpenAPI: http://localhost:8888/openapi.json\r\n\u001b[0m\r\n\u001b[0mWrote config: ~/.config/restish/restish.json\r\n\u001b[0mConnected API \"tutorial\" with base URL http://localhost:8888 (2 operations discovered - run 'restish tutorial --help')\r\n\u001b[0m"]

docs/docs/tutorial/cli-client.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,42 @@ First, install [Restish](https://rest.sh/):
1414

1515
=== "Mac"
1616

17-
Install using Homebrew, Go, or [download a release](https://github.com/danielgtaylor/restish/releases).
17+
Install using Homebrew, Go, or [download a release](https://github.com/rest-sh/restish/releases).
1818

1919
```bash title="Terminal"
2020
# Homebrew
21-
$ brew tap danielgtaylor/restish
2221
$ brew install restish
2322

24-
# Go (requires Go 1.18+)
25-
$ go install github.com/danielgtaylor/restish@latest
23+
# Go
24+
$ go install github.com/rest-sh/restish/v2/cmd/restish@latest
2625
```
2726

2827
=== "Linux"
2928

30-
Install using Go, Homebrew for Linux, or [download a release](https://github.com/danielgtaylor/restish/releases).
29+
Install using Go, Homebrew for Linux, or [download a release](https://github.com/rest-sh/restish/releases).
3130

3231
```bash title="Terminal"
33-
# Go (requires Go 1.18+)
34-
$ go install github.com/danielgtaylor/restish@latest
32+
# Go
33+
$ go install github.com/rest-sh/restish/v2/cmd/restish@latest
3534

3635
# Homebrew for Linux
37-
$ brew tap danielgtaylor/restish
3836
$ brew install restish
3937
```
4038

4139
=== "Windows"
4240

43-
Install using Go or [download a release](https://github.com/danielgtaylor/restish/releases).
41+
Install using Go or [download a release](https://github.com/rest-sh/restish/releases).
4442

4543
```bash title="Terminal"
46-
# Go (requires Go 1.18+)
47-
$ go install github.com/danielgtaylor/restish@latest
44+
# Go
45+
$ go install github.com/rest-sh/restish/v2/cmd/restish@latest
4846
```
4947

50-
Also consider setting up [shell command-line completion](https://rest.sh/#/guide?id=shell-command-line-completion) for Restish.
48+
Also consider setting up [shell command-line completion](https://rest.sh/docs/getting-started/shell-setup/) for Restish.
5149

5250
## Configure your API
5351

54-
Next, we need to tell Restish about your API and give it a short name, which we'll call `tutorial`. Do this using the `api configure` command. This only needs to be done one time. Make sure your API is running and accessible before continuing, as this pulls the OpenAPI spec from the service.
52+
Next, we need to tell Restish about your API and give it a short name, which we'll call `tutorial`. Do this using the `api connect` command. This only needs to be done one time. Make sure your API is running and accessible before continuing, as this pulls the OpenAPI spec from the service.
5553

5654
{{ asciinema("../../terminal/restish-config.cast", rows="8") }}
5755

@@ -77,6 +75,6 @@ Congratulations! You just learned:
7775
Want to learn more about how Restish works and how to use it? Check these out next:
7876

7977
- [Restish](https://rest.sh/)
80-
- [Restish OpenAPI 3 support](https://rest.sh/#/openapi)
81-
- [Restish input](https://rest.sh/#/input)
78+
- [Restish OpenAPI reference](https://rest.sh/docs/reference/openapi/)
79+
- [Restish input](https://rest.sh/docs/guides/input-and-shorthand/)
8280
- [A CLI for REST APIs](https://dev.to/danielgtaylor/a-cli-for-rest-apis-part-1-104b)

0 commit comments

Comments
 (0)