()
| 55 | return this._currentSchema.headers.authorization; |
| 56 | } |
| 57 | async getSchema() { |
| 58 | const cacheItem = this._schemaCache.get(this._currentSchema.value); |
| 59 | if (cacheItem) { |
| 60 | return { |
| 61 | ...cacheItem, |
| 62 | documentString: this.getOverride() || cacheItem.documentString, |
| 63 | }; |
| 64 | } |
| 65 | return this.loadSchema(); |
| 66 | } |
| 67 | async setApiToken(token: string) { |
| 68 | this._currentSchema.headers.authorization = `Bearer ${token}`; |
| 69 | localStorage.setItem(localStorageKey, token); |