Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(swagger): update to 5.1.0 swagger-ui [KHCP-10938] #1168

Merged
merged 24 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dc1c542
feat(swagger): update to 5.1.0 swagger-ui
davidma415 Feb 20, 2024
814d1a6
fix(swaggger-ui): test files
kaiarrowood Feb 27, 2024
202a744
fix(swagger-ui-web-component): styles
kaiarrowood Feb 27, 2024
7f1cafb
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 1, 2024
1305bf0
fix(swagger): get swagger Ui styles working as expected without local…
mptap Mar 1, 2024
39ed19d
chore(*): bump package size limit a bit to accomodate
mptap Mar 1, 2024
6986c51
fix(*): unpin swagger-ui version, delete obsolete test
mptap Mar 4, 2024
62d9b0b
style(*): override background style for operations
mptap Mar 4, 2024
2098371
fix(*): fix lockfile
mptap Mar 4, 2024
ad8f049
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 5, 2024
41e07e2
style(*): tweak css background on hover in operations list in sandbox
mptap Mar 5, 2024
4de4934
style(*): tweak css of method badges
mptap Mar 5, 2024
37b5fce
fix(*): apply pr feedback
mptap Mar 5, 2024
36bd437
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 8, 2024
c7eb331
style(*): override background and color for expand and collapse
mptap Mar 8, 2024
713231d
style(*): update css selector
mptap Mar 8, 2024
e0d29a0
style(*): update css variable
mptap Mar 8, 2024
1c15e86
style(*): pr fb
mptap Mar 8, 2024
e2febd6
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 12, 2024
5b3de60
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 12, 2024
19fe328
chore(lockfile): fix lockfile
mptap Mar 12, 2024
7983b3d
Merge branch 'main' into feat/update-swagger-ui
mptap Mar 12, 2024
bb71d05
style(swagger-ui): apply pr feedback
mptap Mar 12, 2024
1e2280a
chore(*): add to codeowners
mptap Mar 12, 2024
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
26 changes: 24 additions & 2 deletions packages/portal/spec-renderer/sandbox/pages/SpecRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,33 @@
type="checkbox"
> essentialsOnly
</label>

<br>

<label>
<input
v-model="format"
name="format"
type="radio"
value="yaml"
> YAML
</label>

<label>
<input
v-model="format"
name="format"
type="radio"
value="json"
> JSON
</label>
</div>
<br><br>
<SpecRenderer
:key="key"
:essentials-only="essentialsOnly"
:operations-list="opsList"
:spec="defaultDocument"
:spec="format === 'yaml' ? defaultDocument : jsonContent"
:tags="tags"
/>
</main>
Expand All @@ -28,6 +48,7 @@ import { ref, watch } from 'vue'
import type { Operation, Tag } from '../../src/types'
// @ts-ignore
import yamlContent from '../test.yaml'
import jsonContent from '../test.json'
import { SpecRenderer } from '../../src'
// only imported in Sandbox! Parent app should do this
import '@kong/kongponents/dist/style.css'
Expand Down Expand Up @@ -151,9 +172,10 @@ const tags = ref<Tag[]>([

// checkboxes for toggling options
const essentialsOnly = ref(false)
const format = ref<'yaml' | 'json'>('yaml')

const key = ref(0)
watch(() => [essentialsOnly.value], () => {
watch(() => [essentialsOnly.value, format.value], () => {
key.value++
}, { deep: true, immediate: true })
</script>
Expand Down
Loading
Loading