diff --git a/packages/portal/spec-renderer/src/components/SpecDetails.vue b/packages/portal/spec-renderer/src/components/SpecDetails.vue index c64ecb4f17..1f8eb09fff 100644 --- a/packages/portal/spec-renderer/src/components/SpecDetails.vue +++ b/packages/portal/spec-renderer/src/components/SpecDetails.vue @@ -76,6 +76,10 @@ const { i18n } = composables.useI18n() const swaggerRef = ref(null) +defineExpose({ + swaggerInstance: swaggerRef, +}) + const hasRequiredProps = computed((): boolean => { return !!(props.document || props.url) }) diff --git a/packages/portal/swagger-ui-web-component/src/element.js b/packages/portal/swagger-ui-web-component/src/element.js index ae3b78fad7..a2c22a839b 100644 --- a/packages/portal/swagger-ui-web-component/src/element.js +++ b/packages/portal/swagger-ui-web-component/src/element.js @@ -307,6 +307,10 @@ export class SwaggerUIElement extends HTMLElement { this.#essentialsOnly = attributeValueToBoolean(essentialsOnly) } + get instance() { + return this.#instance + } + get spec() { return this.#spec }