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

Include Python snippets tab #2564

Merged
merged 7 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
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 config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');

Check warning on line 4 in config/webpack.config.js

View workflow job for this annotation

GitHub Actions / Lint

'resolve' is assigned a value but never used

Check warning on line 4 in config/webpack.config.js

View workflow job for this annotation

GitHub Actions / Lint

'resolve' is assigned a value but never used
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
Expand Down Expand Up @@ -425,7 +425,8 @@
'csharp',
'html',
'powershell',
'go'
'go',
'python'
]
}),
// Generates an `index.html` file with the <script> injected.
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/actions/snippet-action-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getSnippet(language: string) {
if (language !== 'csharp') {
snippetsUrl += `?lang=${language}`;
}
const openApiSnippets: string[] = ['go', 'powershell'];
const openApiSnippets: string[] = ['go', 'powershell', 'python'];
if (openApiSnippets.includes(language)) {
snippetsUrl += '&generation=openapi';
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/query-response/snippets/Snippets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function GetSnippets() {
'JavaScript': {
sdkDownloadLink: 'https://aka.ms/graphjssdk',
sdkDocLink: 'https://aka.ms/sdk-doc'
},
Onokaev marked this conversation as resolved.
Show resolved Hide resolved
Onokaev marked this conversation as resolved.
Show resolved Hide resolved
'Python': {
sdkDownloadLink: 'https://aka.ms/msgraphpythonsdk',
sdkDocLink: 'https://aka.ms/sdk-doc'
}
};

Expand Down
Loading