openapi-explorer 2.2.688 → 2.2.690

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ export default {
25
25
  'authentication': {
26
26
  'no-api-key-applied': 'No API key applied',
27
27
  'http-basic': 'HTTP Basic',
28
- 'http-basic-desc': 'Send the Authorization header containing the type Basic followed by a space and a base64 encoded string of username:password',
28
+ 'http-basic-desc': 'Sends the <code>Authorization header</code> containing the token type <code>Basic</code> followed by the base64 encoded <code>username:password</code> string.',
29
29
  'username': 'username',
30
30
  'password': 'password',
31
31
  'requires': 'Requires',
@@ -25,7 +25,7 @@ export default {
25
25
  'authentication': {
26
26
  'no-api-key-applied': "Aucune clé d'API appliquée",
27
27
  'http-basic': 'HTTP Basique',
28
- 'http-basic-desc': "Envoyez l'en-tête Authorization contenant le type Basic suivi d'un espace et d'une chaîne encodée en base64 de nom d'utilisateur:mot de passe",
28
+ 'http-basic-desc': "Envoyez l'en-tête <code>Authorization contenant</code> le type <code>Basic</code> suivi d'un espace et d'une chaîne encodée en base64 de nom <code>d'utilisateur:mot</code> de passe",
29
29
  'username': "nom d'utilisateur",
30
30
  'password': 'mot de passe',
31
31
  'requires': 'Nécessite',
@@ -262,7 +262,7 @@ function renderSecurityScheme(v) {
262
262
  }
263
263
  if (v.type.toLowerCase() === 'apikey' || v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'bearer') {
264
264
  var _v$bearerFormat, _v$bearerFormat2;
265
- return html` <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? html`Send <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : html`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and then the ${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token String'}.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? html` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? html` <input type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
265
+ return html` <style>code{font-weight:700}</style> <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? html`Sends <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : html`Sends the <code>Authorization header</code> containing the token type <code style="text-transform:capitalize">${v.scheme || 'bearer'}</code> followed by the <code>${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token'}</code> string.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? html` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? html` <input type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
266
266
  onApiKeyChange.call(this, v.apiKeyId, e);
267
267
  }}"> ${getI18nText('authentication.set')} </button>` : html`<span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
268
268
  v.finalKeyValue = '';
@@ -271,12 +271,12 @@ function renderSecurityScheme(v) {
271
271
  }
272
272
  if (v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'basic') {
273
273
  if (v.finalKeyValue) {
274
- return html` <div style="padding-top:1rem">${getI18nText('authentication.http-basic-desc')}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
274
+ return html` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${unsafeHTML(getI18nText('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
275
275
  v.finalKeyValue = '';
276
276
  this.requestUpdate();
277
277
  }}">REMOVE</button> </div>`;
278
278
  }
279
- return html` <div style="padding-top:1rem">${getI18nText('authentication.http-basic-desc')}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input type="text" value="${v.user}" placeholder="${getI18nText('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input class="api-key-password fs-exclude" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${getI18nText('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
279
+ return html` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${unsafeHTML(getI18nText('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input type="text" value="${v.user}" placeholder="${getI18nText('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input class="api-key-password fs-exclude" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${getI18nText('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
280
280
  onApiKeyChange.call(this, v.apiKeyId, e);
281
281
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : getI18nText('authentication.set')} </button> </form> </div>`;
282
282
  }
@@ -323,13 +323,11 @@ export function pathSecurityTemplate(pathSecurityOptions) {
323
323
  const andKeyTypes = [];
324
324
  Object.keys(pSecurity).forEach(pathSecurityKey => {
325
325
  const s = this.resolvedSpec.securitySchemes.find(ss => ss.apiKeyId === pathSecurityKey);
326
- if (s) {
327
- andKeyTypes.push(getTypeDisplayHeader(s));
328
- andSecurityKeys1.push({
329
- ...s,
330
- scopes: pSecurity[pathSecurityKey]
331
- });
332
- }
326
+ andKeyTypes.push(s ? getTypeDisplayHeader(s) : pathSecurityKey);
327
+ andSecurityKeys1.push({
328
+ ...s,
329
+ scopes: pSecurity[pathSecurityKey]
330
+ });
333
331
  });
334
332
  orSecurityKeys1.push({
335
333
  securityTypes: andKeyTypes.length > 1 ? `${andKeyTypes[0]} + ${andKeyTypes.length - 1} more` : andKeyTypes[0],
@@ -202,7 +202,7 @@ function duplicateExampleWithNewPropertyValues(objectExamples, propertyName, pro
202
202
  export function getExampleValuesFromSchema(schema, config = {}) {
203
203
  // Wrap the top level so that the recursive object can treat it as a normal property and we'll hit the 'object' below, otherwise we'll never create the top level.
204
204
  if (config.xml) {
205
- const xmlResult = getExampleValuesFromSchemaRecursive(schema.type === 'object' ? {
205
+ const xmlResult = getExampleValuesFromSchemaRecursive((schema === null || schema === void 0 ? void 0 : schema.type) === 'object' ? {
206
206
  properties: {
207
207
  _root: schema
208
208
  }
@@ -29,7 +29,7 @@ var _default = exports.default = {
29
29
  'authentication': {
30
30
  'no-api-key-applied': 'No API key applied',
31
31
  'http-basic': 'HTTP Basic',
32
- 'http-basic-desc': 'Send the Authorization header containing the type Basic followed by a space and a base64 encoded string of username:password',
32
+ 'http-basic-desc': 'Sends the <code>Authorization header</code> containing the token type <code>Basic</code> followed by the base64 encoded <code>username:password</code> string.',
33
33
  'username': 'username',
34
34
  'password': 'password',
35
35
  'requires': 'Requires',
@@ -29,7 +29,7 @@ var _default = exports.default = {
29
29
  'authentication': {
30
30
  'no-api-key-applied': "Aucune clé d'API appliquée",
31
31
  'http-basic': 'HTTP Basique',
32
- 'http-basic-desc': "Envoyez l'en-tête Authorization contenant le type Basic suivi d'un espace et d'une chaîne encodée en base64 de nom d'utilisateur:mot de passe",
32
+ 'http-basic-desc': "Envoyez l'en-tête <code>Authorization contenant</code> le type <code>Basic</code> suivi d'un espace et d'une chaîne encodée en base64 de nom <code>d'utilisateur:mot</code> de passe",
33
33
  'username': "nom d'utilisateur",
34
34
  'password': 'mot de passe',
35
35
  'requires': 'Nécessite',
@@ -269,7 +269,7 @@ function renderSecurityScheme(v) {
269
269
  }
270
270
  if (v.type.toLowerCase() === 'apikey' || v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'bearer') {
271
271
  var _v$bearerFormat, _v$bearerFormat2;
272
- return (0, _lit.html)` <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? (0, _lit.html)`Send <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : (0, _lit.html)`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and then the ${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token String'}.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? (0, _lit.html)` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? (0, _lit.html)` <input type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
272
+ return (0, _lit.html)` <style>code{font-weight:700}</style> <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? (0, _lit.html)`Sends <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : (0, _lit.html)`Sends the <code>Authorization header</code> containing the token type <code style="text-transform:capitalize">${v.scheme || 'bearer'}</code> followed by the <code>${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token'}</code> string.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? (0, _lit.html)` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? (0, _lit.html)` <input type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
273
273
  onApiKeyChange.call(this, v.apiKeyId, e);
274
274
  }}"> ${(0, _index.getI18nText)('authentication.set')} </button>` : (0, _lit.html)`<span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
275
275
  v.finalKeyValue = '';
@@ -278,12 +278,12 @@ function renderSecurityScheme(v) {
278
278
  }
279
279
  if (v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'basic') {
280
280
  if (v.finalKeyValue) {
281
- return (0, _lit.html)` <div style="padding-top:1rem">${(0, _index.getI18nText)('authentication.http-basic-desc')}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
281
+ return (0, _lit.html)` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${(0, _unsafeHtml.unsafeHTML)((0, _index.getI18nText)('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
282
282
  v.finalKeyValue = '';
283
283
  this.requestUpdate();
284
284
  }}">REMOVE</button> </div>`;
285
285
  }
286
- return (0, _lit.html)` <div style="padding-top:1rem">${(0, _index.getI18nText)('authentication.http-basic-desc')}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input type="text" value="${v.user}" placeholder="${(0, _index.getI18nText)('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input class="api-key-password fs-exclude" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${(0, _index.getI18nText)('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
286
+ return (0, _lit.html)` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${(0, _unsafeHtml.unsafeHTML)((0, _index.getI18nText)('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input type="text" value="${v.user}" placeholder="${(0, _index.getI18nText)('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input class="api-key-password fs-exclude" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${(0, _index.getI18nText)('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
287
287
  onApiKeyChange.call(this, v.apiKeyId, e);
288
288
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : (0, _index.getI18nText)('authentication.set')} </button> </form> </div>`;
289
289
  }
@@ -330,13 +330,11 @@ function pathSecurityTemplate(pathSecurityOptions) {
330
330
  const andKeyTypes = [];
331
331
  Object.keys(pSecurity).forEach(pathSecurityKey => {
332
332
  const s = this.resolvedSpec.securitySchemes.find(ss => ss.apiKeyId === pathSecurityKey);
333
- if (s) {
334
- andKeyTypes.push(getTypeDisplayHeader(s));
335
- andSecurityKeys1.push({
336
- ...s,
337
- scopes: pSecurity[pathSecurityKey]
338
- });
339
- }
333
+ andKeyTypes.push(s ? getTypeDisplayHeader(s) : pathSecurityKey);
334
+ andSecurityKeys1.push({
335
+ ...s,
336
+ scopes: pSecurity[pathSecurityKey]
337
+ });
340
338
  });
341
339
  orSecurityKeys1.push({
342
340
  securityTypes: andKeyTypes.length > 1 ? `${andKeyTypes[0]} + ${andKeyTypes.length - 1} more` : andKeyTypes[0],
@@ -211,7 +211,7 @@ function duplicateExampleWithNewPropertyValues(objectExamples, propertyName, pro
211
211
  function getExampleValuesFromSchema(schema, config = {}) {
212
212
  // Wrap the top level so that the recursive object can treat it as a normal property and we'll hit the 'object' below, otherwise we'll never create the top level.
213
213
  if (config.xml) {
214
- const xmlResult = getExampleValuesFromSchemaRecursive(schema.type === 'object' ? {
214
+ const xmlResult = getExampleValuesFromSchemaRecursive((schema === null || schema === void 0 ? void 0 : schema.type) === 'object' ? {
215
215
  properties: {
216
216
  _root: schema
217
217
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "2.2.688",
3
+ "version": "2.2.690",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Authress Developers <developers@authress.io>",
6
6
  "type": "module",