Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion tools/cli/internal/openapi/filter/code_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func main() {
ctx := context.Background()
clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")


// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the main change

Copy link
Contributor

Choose a reason for hiding this comment

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

since touching it can you move it to a template file and embed it here? https://pkg.go.dev/embed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, thanks for the reminder

client, err := sdk.NewClient(
sdk.UseOAuthAuth(clientID, clientSecret),
sdk.UseBaseURL(url))
Expand Down
1 change: 1 addition & 0 deletions tools/cli/internal/openapi/filter/code_sample_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func TestCodeSampleFilter(t *testing.T) {
"\tctx := context.Background()\n" +
"\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n" +
"\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n" +
"\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n" +
"\tclient, err := sdk.NewClient(\n" +
"\t\tsdk.UseOAuthAuth(clientID, clientSecret),\n" +
"\t\tsdk.UseBaseURL(url))\n\n" +
Expand Down
111,958 changes: 55,979 additions & 55,979 deletions tools/cli/test/data/split/dev/openapi-v2-2023-01-01.json

Large diffs are not rendered by default.

113,466 changes: 56,733 additions & 56,733 deletions tools/cli/test/data/split/dev/openapi-v2-2023-02-01.json

Large diffs are not rendered by default.

Loading
Loading