Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document SCIM again #458

Merged
merged 8 commits into from
Dec 20, 2024
Merged

Conversation

fflorent
Copy link
Collaborator

Restore #434 fixing the issue with the SCIM API yaml.

Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for grist-help-preview ready!

Name Link
🔨 Latest commit 2d344f3
🔍 Latest deploy log https://app.netlify.com/sites/grist-help-preview/deploys/676451c608ed5900084f6c18
😎 Deploy Preview https://deploy-preview-458--grist-help-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fflorent
Copy link
Collaborator Author

fflorent commented Dec 17, 2024

Reproducing the issue

To reproduce the original issue, you need to pull grist-core and apply this patch:

diff --git a/app/client/apiconsole.ts b/app/client/apiconsole.ts
index 98bb59c0..3c6ae38b 100644
--- a/app/client/apiconsole.ts
+++ b/app/client/apiconsole.ts
@@ -327,7 +327,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: 'https://raw.githubusercontent.com/gristlabs/grist-help/b92a123677ee9d5b581b3edfd1f5c263d17bc54e/api/grist.yml',
       domNode: rootNode,
       showMutatedRequest: false,
       requestInterceptor,

Checking whether the fix works

You may check whether the fix works by applying this patch:

diff --git a/app/client/apiconsole.ts b/app/client/apiconsole.ts
index 98bb59c0..6b13a660 100644
--- a/app/client/apiconsole.ts
+++ b/app/client/apiconsole.ts
@@ -327,7 +327,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: 'https://raw.githubusercontent.com/gristlabs/grist-help/2d344f32d9fccbb32195c4ffa7cc5894c39ce76f/api/grist.yml',
       domNode: rootNode,
       showMutatedRequest: false,
       requestInterceptor,

I will make a self-review tomorrow. If you anyone wants to review until then, they are welcome

@fflorent fflorent marked this pull request as ready for review December 18, 2024 09:42
@fflorent fflorent requested a review from hexaltation December 18, 2024 09:56
Copy link
Collaborator

@hexaltation hexaltation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick in ENV variables descriptions

Below is a list of environment variables you may use to configure SCIM:

- `GRIST_ENABLE_SCIM`: set its value to `true` so you enable the SCIM endpoints.
- `GRIST_SCIM_USER`: (optional) give this variable the email address of an account to give it access to the SCIM endpoints.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `GRIST_SCIM_USER`: (optional) give this variable the email address of an account to give it access to the SCIM endpoints.
- `GRIST_SCIM_USER`: (optional) give this variable the email address of an account to give to it access to the SCIM endpoints.

Copy link
Collaborator Author

@fflorent fflorent Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree, we should say give [someone/something] access. It's ditransitive (source)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the wiktionary gives the example of the give verb for the ditransitivity:

(of a verb) taking two objects, such as give in “Give me the ball” (where me is an indirect object and the ball is a direct object). Compare intransitive, transitive, and ambitransitive verbs.


## The API

The SCIM implementation is documented in the [Grist Rest API reference](/api/#tag/scim).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The SCIM implementation is documented in the [Grist Rest API reference](/api/#tag/scim).
The SCIM implementation is documented in the [Grist REST API reference](/api/#tag/scim).

summary: Retrieve list of users
operationId: getUsers
tags:
- users
Copy link
Collaborator Author

@fflorent fflorent Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the users tag. Makes everything redundant in the API documentation.

Same below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add the endpoint so it is referenced in the left menu
image

Copy link
Collaborator

@hexaltation hexaltation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎅

@fflorent fflorent merged commit 62857c1 into gristlabs:master Dec 20, 2024
5 checks passed
@fflorent fflorent deleted the document-scim-again branch December 20, 2024 21:25
@fflorent
Copy link
Collaborator Author

Thank you @hexaltation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants