Skip to content

Commit 784507b

Browse files
committed
general fixes
1 parent bcde184 commit 784507b

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/rapidoc.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -908,22 +908,16 @@ export default class RapiDoc extends LitElement {
908908
}
909909
}
910910

911-
// Public Method
911+
// Public Method - to update security-scheme of type http
912912
setHttpUserNameAndPassword(securitySchemeId, username, password) {
913913
return applyApiKey.call(this, securitySchemeId, username, password);
914914
}
915915

916-
// Public Method
916+
// Public Method - to update security-scheme of type apiKey or OAuth
917917
setApiKey(securitySchemeId, apiKeyValue) {
918918
return applyApiKey.call(this, securitySchemeId, '', '', apiKeyValue);
919919
}
920920

921-
// Public Method
922-
setOauthClientIdAndSecret(securitySchemeId, oauthFlow, clientId, clientSecret, username, password, scopes) {
923-
// eslint-disable-next-line no-console
924-
console.log(securitySchemeId, oauthFlow, clientId, clientSecret, username, password, scopes);
925-
}
926-
927921
// Public Method
928922
removeAllSecurityKeys() {
929923
return onClearAllApiKeys.call(this);

src/utils/spec-parser.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ import { invalidCharsRegEx, rapidocApiKey, sleep } from '~/utils/common-utils';
55

66
export default async function ProcessSpec(specUrl, generateMissingTags = false, sortTags = false, sortEndpointsBy = '', attrApiKey = '', attrApiKeyLocation = '', attrApiKeyValue = '', serverUrl = '') {
77
let jsonParsedSpec;
8-
// important to show the initial loader
9-
this.requestUpdate();
10-
await sleep(0);
118
try {
9+
this.requestUpdate(); // important to show the initial loader
1210
let specMeta;
1311
if (typeof specUrl === 'string') {
1412
specMeta = await OpenApiParser.resolve({ url: specUrl }); // Swagger(specUrl);
1513
} else {
1614
specMeta = await OpenApiParser.resolve({ spec: specUrl }); // Swagger({ spec: specUrl });
1715
}
16+
await sleep(0); // important to show the initial loader (allows for rendering updates)
1817
if (specMeta.spec && (specMeta.spec.components || specMeta.spec.info || specMeta.spec.servers || specMeta.spec.tags || specMeta.spec.paths)) {
1918
jsonParsedSpec = specMeta.spec;
2019
this.dispatchEvent(new CustomEvent('before-render', { detail: { spec: jsonParsedSpec } }));

0 commit comments

Comments
 (0)