ts-ignore
This commit is contained in:
@@ -127,6 +127,7 @@ export async function loadConfigFromOpenApi(baseUrl: string): Promise<AppConfig>
|
||||
const listOp = paths[listPath]?.get;
|
||||
if (!listOp) continue;
|
||||
|
||||
// @ts-ignore
|
||||
const responseSchema = listOp.responses?.["200"]?.content?.["application/json"]?.schema;
|
||||
let schemaObj = responseSchema;
|
||||
if (responseSchema?.type === "array" && responseSchema.items) {
|
||||
@@ -161,10 +162,13 @@ export async function loadConfigFromOpenApi(baseUrl: string): Promise<AppConfig>
|
||||
});
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
const serverBaseUrl = import.meta.env.VITE_API_BASE_URL || (api.servers?.[0]?.url ?? "")
|
||||
// @ts-ignore
|
||||
const authBaseUrl = import.meta.env.VITE_AUTH_BASE_URL || ""
|
||||
return {
|
||||
baseUrl:
|
||||
import.meta.env.VITE_API_BASE_URL || (api.servers?.[0]?.url ?? ""),
|
||||
authBaseUrl: import.meta.env.VITE_AUTH_BASE_URL || "",
|
||||
baseUrl: serverBaseUrl,
|
||||
authBaseUrl: authBaseUrl,
|
||||
resources,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user