Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@vueuse/core": "^11.1.0",
"allof-merge": "^0.6.6",
"flatted": "^3.3.1",
"httpsnippet-lite": "^3.0.5",
"httpsnippet": "^3.0.7",
"json-schema": "^0.4.0",
"markdown-it": "^14.1.0",
"oas-normalize": "^11.1.2",
Expand Down
104 changes: 68 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/components/spec-document/samples/RequestSample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
import { watch, ref, computed, inject } from 'vue'
import type { PropType, Ref } from 'vue'
import type { IHttpOperation, INodeExample } from '@stoplight/types'
import { HTTPSnippet } from 'httpsnippet-lite'
import { HTTPSnippet } from 'httpsnippet'
import { requestSampleConfigs } from '@/constants'
import { getRequestHeaders } from '@/utils'
import CodeBlock from '@/components/common/CodeBlock.vue'
import CollapsablePanel from '@/components/common/CollapsablePanel.vue'
import type { LanguageCode } from '@/types/request-languages'
import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet-lite'
import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet'
import SelectDropdown from '@/components/common/SelectDropdown.vue'
import LanguageIcon from '@/components/common/LanguageIcon.vue'
import type { SelectItem } from '@/types'
Expand Down Expand Up @@ -243,7 +243,7 @@ watch(() => ({
requestQuery: props.requestQuery,
authQuery: props.authQuery,
requestBody: props.requestBody,
}), async (newValue, oldValue) => {
}), (newValue, oldValue) => {

if (newValue.method !== oldValue?.method && requestConfigs.value?.[0]) {
selectedLang.value = requestConfigs.value[0].httpSnippetLanguage
Expand Down Expand Up @@ -308,7 +308,7 @@ watch(() => ({
requestCode.value = newValue.requestBody
return requestSampleConfigs.filter(c => c.httpSnippetLanguage !== 'json')
} else if (snippet.value) {
requestCode.value = await snippet.value.convert((newValue.lang as TargetId), newValue.lib)
requestCode.value = snippet.value.convert((newValue.lang as TargetId), newValue.lib) || ''
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/request-languages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TargetId, ClientId } from 'httpsnippet-lite'
import type { TargetId, ClientId } from 'httpsnippet'
export type LanguageCode = TargetId | 'json'
interface LibraryConfig {
label: string
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default defineConfig({
* during the build
*/
nodePolyfills({
include: ['util', 'path'],
include: ['util', 'path', 'querystring'],
}),
vue({
features: {
Expand Down