77
88import React from "react" ;
99
10+ import { translate } from "@docusaurus/Translate" ;
11+ import { OPENAPI_SECURITY_SCHEMES } from "@theme/translationIds" ;
12+
1013import Link from "@docusaurus/Link" ;
1114import { useTypedSelector } from "@theme/ApiItem/hooks" ;
1215
@@ -48,16 +51,31 @@ function SecuritySchemes(props: any) {
4851 } }
4952 >
5053 < span >
51- < strong > name:</ strong > { " " }
54+ < strong >
55+ { translate ( {
56+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
57+ message : "name:" ,
58+ } ) }
59+ </ strong > { " " }
5260 < Link to = { infoAuthPath } > { name ?? key } </ Link >
5361 </ span >
5462 < span >
55- < strong > type: </ strong >
63+ < strong >
64+ { translate ( {
65+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
66+ message : "type:" ,
67+ } ) }
68+ </ strong > { " " }
5669 { type }
5770 </ span >
5871 { scopes && scopes . length > 0 && (
5972 < span >
60- < strong > scopes: </ strong >
73+ < strong >
74+ { translate ( {
75+ id : OPENAPI_SECURITY_SCHEMES . SCOPES ,
76+ message : "scopes:" ,
77+ } ) }
78+ </ strong > { " " }
6179 < code >
6280 { auth . scopes . length > 0 ? auth . scopes . toString ( ) : "[]" }
6381 </ code >
@@ -89,16 +107,31 @@ function SecuritySchemes(props: any) {
89107 } }
90108 >
91109 < span >
92- < strong > name:</ strong > { " " }
110+ < strong >
111+ { translate ( {
112+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
113+ message : "name:" ,
114+ } ) }
115+ </ strong > { " " }
93116 < Link to = { infoAuthPath } > { name ?? key } </ Link >
94117 </ span >
95118 < span >
96- < strong > type: </ strong >
119+ < strong >
120+ { translate ( {
121+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
122+ message : "type:" ,
123+ } ) }
124+ </ strong > { " " }
97125 { type }
98126 </ span >
99127 { scopes && scopes . length > 0 && (
100128 < span >
101- < strong > scopes: </ strong >
129+ < strong >
130+ { translate ( {
131+ id : OPENAPI_SECURITY_SCHEMES . SCOPES ,
132+ message : "scopes:" ,
133+ } ) }
134+ </ strong > { " " }
102135 < code >
103136 { auth . scopes . length > 0 ? auth . scopes . toString ( ) : "[]" }
104137 </ code >
@@ -128,15 +161,30 @@ function SecuritySchemes(props: any) {
128161 } }
129162 >
130163 < span >
131- < strong > name:</ strong > { " " }
164+ < strong >
165+ { translate ( {
166+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
167+ message : "name:" ,
168+ } ) }
169+ </ strong > { " " }
132170 < Link to = { infoAuthPath } > { auth . name ?? auth . key } </ Link >
133171 </ span >
134172 < span >
135- < strong > type: </ strong >
173+ < strong >
174+ { translate ( {
175+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
176+ message : "type:" ,
177+ } ) }
178+ </ strong > { " " }
136179 { auth . type }
137180 </ span >
138181 < span >
139- < strong > in: </ strong >
182+ < strong >
183+ { translate ( {
184+ id : OPENAPI_SECURITY_SCHEMES . IN ,
185+ message : "in:" ,
186+ } ) }
187+ </ strong > { " " }
140188 { auth . in }
141189 </ span >
142190 </ pre >
@@ -156,16 +204,31 @@ function SecuritySchemes(props: any) {
156204 } }
157205 >
158206 < span >
159- < strong > name:</ strong > { " " }
207+ < strong >
208+ { translate ( {
209+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
210+ message : "name:" ,
211+ } ) }
212+ </ strong > { " " }
160213 < Link to = { infoAuthPath } > { name ?? key } </ Link >
161214 </ span >
162215 < span >
163- < strong > type: </ strong >
216+ < strong >
217+ { translate ( {
218+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
219+ message : "type:" ,
220+ } ) }
221+ </ strong > { " " }
164222 { type }
165223 </ span >
166224 { scopes && scopes . length > 0 && (
167225 < span >
168- < strong > scopes: </ strong >
226+ < strong >
227+ { translate ( {
228+ id : OPENAPI_SECURITY_SCHEMES . SCOPES ,
229+ message : "scopes:" ,
230+ } ) }
231+ </ strong > { " " }
169232 < code >
170233 { auth . scopes . length > 0 ? auth . scopes . toString ( ) : "[]" }
171234 </ code >
@@ -198,16 +261,31 @@ function SecuritySchemes(props: any) {
198261 } }
199262 >
200263 < span >
201- < strong > name:</ strong > { " " }
264+ < strong >
265+ { translate ( {
266+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
267+ message : "name:" ,
268+ } ) }
269+ </ strong > { " " }
202270 < Link to = { infoAuthPath } > { name ?? key } </ Link >
203271 </ span >
204272 < span >
205- < strong > type: </ strong >
273+ < strong >
274+ { translate ( {
275+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
276+ message : "type:" ,
277+ } ) }
278+ </ strong > { " " }
206279 { type }
207280 </ span >
208281 { scopes && scopes . length > 0 && (
209282 < span >
210- < strong > scopes: </ strong >
283+ < strong >
284+ { translate ( {
285+ id : OPENAPI_SECURITY_SCHEMES . SCOPES ,
286+ message : "scopes:" ,
287+ } ) }
288+ </ strong > { " " }
211289 < code >
212290 { auth . scopes . length > 0 ? auth . scopes . toString ( ) : "[]" }
213291 </ code >
@@ -226,7 +304,12 @@ function SecuritySchemes(props: any) {
226304 { flows && (
227305 < span >
228306 < code >
229- < strong > flows: </ strong >
307+ < strong >
308+ { translate ( {
309+ id : OPENAPI_SECURITY_SCHEMES . FLOWS ,
310+ message : "flows:" ,
311+ } ) }
312+ </ strong > { " " }
230313 { JSON . stringify ( flows , null , 2 ) }
231314 </ code >
232315 </ span >
@@ -248,16 +331,31 @@ function SecuritySchemes(props: any) {
248331 } }
249332 >
250333 < span >
251- < strong > name:</ strong > { " " }
334+ < strong >
335+ { translate ( {
336+ id : OPENAPI_SECURITY_SCHEMES . NAME ,
337+ message : "name:" ,
338+ } ) }
339+ </ strong > { " " }
252340 < Link to = { infoAuthPath } > { name ?? key } </ Link >
253341 </ span >
254342 < span >
255- < strong > type: </ strong >
343+ < strong >
344+ { translate ( {
345+ id : OPENAPI_SECURITY_SCHEMES . TYPE ,
346+ message : "type:" ,
347+ } ) }
348+ </ strong > { " " }
256349 { type }
257350 </ span >
258351 { scopes && scopes . length > 0 && (
259352 < span >
260- < strong > scopes: </ strong >
353+ < strong >
354+ { translate ( {
355+ id : OPENAPI_SECURITY_SCHEMES . SCOPES ,
356+ message : "scopes:" ,
357+ } ) }
358+ </ strong > { " " }
261359 < code >
262360 { auth . scopes . length > 0 ? auth . scopes . toString ( ) : "[]" }
263361 </ code >
0 commit comments