Skip to content

Commit 7ed1b30

Browse files
committed
docs update
1 parent 1954028 commit 7ed1b30

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

docs/astro.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from "astro/config";
21
import preact from "@astrojs/preact";
32
import react from "@astrojs/react";
43
import sitemap from "@astrojs/sitemap";
4+
import { defineConfig } from "astro/config";
55
import sassDts from "vite-plugin-sass-dts";
66

77
// https://astro.build/config
@@ -21,9 +21,15 @@ export default defineConfig({
2121
},
2222
},
2323
define: {
24-
"import.meta.env.VITE_ALGOLIA_APP_ID": JSON.stringify(process.env.ALGOLIA_APP_ID ?? ""),
25-
"import.meta.env.VITE_ALGOLIA_INDEX_NAME": JSON.stringify(process.env.ALGOLIA_INDEX_NAME ?? ""),
26-
"import.meta.env.VITE_ALGOLIA_SEARCH_KEY": JSON.stringify(process.env.ALGOLIA_SEARCH_KEY ?? ""),
24+
"import.meta.env.VITE_ALGOLIA_APP_ID": JSON.stringify(
25+
process.env.ALGOLIA_APP_ID ?? "",
26+
),
27+
"import.meta.env.VITE_ALGOLIA_INDEX_NAME": JSON.stringify(
28+
process.env.ALGOLIA_INDEX_NAME ?? "",
29+
),
30+
"import.meta.env.VITE_ALGOLIA_SEARCH_KEY": JSON.stringify(
31+
process.env.ALGOLIA_SEARCH_KEY ?? "",
32+
),
2733
},
2834
plugins: [sassDts()],
2935
},

docs/src/content/docs/openapi-fetch/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ client.get("/my-url", options);
3434
| `querySerializer` | QuerySerializer | (optional) Provide a [querySerializer](#queryserializer) |
3535
| `bodySerializer` | BodySerializer | (optional) Provide a [bodySerializer](#bodyserializer) |
3636
| `parseAs` | `"json"` \| `"text"` \| `"arrayBuffer"` \| `"blob"` \| `"stream"` | (optional) Parse the response using <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response#instance_methods" target="_blank" rel="noopener noreferrer">a built-in instance method</a> (default: `"json"`). `"stream"` skips parsing altogether and returns the raw stream. |
37+
| `fetch` | `fetch` | Fetch instance used for requests (default: fetch from `createClient`) |
3738
| (Fetch options) | | Any valid fetch option (`headers`, `mode`, `cache`, `signal`, …) (<a href="https://developer.mozilla.org/en-US/docs/Web/API/fetch#options" target="_blank" rel="noopener noreferrer">docs</a>) |
3839

3940
### querySerializer

docs/src/content/docs/openapi-fetch/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ openapi-fetch is simple vanilla JS that can be used in any project. But sometime
9090

9191
### Svelte / SvelteKit
9292

93-
<a href="https://kit.svelte.dev" target="_blank" rel="noopener noreferrer">SvelteKit</a>’s automatic type inference can easily pick up openapi-fetch’s types in both clientside fetching and <a href="https://kit.svelte.dev/docs/load#page-data" target="_blank" rel="noopener noreferrer">Page Data</a> fetching. And it doesn’t need any additional libraries to work.
93+
<a href="https://kit.svelte.dev" target="_blank" rel="noopener noreferrer">SvelteKit</a>’s automatic type inference can easily pick up openapi-fetch’s types in both clientside fetching and <a href="https://kit.svelte.dev/docs/load#page-data" target="_blank" rel="noopener noreferrer">Page Data</a> fetching. And it doesn’t need any additional libraries to work. SvelteKit also advises to use their <a href="https://kit.svelte.dev/docs/load#making-fetch-requests" target="_blank" rel="noopener noreferrer">custom fetch</a> in load functions - this can be achieved with <a href='/openapi-fetch/api#fetch-options'>fetch options</a>.
9494

9595
_Note: if you’re using Svelte without SvelteKit, the root example in `src/routes/+page.svelte` doesn’t use any SvelteKit features and is generally-applicable to any setup._
9696

0 commit comments

Comments
 (0)