Skip to content

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Jun 4, 2025

Proposed changes

CLOUDP-322242

Description

This PR adds curl request examples using Service account to all the endpoints.

Screenshot 2025-06-04 at 17 05 52

{
Lang: "cURL",
Label: "curl",
Label: "curl (Service Account)",
Copy link
Collaborator Author

@andreaangiolillo andreaangiolillo Jun 4, 2025

Choose a reason for hiding this comment

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

all test.go files were updated for e2e tests


echo "Running FOAS CLI versions command"
foascli versions -s openapi-foas.json -o ./openapi/v2/versions.json --env "${target_env:?}" --stability-level stable --stability-level preview
foascli versions -s openapi-foas.json -o ./openapi/v2/versions.json --env "${target_env:?}" --stability-level stable --stability-level preview --stability-level upcoming
Copy link
Collaborator Author

@andreaangiolillo andreaangiolillo Jun 4, 2025

Choose a reason for hiding this comment

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

drive by fix to list upcoming api versions in the version.json file

Comment on lines +134 to +135
f.newServiceAccountCurlCodeSamplesForOperation(pathName, opMethod),
f.newDigestCurlCodeSamplesForOperation(pathName, opMethod),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the main change is here

@andreaangiolillo andreaangiolillo marked this pull request as ready for review June 4, 2025 13:14
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner June 4, 2025 13:14
@andreaangiolillo andreaangiolillo requested a review from gssbzn June 4, 2025 13:37
@andreaangiolillo andreaangiolillo requested a review from gssbzn June 4, 2025 13:49

return codeSample{
Lang: "cURL",
Label: "curl (Service Account Access Token)",
Copy link
Member

Choose a reason for hiding this comment

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

could the label be shorter but still helpful?

Copy link
Collaborator Author

@andreaangiolillo andreaangiolillo Jun 4, 2025

Choose a reason for hiding this comment

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

CC @gssbzn since he proposed the name (before it was Service Account). Is Service Account too generic? Could Service Account mean something else than Access Token in this context?

Copy link
Member

Choose a reason for hiding this comment

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

i was about to propose that :-) if you see the screenshot in the PR description, it seems too long, but ok if we think this is the shortest label that makes it understable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see in the Spec we have Service accounts (oauth2) (https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/) so I can use Service accounts - oauth2 which is shorter but still long.
I am going to update it to Service accounts - oauth2 for consistency and see if it is still too long.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I asked our PM for his preference in https://mongodb.slack.com/archives/C02FHQ614UR/p1749032541122489. Let's wait and see

Copy link
Contributor

Choose a reason for hiding this comment

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

my fear with just service account is that you don't use the service account you need to get an access token, it would be good if we could link to how to get the access token but I'm not sure if that's possible on examples

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

would be good if we could link to how to get the access token but I'm not sure if that's possible on examples

This is the only way I have to add link:

Screenshot 2025-06-04 at 16 35 36

Copy link
Contributor

Choose a reason for hiding this comment

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

works for me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Stephen's feedback
073f8eb

  1. Use the name "Service Accounts" for curl examples
  2. Include the AtlasCLI example first in the list

1) Use the name "Service Accounts" for curl examples
2) Include the AtlasCLI example first in the list
@andreaangiolillo andreaangiolillo merged commit c7188d1 into main Jun 4, 2025
11 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-322242 branch June 4, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants