Skip to content

Commit 02bf9a1

Browse files
chore: replace httpsnippet-lite imports with httpsnippet
1 parent 4d7ea21 commit 02bf9a1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/spec-document/samples/RequestSample.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@
9090
import { watch, ref, computed, inject } from 'vue'
9191
import type { PropType, Ref } from 'vue'
9292
import type { IHttpOperation, INodeExample } from '@stoplight/types'
93-
import { HTTPSnippet } from 'httpsnippet-lite'
93+
import { HTTPSnippet } from 'httpsnippet'
9494
import { requestSampleConfigs } from '@/constants'
9595
import { getRequestHeaders } from '@/utils'
9696
import CodeBlock from '@/components/common/CodeBlock.vue'
9797
import CollapsablePanel from '@/components/common/CollapsablePanel.vue'
9898
import type { LanguageCode } from '@/types/request-languages'
99-
import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet-lite'
99+
import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet'
100100
import SelectDropdown from '@/components/common/SelectDropdown.vue'
101101
import LanguageIcon from '@/components/common/LanguageIcon.vue'
102102
import type { SelectItem } from '@/types'
@@ -243,7 +243,7 @@ watch(() => ({
243243
requestQuery: props.requestQuery,
244244
authQuery: props.authQuery,
245245
requestBody: props.requestBody,
246-
}), async (newValue, oldValue) => {
246+
}), (newValue, oldValue) => {
247247
248248
if (newValue.method !== oldValue?.method && requestConfigs.value?.[0]) {
249249
selectedLang.value = requestConfigs.value[0].httpSnippetLanguage
@@ -308,7 +308,7 @@ watch(() => ({
308308
requestCode.value = newValue.requestBody
309309
return requestSampleConfigs.filter(c => c.httpSnippetLanguage !== 'json')
310310
} else if (snippet.value) {
311-
requestCode.value = await snippet.value.convert((newValue.lang as TargetId), newValue.lib)
311+
requestCode.value = snippet.value.convert((newValue.lang as TargetId), newValue.lib) || ''
312312
}
313313
}
314314
}

src/types/request-languages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { TargetId, ClientId } from 'httpsnippet-lite'
1+
import type { TargetId, ClientId } from 'httpsnippet'
22
export type LanguageCode = TargetId | 'json'
33
interface LibraryConfig {
44
label: string

0 commit comments

Comments
 (0)