Skip to content

Commit af6d336

Browse files
committed
feat: add advanced configuration section with detailed options in documentation
1 parent e734107 commit af6d336

File tree

2 files changed

+109
-2
lines changed

2 files changed

+109
-2
lines changed

src/routes/+layout.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import PackageIcon from '@lucide/svelte/icons/package';
99
import BookOpenIcon from '@lucide/svelte/icons/book-open';
1010
import HeartIcon from '@lucide/svelte/icons/heart';
11+
import RocketIcon from '@lucide/svelte/icons/rocket';
1112
1213
let { children } = $props();
1314
@@ -32,7 +33,7 @@
3233
href="/"
3334
class="flex items-center space-x-2 text-xl font-bold transition hover:opacity-80"
3435
>
35-
<span class="text-2xl">🚀</span>
36+
<RocketIcon class="h-6 w-6 text-indigo-600 dark:text-indigo-400" />
3637
<span class="hidden text-indigo-600 sm:inline dark:text-indigo-400">
3738
SvelteKit OpenAPI
3839
</span>
@@ -124,7 +125,7 @@
124125
<!-- About -->
125126
<div>
126127
<h3 class="mb-4 flex items-center gap-2 text-lg font-semibold">
127-
<span class="text-2xl">🚀</span>
128+
<RocketIcon class="h-6 w-6 text-indigo-600 dark:text-indigo-400" />
128129
SvelteKit OpenAPI
129130
</h3>
130131
<p class="text-sm text-gray-600 dark:text-gray-400">

src/routes/+page.svelte

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,112 @@ export async function GET({ url }) {
469469
<pre class="overflow-x-auto p-4"><code class="text-sm text-gray-100">{configExample}</code
470470
></pre>
471471
</div>
472+
473+
<!-- Advanced Configuration -->
474+
<div class="mt-12">
475+
<h3 class="mb-6 text-2xl font-bold text-gray-900 dark:text-white">
476+
Advanced Configuration
477+
</h3>
478+
<div
479+
class="overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-950"
480+
>
481+
<table class="w-full text-left text-sm">
482+
<thead class="bg-gray-50 text-gray-900 dark:bg-gray-900 dark:text-white">
483+
<tr>
484+
<th class="px-6 py-4 font-semibold">Option</th>
485+
<th class="px-6 py-4 font-semibold">Type</th>
486+
<th class="px-6 py-4 font-semibold">Description</th>
487+
<th class="px-6 py-4 font-semibold">Default</th>
488+
</tr>
489+
</thead>
490+
<tbody class="divide-y divide-gray-200 dark:divide-gray-800">
491+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
492+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">info</td>
493+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">OpenAPIV3.InfoObject</td>
494+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
495+
>OpenAPI info section (title, version, description)</td
496+
>
497+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
498+
</tr>
499+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
500+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">servers</td>
501+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">OpenAPIV3.ServerObject[]</td>
502+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
503+
>OpenAPI servers configuration</td
504+
>
505+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
506+
</tr>
507+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
508+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400"
509+
>baseSchemasPath</td
510+
>
511+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string</td>
512+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
513+
>Path to file containing shared schema definitions</td
514+
>
515+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
516+
</tr>
517+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
518+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">yamlFiles</td>
519+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string[]</td>
520+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
521+
>Additional YAML files to include</td
522+
>
523+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
524+
</tr>
525+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
526+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">prependPath</td
527+
>
528+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string</td>
529+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
530+
>Path prefix to prepend to all routes (e.g., '/api')</td
531+
>
532+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
533+
</tr>
534+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
535+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">include</td>
536+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string[]</td>
537+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300">Glob patterns to include</td>
538+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400"
539+
>['src/routes/**/+server.ts', 'src/routes/**/+page.server.ts']</td
540+
>
541+
</tr>
542+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
543+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">exclude</td>
544+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string[]</td>
545+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300">Glob patterns to exclude</td>
546+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
547+
</tr>
548+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
549+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400"
550+
>failOnErrors</td
551+
>
552+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">boolean</td>
553+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
554+
>Whether to fail on JSDoc parsing errors</td
555+
>
556+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">false</td>
557+
</tr>
558+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
559+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">outputPath</td>
560+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">string</td>
561+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
562+
>Output path for the spec file during build</td
563+
>
564+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">-</td>
565+
</tr>
566+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-900/50">
567+
<td class="px-6 py-4 font-mono text-indigo-600 dark:text-indigo-400">debounceMs</td>
568+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">number</td>
569+
<td class="px-6 py-4 text-gray-600 dark:text-gray-300"
570+
>Debounce delay in milliseconds for file watching</td
571+
>
572+
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">200</td>
573+
</tr>
574+
</tbody>
575+
</table>
576+
</div>
577+
</div>
472578
</div>
473579
</div>
474580
</section>

0 commit comments

Comments
 (0)