Repository: enzonotario/vitepress-openapi
Pull request #146 (2025-01-01 23:31:57)

refactors

# Description

Some refactors.

## Related issues/external references

## Types of changes

- Refactor

vercel[bot]: [vc]: #UZGKuauLkkh8Mm1/ncSrqWxNH1YYhZcsCFxYTNpi/qQ=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ2aXRlcHJlc3Mtb3BlbmFwaSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9lbnpvLW5vdGFyaW9zLXByb2plY3RzL3ZpdGVwcmVzcy1vcGVuYXBpL0JpZDlQRmI3cFBTZFJySDZiV1N2WEV6b0dkWHEiLCJwcmV2aWV3VXJsIjoidml0ZXByZXNzLW9wZW5hcGktZ2l0LWZlYXR1cmUtcmVmYWN0b3JzLWVuem8tbm90YXJpb3MtcHJvamVjdHMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJQRU5ESU5HIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InZpdGVwcmVzcy1vcGVuYXBpLWdpdC1mZWF0dXJlLXJlZmFjdG9ycy1lbnpvLW5vdGFyaW9zLXByb2plY3RzLnZlcmNlbC5hcHAifX1dfQ==
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **vitepress-openapi** | 🔄 Building ([Inspect](https://vercel.com/enzo-notarios-projects/vitepress-openapi/Bid9PFb7pPSdRrH6bWSvXEzoGdXq)) | [Visit Preview](https://vitepress-openapi-git-feature-refactors-enzo-notarios-projects.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/vitepress-openapi-git-feature-refactors-enzo-notarios-projects.vercel.app?via=pr-comment-feedback-link) | Jan 1, 2025 11:32pm |


coderabbitai[bot]: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->

> [!NOTE]
> Currently processing new changes in this PR. This may take a few minutes, please wait...
> 
> <details>
> <summary>📥 Commits</summary>
> 
> Reviewing files that changed from the base of the PR and between 8a35fb9c29450b66b999f4514350781befecc424 and d3f7fcaa4cd5c59628c966bc795fcbee8012d5d3.
> 
> </details>
> 
> <details>
> <summary>📒 Files selected for processing (25)</summary>
> 
> * `docs/sandbox/index.md` (1 hunks)
> * `src/components/Parameter/OAParameterExamples.vue` (2 hunks)
> * `src/components/Playground/OAPlaygroundParameterInput.vue` (2 hunks)
> * `src/components/Playground/OAPlaygroundParameters.vue` (2 hunks)
> * `src/composables/usePaths.ts` (1 hunks)
> * `src/composables/useSidebar.ts` (1 hunks)
> * `src/lib/codeSamples/buildRequest.ts` (2 hunks)
> * `src/lib/codeSamples/generateCodeSampleCurl.ts` (1 hunks)
> * `src/lib/codeSamples/generateCodeSamplePhp.ts` (2 hunks)
> * `src/lib/codeSamples/request.ts` (1 hunks)
> * `src/lib/createOpenApiInstance.ts` (1 hunks)
> * `src/lib/fetchToCurl.ts` (0 hunks)
> * `src/lib/getPropertyExample.ts` (1 hunks)
> * `src/lib/getPropertyExamples.ts` (1 hunks)
> * `src/lib/getSchemaUi.ts` (4 hunks)
> * `src/lib/getSchemaUiJson.ts` (5 hunks)
> * `src/lib/prepareOpenAPI/generateMissingSummary.ts` (1 hunks)
> * `src/lib/prepareOpenAPI/generateMissingTags.ts` (1 hunks)
> * `test/lib/fetchToCurl.test.ts` (0 hunks)
> * `test/lib/generateCodeSamples.test.ts` (1 hunks)
> * `test/lib/getPropertyExample.test.ts` (1 hunks)
> * `test/lib/getPropertyExamples.test.ts` (1 hunks)
> * `test/lib/prepareOpenAPI/generateMissingOperationIds.test.ts` (1 hunks)
> * `test/lib/prepareOpenAPI/generateMissingSummary.test.ts` (1 hunks)
> * `test/lib/prepareOpenAPI/generateMissingTags.test.ts` (1 hunks)
> 
> </details>
> 
> ```ascii
>  ______________________________________________________________________________________________________________________________________________________________________________________________________________
> < Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. - Alan Kay >
>  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>   \
>    \   \
>         \ /\
>         ( )
>       .( o ).
> ```

<!-- end of auto-generated comment: review in progress by coderabbit.ai -->

<!-- tips_start -->

---

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR. ([Beta](https://docs.coderabbit.ai/early-access#beta))
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
pkg-pr-new[bot]: 
[Open in Stackblitz](https://pkg.pr.new/template/ffa8a207-dd1d-4c54-8abb-b22fdbbde0f3)


```
npm i https://pkg.pr.new/vitepress-openapi@146
```


_commit: <a href="https://github.com/enzonotario/vitepress-openapi/runs/35050322727"><code>d3f7fca</code></a>_


Patch:
diff --git a/docs/sandbox/index.md b/docs/sandbox/index.md
index 3065266..cda3b43 100644
--- a/docs/sandbox/index.md
+++ b/docs/sandbox/index.md
@@ -1,5 +1,5 @@
 ---
-title: VitePress OpenAPI Sandbox
+title: Sandbox
 layout: false
 ---
 
diff --git a/src/components/Parameter/OAParameterExamples.vue b/src/components/Parameter/OAParameterExamples.vue
index dc2f3cb..6704b48 100644
--- a/src/components/Parameter/OAParameterExamples.vue
+++ b/src/components/Parameter/OAParameterExamples.vue
@@ -1,6 +1,6 @@
 <script setup>
 import OACodeValue from '../Common/OACodeValue.vue'
-import { getExamples } from '../../lib/getExamples'
+import { getPropertyExamples } from '../../lib/getPropertyExamples'
 import { useTheme } from '../../composables/useTheme'
 import OAParameterAttribute from './OAParameterAttribute.vue'
 
@@ -11,7 +11,7 @@ const props = defineProps({
   },
 })
 
-const examples = getExamples(props.property)
+const examples = getPropertyExamples(props.property)
 
 const wrapExamples = useTheme().getWrapExamples()
 </script>
diff --git a/src/components/Playground/OAPlaygroundParameterInput.vue b/src/components/Playground/OAPlaygroundParameterInput.vue
index bcc1c16..e73df77 100644
--- a/src/components/Playground/OAPlaygroundParameterInput.vue
+++ b/src/components/Playground/OAPlaygroundParameterInput.vue
@@ -2,7 +2,7 @@
 import { defineEmits, defineProps, onMounted } from 'vue'
 import { Input } from '../ui/input'
 import { Checkbox } from '../ui/checkbox'
-import { getExample } from '../../lib/getExample'
+import { getPropertyExample } from '../../lib/getPropertyExample'
 import {
   Select,
   SelectContent,
@@ -39,11 +39,11 @@ function inputType(parameter: any) {
 
 onMounted(() => {
   if (props.parameter.schema?.enum) {
-    emits('update:modelValue', getExample(props.parameter) ?? props.parameter.schema.enum[0])
+    emits('update:modelValue', getPropertyExample(props.parameter) ?? props.parameter.schema.enum[0])
   }
 })
 
-const parameterExample = getExample(props.parameter)
+const parameterExample = getPropertyExample(props.parameter)
 </script>
 
 <template>
diff --git a/src/components/Playground/OAPlaygroundParameters.vue b/src/components/Playground/OAPlaygroundParameters.vue
index 0ef010e..a6904a7 100644
--- a/src/components/Playground/OAPlaygroundParameters.vue
+++ b/src/components/Playground/OAPlaygroundParameters.vue
@@ -8,7 +8,7 @@ import type { PlaygroundSecurityScheme, SecurityUiItem } from '../../types'
 import OAJSONEditor from '../Common/OAJSONEditor.vue'
 import OAPlaygroundParameterInput from '../Playground/OAPlaygroundParameterInput.vue'
 import OAPlaygroundSecurityInput from '../Playground/OAPlaygroundSecurityInput.vue'
-import { getExample } from '../../lib/getExample'
+import { getPropertyExample } from '../../lib/getPropertyExample'
 import { buildRequest } from '../../lib/codeSamples/buildRequest'
 import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '../ui/select'
 import type { OperationData } from '../../lib/operationData'
@@ -75,7 +75,7 @@ function initializeVariables(parameters: OpenAPIV3.ParameterObject[]) {
         return acc
       }
 
-      acc[parameter.name] = getExample(parameter) ?? ''
+      acc[parameter.name] = getPropertyExample(parameter) ?? ''
       return acc
     }, {})
 }
diff --git a/src/composables/usePaths.ts b/src/composables/usePaths.ts
index be98245..db2c300 100644
--- a/src/composables/usePaths.ts
+++ b/src/composables/usePaths.ts
@@ -1,6 +1,6 @@
 import type { OpenAPI } from '@scalar/openapi-types'
 import { OpenApi } from '../lib/OpenApi'
-import { prepareOpenAPI } from '../lib/prepareOpenAPI'
+import { prepareOpenAPI } from '../lib/prepareOpenAPI/prepareOpenAPI'
 
 export function usePaths({
   spec,
diff --git a/src/composables/useSidebar.ts b/src/composables/useSidebar.ts
index 92face9..9b32772 100644
--- a/src/composables/useSidebar.ts
+++ b/src/composables/useSidebar.ts
@@ -2,7 +2,7 @@ import type { OpenAPI, OpenAPIV3 } from '@scalar/openapi-types'
 import type { DefaultTheme } from 'vitepress'
 import { OpenApi } from '../lib/OpenApi'
 import { httpVerbs } from '../index'
-import { prepareOpenAPI } from '../lib/prepareOpenAPI'
+import { prepareOpenAPI } from '../lib/prepareOpenAPI/prepareOpenAPI'
 import { generateSidebarItemsByPaths } from '../lib/sidebar/generateSidebarItemsByPaths'
 import { cleanSidebarItems } from '../lib/sidebar/cleanSidebarItems'
 import { useOpenapi } from './useOpenapi'
diff --git a/src/lib/codeSamples/buildRequest.ts b/src/lib/codeSamples/buildRequest.ts
index 724292b..a5909c8 100644
--- a/src/lib/codeSamples/buildRequest.ts
+++ b/src/lib/codeSamples/buildRequest.ts
@@ -1,6 +1,6 @@
 import type { OpenAPIV3 } from '@scalar/openapi-types'
 import { unref } from 'vue'
-import { getExample } from '../getExample'
+import { getPropertyExample } from '../getPropertyExample'
 import type { PlaygroundSecurityScheme } from '../../types'
 import { OARequest } from './request'
 
@@ -83,7 +83,7 @@ function setExamplesAsVariables(parameters: OpenAPIV3.ParameterObject[], variabl
       return
     }
 
-    const example = getExample(parameter)
+    const example = getPropertyExample(parameter)
     if (example != null) {
       variables[parameter.name] = example
     }
diff --git a/src/lib/codeSamples/generateCodeSampleCurl.ts b/src/lib/codeSamples/generateCodeSampleCurl.ts
index 93cf7a5..d15f4ce 100644
--- a/src/lib/codeSamples/generateCodeSampleCurl.ts
+++ b/src/lib/codeSamples/generateCodeSampleCurl.ts
@@ -1,12 +1,134 @@
-import fetchToCurl from '../fetchToCurl'
 import type { OARequest } from './request'
 
 export function generateCodeSampleCurl(request: OARequest) {
-  return fetchToCurl({
-    method: request.method.toUpperCase(),
-    url: request.url,
-    headers: request.headers,
-    body: request.body ? JSON.stringify(request.body, null, 2) : undefined,
-    query: request.query,
-  })
+  const headersArgument = generateHeadersArgument(request.headers)
+
+  let output = `curl ${generateMethodArgument(request.method)}'${request.url}${Object.keys(request.query ?? {}).length ? `?${new URLSearchParams(request.query).toString()}` : ''}'`
+
+  if (headersArgument.params) {
+    output += ` \\\n${headersArgument.params}`
+  }
+
+  if (request.body) {
+    output += ` \\\n${generateBody(JSON.stringify(request.body, null, 2))}`
+  }
+
+  if (headersArgument.isEncode) {
+    output += ` \\\n${generateCompress(headersArgument.isEncode)}`
+  }
+
+  return output.trim()
+}
+
+/**
+ * Based on [fetch-to-curl](https://github.com/leoek/fetch-to-curl]
+ * @author [leoek](https://github.com/leoek)
+ * @author [enzonotario](https://github.com/enzonotario)
+ */
+
+interface HeaderParams {
+  isEncode: boolean
+  params: string
+}
+
+function removeLastBackslash(str: string): string {
+  return str.replace(/ \\$/, '')
+}
+
+function generateMethodArgument(method: string): string {
+  if (!method) {
+    return ''
+  }
+
+  const type: { [key: string]: string } = {
+    GET: '-X GET \\\n',
+    POST: '-X POST \\\n',
+    PUT: '-X PUT \\\n',
+    PATCH: '-X PATCH \\\n',
+    DELETE: '-X DELETE \\\n',
+    HEAD: '-X HEAD \\\n',
+    OPTIONS: '-X OPTIONS\\\n ',
+  }
+
+  return type[method.toUpperCase()] || ''
+}
+
+function isInstanceOfHeaders(val: any): boolean {
+  if (typeof Headers !== 'function') {
+    /**
+     * Environment does not support the Headers constructor
+     * old internet explorer?
+     */
+    return false
+  }
+  return val instanceof Headers
+}
+
+function getHeaderString(name: string, val: any): string {
+  return ` -H "${name}: ${`${val}`.replace(/(\\|")/g, '\\$1')}"`
+}
+
+function generateHeadersArgument(headers?: any): HeaderParams {
+  if (!headers || Object.keys(headers).length === 0) {
+    return {
+      params: '',
+      isEncode: false,
+    }
+  }
+
+  let isEncode = false
+  let headerParam = ''
+  if (isInstanceOfHeaders(headers)) {
+    headers.forEach((val: any, name: string) => {
+      if (name.toLocaleLowerCase() !== 'content-length') {
+        headerParam += `${getHeaderString(name, val)} \\\n`
+      }
+      if (name.toLocaleLowerCase() === 'accept-encoding') {
+        isEncode = true
+      }
+    })
+  } else if (headers) {
+    Object.keys(headers).forEach((name) => {
+      if (name.toLocaleLowerCase() !== 'content-length') {
+        headerParam += `${getHeaderString(name, headers[name])} \\\n`
+      }
+      if (name.toLocaleLowerCase() === 'accept-encoding') {
+        isEncode = true
+      }
+    })
+  }
+
+  headerParam = headerParam.trim()
+
+  headerParam = removeLastBackslash(headerParam)
+
+  headerParam = ` ${headerParam}`
+
+  return {
+    params: headerParam,
+    isEncode,
+  }
+}
+
+function escapeBody(body: any): string {
+  if (typeof body !== 'string') {
+    return body
+  }
+  return body.replace(/'/g, `'\\''`)
+}
+
+function generateBody(body: any): string {
+  if (!body) {
+    return ''
+  }
+
+  if (typeof body === 'object') {
+    return ` --data '${escapeBody(JSON.stringify(body))}'`
+  }
+
+  return ` --data '${escapeBody(body)}'`
+}
+
+function generateCompress(isEncode: boolean): string {
+  return isEncode ? ' --compressed' : ''
 }
diff --git a/src/lib/codeSamples/generateCodeSamplePhp.ts b/src/lib/codeSamples/generateCodeSamplePhp.ts
index 42ab408..f79018e 100644
--- a/src/lib/codeSamples/generateCodeSamplePhp.ts
+++ b/src/lib/codeSamples/generateCodeSamplePhp.ts
@@ -7,7 +7,7 @@ export function generateCodeSamplePhp({ url, method, headers, body, query }: OAR
 
   phpCode += `$method = '${method}';\n`
 
-  if (Object.keys(headers).length > 0) {
+  if (headers && Object.keys(headers).length > 0) {
     phpCode += `$headers = [\n`
     for (const [key, value] of Object.entries(headers)) {
       phpCode += `    '${key}' => '${value}',\n`
@@ -15,7 +15,7 @@ export function generateCodeSamplePhp({ url, method, headers, body, query }: OAR
     phpCode += `];\n`
   }
 
-  if (Object.keys(query).length > 0) {
+  if (query && Object.keys(query).length > 0) {
     phpCode += `$query = http_build_query([\n`
     for (const [key, value] of Object.entries(query)) {
       phpCode += `    '${key}' => '${value}',\n`
@@ -28,11 +28,11 @@ export function generateCodeSamplePhp({ url, method, headers, body, query }: OAR
   }
 
   phpCode += `\n$ch = curl_init();\n`
-  phpCode += `curl_setopt($ch, CURLOPT_URL, $url${Object.keys(query).length ? ` . '?' . $query` : ''});\n`
+  phpCode += `curl_setopt($ch, CURLOPT_URL, $url${Object.keys(query ?? {}).length ? ` . '?' . $query` : ''});\n`
   phpCode += `curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n`
   phpCode += `curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n`
 
-  if (Object.keys(headers).length > 0) {
+  if (headers && Object.keys(headers).length > 0) {
     phpCode += `curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n`
   }
 
diff --git a/src/lib/codeSamples/request.ts b/src/lib/codeSamples/request.ts
index afbe3b3..6c55325 100644
--- a/src/lib/codeSamples/request.ts
+++ b/src/lib/codeSamples/request.ts
@@ -10,8 +10,16 @@ export class OARequest {
   constructor(
     public url: string = '',
     public method: string = 'GET',
-    public headers: Record<string, string> = {},
-    public body: any = null,
-    public query: Record<string, string> = {},
-  ) {}
+    public headers?: Record<string, string>,
+    public body?: any,
+    public query?: Record<string, string>,
+  ) {
+    if (!headers) {
+      this.headers = {}
+    }
+
+    if (!query) {
+      this.query = {}
+    }
+  }
 }
diff --git a/src/lib/createOpenApiInstance.ts b/src/lib/createOpenApiInstance.ts
index 3730484..b907570 100644
--- a/src/lib/createOpenApiInstance.ts
+++ b/src/lib/createOpenApiInstance.ts
@@ -1,6 +1,6 @@
 import type { OpenAPI } from '@scalar/openapi-types'
 import { processOpenAPI } from './processOpenAPI'
-import { prepareOpenAPI } from './prepareOpenAPI'
+import { prepareOpenAPI } from './prepareOpenAPI/prepareOpenAPI'
 import { OpenApi } from './OpenApi'
 
 export function createOpenApiInstance({
diff --git a/src/lib/fetchToCurl.ts b/src/lib/fetchToCurl.ts
deleted file mode 100644
index 1e8d363..0000000
--- a/src/lib/fetchToCurl.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * Based on [fetch-to-curl](https://github.com/leoek/fetch-to-curl]
- * @author [leoek](https://github.com/leoek)
- * @author [enzonotario](https://github.com/enzonotario)
- */
-
-function removeLastBackslash(str: string): string {
-  return str.replace(/ \\$/, '')
-}
-
-export const generateMethodArgument = (method: string): string => {
-  if (!method) {
-    return ''
-  }
-
-  const type: { [key: string]: string } = {
-    GET: '-X GET \\\n',
-    POST: '-X POST \\\n',
-    PUT: '-X PUT \\\n',
-    PATCH: '-X PATCH \\\n',
-    DELETE: '-X DELETE \\\n',
-    HEAD: '-X HEAD \\\n',
-    OPTIONS: '-X OPTIONS\\\n ',
-  }
-
-  return type[method.toUpperCase()] || ''
-}
-
-export const isInstanceOfHeaders = (val: any): boolean => {
-  if (typeof Headers !== 'function') {
-    /**
-     * Environment does not support the Headers constructor
-     * old internet explorer?
-     */
-    return false
-  }
-  return val instanceof Headers
-}
-
-interface HeaderParams {
-  isEncode: boolean
-  params: string
-}
-
-const getHeaderString = (name: string, val: any): string => ` -H "${name}: ${`${val}`.replace(/(\\|")/g, '\\$1')}"`
-
-export const generateHeadersArgument = (headers?: any): HeaderParams => {
-  if (!headers || Object.keys(headers).length === 0) {
-    return {
-      params: '',
-      isEncode: false,
-    }
-  }
-
-  let isEncode = false
-  let headerParam = ''
-  if (isInstanceOfHeaders(headers)) {
-    headers.forEach((val: any, name: string) => {
-      if (name.toLocaleLowerCase() !== 'content-length') {
-        headerParam += `${getHeaderString(name, val)} \\\n`
-      }
-      if (name.toLocaleLowerCase() === 'accept-encoding') {
-        isEncode = true
-      }
-    })
-  } else if (headers) {
-    Object.keys(headers).forEach((name) => {
-      if (name.toLocaleLowerCase() !== 'content-length') {
-        headerParam += `${getHeaderString(name, headers[name])} \\\n`
-      }
-      if (name.toLocaleLowerCase() === 'accept-encoding') {
-        isEncode = true
-      }
-    })
-  }
-
-  headerParam = headerParam.trim()
-
-  headerParam = removeLastBackslash(headerParam)
-
-  headerParam = ` ${headerParam}`
-
-  return {
-    params: headerParam,
-    isEncode,
-  }
-}
-
-export function escapeBody(body: any): string {
-  if (typeof body !== 'string') {
-    return body
-  }
-  return body.replace(/'/g, `'\\''`)
-}
-
-export function generateBody(body: any): string {
-  if (!body) {
-    return ''
-  }
-
-  if (typeof body === 'object') {
-    return ` --data '${escapeBody(JSON.stringify(body))}'`
-  }
-
-  return ` --data '${escapeBody(body)}'`
-}
-
-export function generateCompress(isEncode: boolean): string {
-  return isEncode ? ' --compressed' : ''
-}
-
-export const fetchToCurl = ({
-  url,
-  method,
-  headers,
-  body,
-  query,
-}: { url: string, method: string, headers: any, body: any, query: any }): string => {
-  const headersArgument = generateHeadersArgument(headers)
-
-  let output = `curl ${generateMethodArgument(method)}'${url}${Object.keys(query ?? {}).length ? `?${new URLSearchParams(query).toString()}` : ''}'`
-
-  if (headersArgument.params) {
-    output += ` \\\n${headersArgument.params}`
-  }
-
-  if (body) {
-    output += ` \\\n${generateBody(body)}`
-  }
-
-  if (headersArgument.isEncode) {
-    output += ` \\\n${generateCompress(headersArgument.isEncode)}`
-  }
-
-  return output.trim()
-}
-
-export default fetchToCurl
diff --git a/src/lib/getExample.ts b/src/lib/getPropertyExample.ts
similarity index 92%
rename from src/lib/getExample.ts
rename to src/lib/getPropertyExample.ts
index f5c9023..f57dd68 100644
--- a/src/lib/getExample.ts
+++ b/src/lib/getPropertyExample.ts
@@ -1,4 +1,4 @@
-export function getExample(property: any): any {
+export function getPropertyExample(property: any): any {
   if (property?.example !== undefined) {
     return property.example
   }
diff --git a/src/lib/getExamples.ts b/src/lib/getPropertyExamples.ts
similarity index 89%
rename from src/lib/getExamples.ts
rename to src/lib/getPropertyExamples.ts
index 91f3375..b372a8c 100644
--- a/src/lib/getExamples.ts
+++ b/src/lib/getPropertyExamples.ts
@@ -1,4 +1,4 @@
-export function getExamples(property: any): any {
+export function getPropertyExamples(property: any): any {
   if (property?.examples !== undefined) {
     return property.examples
   }
diff --git a/src/lib/getSchemaUi.ts b/src/lib/getSchemaUi.ts
index ab25bfa..e48c6bf 100644
--- a/src/lib/getSchemaUi.ts
+++ b/src/lib/getSchemaUi.ts
@@ -1,6 +1,6 @@
 import type { OpenAPI } from '@scalar/openapi-types'
 import { literalTypes } from '../index'
-import { getExamples } from './getExamples'
+import { getPropertyExamples } from './getPropertyExamples'
 import { resolveCircularRef } from './resolveCircularRef'
 import { getConstraints, hasConstraints } from './constraintsParser'
 
@@ -48,6 +48,8 @@ class UiPropertyFactory {
       ? property.type
       : [property.type || 'string'] as JSONSchemaType[]
 
+    const examples = getPropertyExamples(property)
+
     const baseProperty: OAProperty = {
       name,
       types: nodeTypes,
@@ -56,7 +58,7 @@ class UiPropertyFactory {
       ...(property.description && { description: property.description }),
       ...(property.default !== undefined && { defaultValue: property.default }),
       ...(property.externalDocs && { docs: property.externalDocs }),
-      ...(getExamples(property) && { examples: getExamples(property) }),
+      ...(examples && { examples }),
       ...(property.nullable && { nullable: property.nullable }),
     }
 
@@ -125,7 +127,7 @@ class UiPropertyFactory {
     }
 
     if (schema.const !== undefined) {
-      const example = getExamples(schema) || schema.const
+      const example = getPropertyExamples(schema) || schema.const
       return {
         name,
         types: [schema.type as JSONSchemaType || 'string'],
@@ -163,8 +165,9 @@ class UiPropertyFactory {
             property.subtype = schemaType as JSONSchemaType
           }
 
-          if (getExamples(schema.items)) {
-            property.subexamples = getExamples(schema.items)
+          const itemsExamples = getPropertyExamples(schema.items)
+          if (itemsExamples) {
+            property.subexamples = itemsExamples
           }
 
           if (schema.items.const !== undefined) {
diff --git a/src/lib/getSchemaUiJson.ts b/src/lib/getSchemaUiJson.ts
index cba3472..9eaf0e6 100644
--- a/src/lib/getSchemaUiJson.ts
+++ b/src/lib/getSchemaUiJson.ts
@@ -1,5 +1,5 @@
 import { literalTypes } from '../index'
-import { getExample } from './getExample'
+import { getPropertyExample } from './getPropertyExample'
 import type { OAProperty } from './getSchemaUi'
 
 export function getSchemaUiJson(uiProperties: OAProperty[] | OAProperty, useExample = false): any {
@@ -58,7 +58,7 @@ function uiPropertyArrayToJson(property: OAProperty, useExample: boolean): any {
       return [uiPropertyObjectToJson(property.properties as OAProperty[], useExample)]
     }
 
-    return useExample ? [getExample(property) ?? getDefaultValueForType(property.subtype)] : [getDefaultValueForType(property.subtype)]
+    return useExample ? [getPropertyExample(property) ?? getDefaultValueForType(property.subtype)] : [getDefaultValueForType(property.subtype)]
   }
 
   return []
@@ -77,7 +77,7 @@ function uiPropertyObjectToJson(properties: OAProperty[], useExample: boolean):
 
 function uiPropertyLiteralToJson(property: OAProperty, useExample: boolean): any {
   if (useExample) {
-    const example = getExample(property)
+    const example = getPropertyExample(property)
     if (example != null) {
       return example
     }
@@ -90,7 +90,7 @@ function uiPropertyLiteralToJson(property: OAProperty, useExample: boolean): any
  * Constants always have an example (the constant), so `useExample` does not apply here.
  */
 function uiPropertyConstantToJson(property: OAProperty): any {
-  const example = getExample(property)
+  const example = getPropertyExample(property)
 
   if (example != null) {
     return example
@@ -141,6 +141,6 @@ function resolveOneOfProperty(property: OAProperty, useExample: boolean): any {
   if (property.properties && property.properties.length > 0) {
     return uiPropertyToJson(property.properties[0], useExample)
   } else {
-    return useExample ? getExample(property) : getDefaultValueForType(property.types[0] ?? 'string')
+    return useExample ? getPropertyExample(property) : getDefaultValueForType(property.types[0] ?? 'string')
   }
 }
diff --git a/src/lib/generateMissingOperationIds.ts b/src/lib/prepareOpenAPI/generateMissingOperationIds.ts
similarity index 100%
rename from src/lib/generateMissingOperationIds.ts
rename to src/lib/prepareOpenAPI/generateMissingOperationIds.ts
diff --git a/src/lib/generateMissingSummary.ts b/src/lib/prepareOpenAPI/generateMissingSummary.ts
similarity index 91%
rename from src/lib/generateMissingSummary.ts
rename to src/lib/prepareOpenAPI/generateMissingSummary.ts
index b59e0b8..0d143dd 100644
--- a/src/lib/generateMissingSummary.ts
+++ b/src/lib/prepareOpenAPI/generateMissingSummary.ts
@@ -1,5 +1,5 @@
 import type { OpenAPI, OpenAPIV3 } from '@scalar/openapi-types'
-import type { OperationObject } from '../types.js'
+import type { OperationObject } from '../../types'
 
 export function generateMissingSummary(spec: OpenAPI.Document): OpenAPI.Document {
   spec.paths = spec.paths || {}
diff --git a/src/lib/generateMissingTags.ts b/src/lib/prepareOpenAPI/generateMissingTags.ts
similarity index 94%
rename from src/lib/generateMissingTags.ts
rename to src/lib/prepareOpenAPI/generateMissingTags.ts
index fb75288..be35882 100644
--- a/src/lib/generateMissingTags.ts
+++ b/src/lib/prepareOpenAPI/generateMissingTags.ts
@@ -1,5 +1,5 @@
 import type { OpenAPI, OpenAPIV3 } from '@scalar/openapi-types'
-import { useTheme } from '../composables/useTheme'
+import { useTheme } from '../../composables/useTheme'
 
 export function generateMissingTags(spec: OpenAPI.Document): OpenAPI.Document {
   const defaultTag = useTheme().getSpecConfig()?.defaultTag || 'Default'


Test patch:
diff --git a/src/lib/prepareOpenAPI.ts b/src/lib/prepareOpenAPI/prepareOpenAPI.ts
similarity index 100%
rename from src/lib/prepareOpenAPI.ts
rename to src/lib/prepareOpenAPI/prepareOpenAPI.ts
diff --git a/test/lib/fetchToCurl.test.ts b/test/lib/fetchToCurl.test.ts
deleted file mode 100644
index a656963..0000000
--- a/test/lib/fetchToCurl.test.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { describe, expect, it } from 'vitest'
-import { fetchToCurl } from '../../src/lib/fetchToCurl'
-
-describe('fetchToCurl', () => {
-  it('converts a simple GET request to curl', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'GET'
-    const result = fetchToCurl({ url, method, headers: {} })
-    expect(result).toBe(`curl -X GET \\\n'${url}'`)
-  })
-
-  it('converts a POST request with body to curl', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'POST'
-    const body = { key: 'value', nested: { key: 'value' } }
-    const result = fetchToCurl({ url, method, body })
-    expect(result).toBe(`curl -X POST \\\n'${url}' \\
- --data '{"key":"value","nested":{"key":"value"}}'`)
-  })
-
-  it('handles body and multiple headers correctly', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'POST'
-    const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' }
-    const body = { key: 'value', nested: { key: 'value' } }
-    const result = fetchToCurl({ url, method, headers, body })
-    expect(result).toBe(`curl -X POST \\\n'${url}' \\
- -H "Content-Type: application/json" \\
- -H "Authorization: Bearer token" \\
- --data '{"key":"value","nested":{"key":"value"}}'`)
-  })
-
-  it('handles headers correctly', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'GET'
-    const headers = { 'Content-Type': 'application/json' }
-    const result = fetchToCurl({ url, method, headers })
-    expect(result).toBe(`curl -X GET \\\n'${url}' \\
- -H "Content-Type: application/json"`)
-  })
-
-  it('handles multiple headers correctly', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'GET'
-    const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' }
-    const result = fetchToCurl({ url, method, headers })
-    expect(result).toBe(`curl -X GET \\\n'${url}' \\
- -H "Content-Type: application/json" \\
- -H "Authorization: Bearer token"`)
-  })
-
-  it('handles empty URL gracefully', () => {
-    const url = ''
-    const method = 'GET'
-    const result = fetchToCurl({ url, method })
-    expect(result).toBe(`curl -X GET \\\n''`)
-  })
-
-  it('handles undefined method gracefully', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const result = fetchToCurl({ url })
-    expect(result).toBe(`curl '${url}'`)
-  })
-
-  it('handles undefined headers gracefully', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'GET'
-    const result = fetchToCurl({ url, method })
-    expect(result).toBe(`curl -X GET \\\n'${url}'`)
-  })
-
-  it('handles undefined body gracefully', () => {
-    const url = 'https://api.example.com/path/testOperation'
-    const method = 'POST'
-    const result = fetchToCurl({ url, method })
-    expect(result).toBe(`curl -X POST \\\n'${url}'`)
-  })
-
-  it('handles URL object correctly', () => {
-    const url = new URL('https://api.example.com/path/testOperation')
-    const method = 'GET'
-    const result = fetchToCurl({ url, method })
-    expect(result).toBe(`curl -X GET \\\n'https://api.example.com/path/testOperation'`)
-  })
-})
diff --git a/test/lib/generateCodeSamples.test.ts b/test/lib/generateCodeSamples.test.ts
index 9006bc8..ea4f5c9 100644
--- a/test/lib/generateCodeSamples.test.ts
+++ b/test/lib/generateCodeSamples.test.ts
@@ -117,6 +117,18 @@ describe('generateCodeSampleCurl', () => {
   "key": "value"
 }'`)
   })
+
+  it('handles query parameters and headers correctly', () => {
+    const url = 'https://api.example.com/path/testOperation'
+    const method = 'GET'
+    const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' }
+    const queryParams: Record<string, string> = { search: 'query', page: '2' }
+    const result = generateCodeSampleCurl({ url, method, headers, query: queryParams })
+    expect(result).toBe(`curl -X GET \\
+'https://api.example.com/path/testOperation?search=query&page=2' \\
+ -H "Content-Type: application/json" \\
+ -H "Authorization: Bearer token"`)
+  })
 })
 
 describe('generateCodeSamplePhp', () => {
diff --git a/test/lib/getExample.test.ts b/test/lib/getPropertyExample.test.ts
similarity index 69%
rename from test/lib/getExample.test.ts
rename to test/lib/getPropertyExample.test.ts
index 8d6e174..095aecb 100644
--- a/test/lib/getExample.test.ts
+++ b/test/lib/getPropertyExample.test.ts
@@ -1,54 +1,54 @@
 import { describe, expect, it } from 'vitest'
-import { getExample } from '../../src/lib/getExample'
+import { getPropertyExample } from '../../src/lib/getPropertyExample'
 
-describe('getExample', () => {
+describe('getPropertyExample', () => {
   it('returns the example property if it exists', () => {
     const property = { example: 'exampleValue' }
-    expect(getExample(property)).toBe('exampleValue')
+    expect(getPropertyExample(property)).toBe('exampleValue')
   })
 
   it('returns the first example from examples array if example property does not exist', () => {
     const property = { examples: ['example1', 'example2'] }
-    expect(getExample(property)).toBe('example1')
+    expect(getPropertyExample(property)).toBe('example1')
   })
 
   it('returns the schema example if example and examples properties do not exist', () => {
     const property = { schema: { example: 'schemaExample' } }
-    expect(getExample(property)).toBe('schemaExample')
+    expect(getPropertyExample(property)).toBe('schemaExample')
   })
 
   it('returns the first example from schema examples array if example and examples properties do not exist', () => {
     const property = { schema: { examples: ['schemaExample1', 'schemaExample2'] } }
-    expect(getExample(property)).toBe('schemaExample1')
+    expect(getPropertyExample(property)).toBe('schemaExample1')
   })
 
   it('returns the subexample property if example, examples, and schema properties do not exist', () => {
     const property = { subexample: 'subexampleValue' }
-    expect(getExample(property)).toBe('subexampleValue')
+    expect(getPropertyExample(property)).toBe('subexampleValue')
   })
 
   it('returns the first subexample from subexamples array if example, examples, and schema properties do not exist', () => {
     const property = { subexamples: ['subexample1', 'subexample2'] }
-    expect(getExample(property)).toBe('subexample1')
+    expect(getPropertyExample(property)).toBe('subexample1')
   })
 
   it('returns null if no example, examples, schema, or subexample properties exist', () => {
     const property = {}
-    expect(getExample(property)).toBeNull()
+    expect(getPropertyExample(property)).toBeNull()
   })
 
   it('returns an empty string if example property is an empty string', () => {
     const property = { example: '' }
-    expect(getExample(property)).toBe('')
+    expect(getPropertyExample(property)).toBe('')
   })
 
   it('returns an empty string if schema.example property is an empty string', () => {
     const property = { schema: { example: '' } }
-    expect(getExample(property)).toBe('')
+    expect(getPropertyExample(property)).toBe('')
   })
 
   it('returns an empty string for subexample property if it is an empty string', () => {
     const property = { subexample: '' }
-    expect(getExample(property)).toBe('')
+    expect(getPropertyExample(property)).toBe('')
   })
 })
diff --git a/test/lib/getExamples.test.ts b/test/lib/getPropertyExamples.test.ts
similarity index 61%
rename from test/lib/getExamples.test.ts
rename to test/lib/getPropertyExamples.test.ts
index 16e3f03..1cbe965 100644
--- a/test/lib/getExamples.test.ts
+++ b/test/lib/getPropertyExamples.test.ts
@@ -1,29 +1,29 @@
 import { describe, expect, it } from 'vitest'
-import { getExamples } from '../../src/lib/getExamples'
+import { getPropertyExamples } from '../../src/lib/getPropertyExamples'
 
-describe('getExamples', () => {
+describe('getPropertyExamples', () => {
   it('returns an array with the example property if it exists', () => {
     const property = { example: 'exampleValue' }
-    expect(getExamples(property)).toEqual(['exampleValue'])
+    expect(getPropertyExamples(property)).toEqual(['exampleValue'])
   })
 
   it('returns the examples array if examples property exists', () => {
     const property = { examples: ['example1', 'example2'] }
-    expect(getExamples(property)).toEqual(['example1', 'example2'])
+    expect(getPropertyExamples(property)).toEqual(['example1', 'example2'])
   })
 
   it('returns null if neither example nor examples properties exist', () => {
     const property = {}
-    expect(getExamples(property)).toBeNull()
+    expect(getPropertyExamples(property)).toBeNull()
   })
 
   it('returns an empty array if example property is an empty string', () => {
     const property = { example: '' }
-    expect(getExamples(property)).toEqual([''])
+    expect(getPropertyExamples(property)).toEqual([''])
   })
 
   it('returns an empty array if examples property is an empty array', () => {
     const property = { examples: [] }
-    expect(getExamples(property)).toEqual([])
+    expect(getPropertyExamples(property)).toEqual([])
   })
 })
diff --git a/test/lib/generateMissingOperationIds.test.ts b/test/lib/prepareOpenAPI/generateMissingOperationIds.test.ts
similarity index 95%
rename from test/lib/generateMissingOperationIds.test.ts
rename to test/lib/prepareOpenAPI/generateMissingOperationIds.test.ts
index 5450111..8723640 100644
--- a/test/lib/generateMissingOperationIds.test.ts
+++ b/test/lib/prepareOpenAPI/generateMissingOperationIds.test.ts
@@ -1,5 +1,5 @@
 import { describe, expect, it } from 'vitest'
-import { generateMissingOperationIds } from '../../src/lib/generateMissingOperationIds'
+import { generateMissingOperationIds } from '../../../src/lib/prepareOpenAPI/generateMissingOperationIds'
 
 describe('generateMissingOperationIds', () => {
   it('adds operationId to verbs without operationId', () => {
diff --git a/test/lib/generateMissingSummary.test.ts b/test/lib/prepareOpenAPI/generateMissingSummary.test.ts
similarity index 94%
rename from test/lib/generateMissingSummary.test.ts
rename to test/lib/prepareOpenAPI/generateMissingSummary.test.ts
index 460c454..33e8f0b 100644
--- a/test/lib/generateMissingSummary.test.ts
+++ b/test/lib/prepareOpenAPI/generateMissingSummary.test.ts
@@ -1,5 +1,5 @@
 import { describe, expect, it } from 'vitest'
-import { generateMissingSummary } from '../../src/lib/generateMissingSummary'
+import { generateMissingSummary } from '../../../src/lib/prepareOpenAPI/generateMissingSummary'
 
 describe('generateMissingSummary', () => {
   it('returns the original value if paths are not present', () => {
diff --git a/test/lib/prepareOpenAPI/generateMissingTags.test.ts b/test/lib/prepareOpenAPI/generateMissingTags.test.ts
new file mode 100644
index 0000000..24a8337
--- /dev/null
+++ b/test/lib/prepareOpenAPI/generateMissingTags.test.ts
@@ -0,0 +1,75 @@
+import { describe, expect, it } from 'vitest'
+import { generateMissingTags } from '../../../src/lib/prepareOpenAPI/generateMissingTags'
+
+describe('generateMissingTags', () => {
+  it('adds default tag to operations without tags', () => {
+    const spec = {
+      paths: {
+        '/example': {
+          get: {},
+        },
+      },
+    }
+    const result = generateMissingTags(spec)
+    expect(result.paths['/example'].get.tags).toEqual(['Default'])
+  })
+
+  it('keeps existing tags on operations', () => {
+    const spec = {
+      paths: {
+        '/example': {
+          get: {
+            tags: ['existingTag'],
+          },
+        },
+      },
+    }
+    const result = generateMissingTags(spec)
+    expect(result.paths['/example'].get.tags).toEqual(['existingTag'])
+  })
+
+  it('adds default tag to spec tags if used in operations', () => {
+    const spec = {
+      paths: {
+        '/example': {
+          get: {},
+        },
+      },
+      tags: [],
+    }
+    const result = generateMissingTags(spec)
+    expect(result.tags).toEqual([
+      {
+        name: 'Default',
+        description: '',
+      },
+    ])
+  })
+
+  it('does not add default tag to spec tags if not used in operations', () => {
+    const spec = {
+      paths: {
+        '/example': {
+          get: {
+            tags: ['existingTag'],
+          },
+        },
+      },
+      tags: [],
+    }
+    const result = generateMissingTags(spec)
+    expect(result.tags).not.toContainEqual({
+      name: 'Default',
+      description: undefined,
+    })
+    expect(result.tags).toEqual([])
+  })
+
+  it('handles empty paths object', () => {
+    const spec = {
+      paths: {},
+    }
+    const result = generateMissingTags(spec)
+    expect(result.paths).toEqual({})
+  })
+})