-
Type: HTTP ({{ scheme.scheme }})
-
Type: API Key ({{ scheme.in }}: {{ scheme.name }})
-
Type: OpenID Connect ({{ scheme.openIdConnectUrl }})
-
Type: OAuth2
-
+
+
+
-
-
{{ flow }} Flow:
-
-
Authorization URL: {{ url.authorizationUrl }}
-
Token URL: {{ url.tokenUrl }}
-
-
Scopes:
-
- -
- {{ scope }}: {{ description }}
-
-
-
-
-
+ {{ $t('Authorizations') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/Security/OASecurityContent.vue b/src/components/Security/OASecurityContent.vue
new file mode 100644
index 00000000..00ced8cc
--- /dev/null
+++ b/src/components/Security/OASecurityContent.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+ {{ name }}
+
+
+
Type: HTTP ({{ scheme.scheme }})
+
Type: API Key ({{ scheme.in }}: {{ scheme.name }})
+
Type: OpenID Connect ({{ scheme.openIdConnectUrl }})
+
Type: OAuth2
+
+
+
{{ flow }} Flow:
+
+
Authorization URL: {{ url.authorizationUrl }}
+
Token URL: {{ url.tokenUrl }}
+
+
Scopes:
+
+ -
+ {{ scope }}: {{ description }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Try/OARequestParameters.vue b/src/components/Try/OARequestParameters.vue
index 4c1812fb..e56aa949 100644
--- a/src/components/Try/OARequestParameters.vue
+++ b/src/components/Try/OARequestParameters.vue
@@ -1,10 +1,17 @@
@@ -172,21 +194,15 @@ watch([variables, auth, body], buildRequest, { deep: true, immediate: true })
-
-
- {{ name }}
-
-
-
-
+
+ {{ authScheme.name }}
+
+
+
diff --git a/src/components/Try/OARequestSecurityInput.vue b/src/components/Try/OARequestSecurityInput.vue
index 92adb12d..a94d0b93 100644
--- a/src/components/Try/OARequestSecurityInput.vue
+++ b/src/components/Try/OARequestSecurityInput.vue
@@ -23,6 +23,10 @@ const placeholder = computed(() => {
return props.modelValue
}
+ if (!props.scheme || !props.scheme.type) {
+ return ''
+ }
+
return usePlayground().getSecuritySchemeDefaultValue(props.scheme)
})
diff --git a/src/composables/useTheme.ts b/src/composables/useTheme.ts
index e92adca6..39f04a55 100644
--- a/src/composables/useTheme.ts
+++ b/src/composables/useTheme.ts
@@ -61,6 +61,11 @@ const playgroundConfig = {
},
}
+const securityConfig = {
+ defaultScheme: ref
(null),
+ selectedScheme: ref(null),
+}
+
export function useTheme() {
function getLocale(): 'es' | 'en' {
return themeConfig.locale.value
@@ -170,6 +175,7 @@ export function useTheme() {
return {
schemaConfig,
+ securityConfig,
getLocale,
setLocale,
getHighlighterTheme,
diff --git a/src/locales/en.json b/src/locales/en.json
index b1f114d0..8fdb6ab0 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -32,5 +32,6 @@
"Servers": "Servers",
"Your browser does not support the audio element.": "Your browser does not support the audio element.",
"Unrecognized response type. Raw content:": "Unrecognized response type. Raw content:",
- "Download file": "Download file"
+ "Download file": "Download file",
+ "Select...": "Select..."
}
diff --git a/src/locales/es.json b/src/locales/es.json
index feede6dd..a464876d 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -32,5 +32,6 @@
"Servers": "Servidores",
"Your browser does not support the audio element.": "Tu navegador no soporta el elemento de audio.",
"Unrecognized response type. Raw content:": "Tipo de respuesta no reconocido. Contenido en crudo:",
- "Download file": "Descargar archivo"
+ "Download file": "Descargar archivo",
+ "Select...": "Seleccionar..."
}