Skip to content

Commit f1fd439

Browse files
authored
docs: fix OpenAPI petstore example (#233)
Signed-off-by: Grant Linville <[email protected]>
1 parent 3606a88 commit f1fd439

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/docs/03-tools/03-openapi.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ GPTScript will automatically and internally generate the necessary code to make
77
Here is an example that uses the OpenAPI [Petstore Example](https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.yaml):
88

99
```yaml
10-
Tools: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml
10+
Tools: https://petstore.gptscript-demos.ai/openapi
1111

12-
List all the pets. After you get a response, create a new pet named Mark. He is a lizard.
12+
List all the pets. What are the names of the dogs?
1313
```
1414

1515
You can also use a local file path instead of a URL.
@@ -22,6 +22,11 @@ If no HTTPS server exists, it will choose the first HTTP server. Other protocols
2222
GPTScript will also handle path- and operation-level server overrides, following the same logic of choosing the first HTTPS server it finds,
2323
or the first HTTP server if no HTTPS server exists in the array.
2424

25+
If no servers are defined in the definition, and the definition was downloaded from a URL, GPTScript will use the host
26+
in the URL as the server value. This is the case with the Petstore example above.
27+
28+
### Server Variables
29+
2530
Additionally, GPTScript can handle variables in the server name. For example, this:
2631

2732
```yaml

0 commit comments

Comments
 (0)