Add directives for Python object deserialization#3343
Conversation
Automation for azure-sdk-for-pythonA PR has been created for you: |
|
The schema of "table" object in the response should be array of array of "any" value type, but is actually array of array of strings. AFAIK, autorest still doesn't have a way to do this that is universal to all clients. On a per language basis I've looked at how to address this. For Python we can model this as an "object" type, producing the desired wildcard behavior. Also overriding the client name. It's outdated branding, see also my comment in #3269 (diff) @lmazuel FYI |
Automation for azure-sdk-for-goNothing to generate for azure-sdk-for-go |
Automation for azure-sdk-for-nodeA PR has been created for you: |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
Automation for azure-sdk-for-rubyNothing to generate for azure-sdk-for-ruby |
|
@lmazuel @annatisch could one of you take this PR? I have no idea about python directives. |
|
@alexeldeib Sounds good to me! @amarzavery @sarangan12 This is designed for "not strong types language" like Python and might interest you as well for NodeJS / Ruby. Maybe TS @RikkiGibson . This changes a model type from "string" to "object" using a transform rule (won't work on C#) to keep the value in the JSON "as-is" and don't stringify it. |
|
Ah, so does this transform make it so you don't just get a string of JSON-encoded data, but instead get the raw object tree returned by JSON.parse or the equivalent in the particular language? |
|
@RikkiGibson correct. Because it can be integer, float, string, etc. exact types depends (I think of it as "excel cell content" analogy). Type is basic types enough so just showing the raw JSON value is enough. |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger