openapi-explorer 1.0.509 → 1.0.512

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.
@@ -302,8 +302,10 @@ export default function securitySchemeTemplate() {
302
302
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : getI18nText('authentication.set')} </button> </form>` : ''} </td> </tr> ${v.type.toLowerCase() === 'oauth2' ? html` <tr> <td colspan="2" style="border:none;padding-left:48px"> ${Object.keys(v.flows).map(f => oAuthFlowTemplate.call(this, f, v, v.flows[f]))} </td> </tr> ` : ''} `)} </table>` : ''} </div> </slot> </section> `;
303
303
  }
304
304
 
305
- function getOauthScopeTemplate(scopes) {
306
- if (!scopes || !scopes.length || !Array.isArray(scopes)) {
305
+ function getOauthScopeTemplate(rawScopes) {
306
+ const scopes = Array.isArray(rawScopes) ? rawScopes.map(s => s === null || s === void 0 ? void 0 : s.trim()).filter(s => s) : [];
307
+
308
+ if (!scopes.length) {
307
309
  return '';
308
310
  }
309
311
 
@@ -315,8 +315,10 @@ function securitySchemeTemplate() {
315
315
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : (0, _languages.getI18nText)('authentication.set')} </button> </form>` : ''} </td> </tr> ${v.type.toLowerCase() === 'oauth2' ? (0, _lit.html)` <tr> <td colspan="2" style="border:none;padding-left:48px"> ${Object.keys(v.flows).map(f => oAuthFlowTemplate.call(this, f, v, v.flows[f]))} </td> </tr> ` : ''} `)} </table>` : ''} </div> </slot> </section> `;
316
316
  }
317
317
 
318
- function getOauthScopeTemplate(scopes) {
319
- if (!scopes || !scopes.length || !Array.isArray(scopes)) {
318
+ function getOauthScopeTemplate(rawScopes) {
319
+ const scopes = Array.isArray(rawScopes) ? rawScopes.map(s => s === null || s === void 0 ? void 0 : s.trim()).filter(s => s) : [];
320
+
321
+ if (!scopes.length) {
320
322
  return '';
321
323
  }
322
324
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "1.0.509",
3
+ "version": "1.0.512",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Rhosys Developers <developers@rhosys.ch>",
6
6
  "type": "module",