From 6491d44b68e843f74b94bcdbfa18486de45f30f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Thu, 9 Jan 2025 11:51:01 +0100 Subject: [PATCH 1/3] Fixing api console --- app/client/apiconsole.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/client/apiconsole.ts b/app/client/apiconsole.ts index 98bb59c0ac..f2a1a4189a 100644 --- a/app/client/apiconsole.ts +++ b/app/client/apiconsole.ts @@ -117,7 +117,11 @@ function setParamValue(resolvedParam: any, value: ParamValue) { // For every endpoint in the spec... for (const [pathKey, path] of spec.get("paths").entries()) { for (const [method, operation] of path.entries()) { - + // Skip the $ref for now, it is only used in `scim` endpoints witch don't share + // parameters with other endpoints. + if (method === '$ref') { + continue; + } const parameters = operation.get("parameters"); if (!parameters) { continue; } for (const param of parameters.values()) { @@ -327,7 +331,7 @@ createAppPage((appModel) => { swaggerUI = buildSwaggerUI({ filter: true, plugins: [gristPlugin.bind(null, appModel)], - url: 'https://raw.githubusercontent.com/gristlabs/grist-help/master/api/grist.yml', + url: 'http://127.0.0.1:8080/api/grist.yml', domNode: rootNode, showMutatedRequest: false, requestInterceptor, From eddd76554c45f9f64cf0416e9ec167c474431520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Thu, 9 Jan 2025 13:44:46 +0100 Subject: [PATCH 2/3] Restoring proper URL --- app/client/apiconsole.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/apiconsole.ts b/app/client/apiconsole.ts index f2a1a4189a..e843336035 100644 --- a/app/client/apiconsole.ts +++ b/app/client/apiconsole.ts @@ -331,7 +331,7 @@ createAppPage((appModel) => { swaggerUI = buildSwaggerUI({ filter: true, plugins: [gristPlugin.bind(null, appModel)], - url: 'http://127.0.0.1:8080/api/grist.yml', + url: 'https://raw.githubusercontent.com/gristlabs/grist-help/master/api/grist.yml', domNode: rootNode, showMutatedRequest: false, requestInterceptor, From 2865b7d8683c1897bd79974f010b356cfcc9eff0 Mon Sep 17 00:00:00 2001 From: jarek Date: Thu, 9 Jan 2025 14:55:13 +0100 Subject: [PATCH 3/3] Update app/client/apiconsole.ts Co-authored-by: Florent --- app/client/apiconsole.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/apiconsole.ts b/app/client/apiconsole.ts index e843336035..87a5d2c86b 100644 --- a/app/client/apiconsole.ts +++ b/app/client/apiconsole.ts @@ -117,7 +117,7 @@ function setParamValue(resolvedParam: any, value: ParamValue) { // For every endpoint in the spec... for (const [pathKey, path] of spec.get("paths").entries()) { for (const [method, operation] of path.entries()) { - // Skip the $ref for now, it is only used in `scim` endpoints witch don't share + // Skip the $ref for now, it is only used in `scim` endpoints which don't share // parameters with other endpoints. if (method === '$ref') { continue;