Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kotlin/src/main/com/looker/rtl/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ class DelimArray<T> : Array<T>() {
*/

fun isTrue(value: String?): Boolean {
val low = unQuote(value?.toLowerCase())
val low = unQuote(value?.lowercase())
return low == "true" || low == "1" || low == "t" || low == "y" || low == "yes"
}

fun isFalse(value: String?): Boolean {
val low = unQuote(value?.toLowerCase())
val low = unQuote(value?.lowercase())
return low == "false" || low == "0" || low == "f" || low == "n" || low == "no"
}

Expand Down
2 changes: 1 addition & 1 deletion kotlin/src/main/com/looker/rtl/ErrorDoc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ typealias ErrorCodeIndex = HashMap<String, ErrorDocItem>
class ErrorDoc(val sdk: APIMethods, val cdnUrl: String = ErrorCodesUrl): IErrorDoc {
companion object {
/** Location of the public CDN for Looker API Error codes */
const val ErrorCodesUrl = "https://marketplace-api.looker.com/errorcodes/"
const val ErrorCodesUrl = "https://static-a.cdn.looker.app/errorcodes/"

/** Default "not found" content for error documents that don't (yet) exist */
const val ErrorDocNotFound = "### No documentation found for "
Expand Down
4 changes: 2 additions & 2 deletions kotlin/src/test/TestErrorDoc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class TestErrorDoc {
assertEquals("login", errDoc.methodName("/login_404.md"))
assertEquals("login_2", errDoc.methodName("/login_2_404.md"))
assertEquals("and_another", errDoc.methodName("/and_another_404.md"))
assertEquals("login", errDoc.methodName("errorcodes/live/login_404.md"))
assertEquals("login", errDoc.methodName("https://foo.bar.com/live/login_404.md"))
assertEquals("login", errDoc.methodName("errorcodes/login_404.md"))
assertEquals("login", errDoc.methodName("https://foo.bar.com/login_404.md"))
}
}
2 changes: 1 addition & 1 deletion packages/extension-api-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The API Explorer extension can be manually installed and run with a Looker insta
use_embeds: yes
use_clipboard: yes
core_api_methods: ["versions", "api_spec"]
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://marketplace-api.looker.com","https://docs.looker.com","https://developer.mozilla.org/"]
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://static-a.cdn.looker.app","https://docs.looker.com","https://developer.mozilla.org/"]
oauth2_urls: []
}
}
Expand Down
7 changes: 2 additions & 5 deletions packages/sdk-rtl/src/errorDoc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,8 @@ describe('ErrorDoc', () => {
['login_404.md', 'login'],
['login_2_404.md', 'login_2'],
['and_another_404.md', 'and_another'],
['errorcodes/live/login_404.md', 'login'],
[
'https://marketplace-api.looker.com/errorcodes/live/login_404.md',
'login',
],
['errorcodes/login_404.md', 'login'],
['https://static-a.cdn.looker.app/errorcodes/login_404.md', 'login'],
])('url:"%s" should be "%s"', (url, expected) => {
expect(errDoc.methodName(url)).toEqual(expected)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-rtl/src/errorDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface IErrorDocItem {
}

/** Location of the public CDN for Looker API Error codes */
export const ErrorCodesUrl = 'https://marketplace-api.looker.com/errorcodes/'
export const ErrorCodesUrl = 'https://static-a.cdn.looker.app/errorcodes/'

/** Structure of the error code document index */
export type ErrorCodeIndex = Record<string, IErrorDocItem>
Expand Down