-
Notifications
You must be signed in to change notification settings - Fork 30
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
Bugfix/python snippets #1718
Bugfix/python snippets #1718
Conversation
CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs
Outdated
Show resolved
Hide resolved
CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs
Outdated
Show resolved
Hide resolved
CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs
Outdated
Show resolved
Hide resolved
CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs
Outdated
Show resolved
Hide resolved
var snippetModel = new SnippetModel(requestPayload, ServiceRootUrl, await GetV1SnippetMetadata()); | ||
var result = _generator.GenerateCodeSnippet(snippetModel); | ||
Assert.Contains("request_body = Message(", result); | ||
Assert.Contains("received_date_time = \"2021-08-30T20:00:00:00Z\"", result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be translated to an equivalent python DateTime object? Or are they represented as strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default datetime package doesn't cover all the datetime formats well, so we leverage a third party package dateutil
for parsing during serialization/deserialization. If you pass a native datetime object, or a string both will work well.
…tor.cs Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
…tor.cs Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! |
Overview
Resolves bugs in Python Snippets
Fixes: microsoftgraph/microsoft-graph-explorer-v4#2738
Demo
Optional. Screenshots,
curl
examples, etc.Notes
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
Testing Instructions