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

Fix paging via params for generated crates #1383

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

demoray
Copy link
Contributor

@demoray demoray commented Sep 15, 2023

This PR addresses generated crates that use next-link-name style paging, but the paging name refers to a parameter rather than a URL replacement. This fixes paging for the azure-svc-storageblobs.

Note: This PR is built on top of #1381. Until #1381 is merged, to review the unique changes for this PR, check out the last commit to this branch.

Brian Caswell added 3 commits September 15, 2023 10:27
This addresses a handful of XML parsing issues in generated crates.
1. Deserializing enum variants with the value being a string content (such as `<field>Value</field>`) needs a serde helper.
2. Deserializing attribute values (such as `<a b="foo"/>`) needs to the attribute name to be prefixed with `@` to indicate it's an attribute
3. Continuation tokens that are strings need to be considered the same as not having a continuation token

Additionally, this PR includes the following:
1. Regenerating the `azure_svc_blobstorage` crate for review
2. A unit test for `azure_svc_blobstorage` that validates the XML parsing works as intended
3. Updates to the `azure_svc_blobstorage` example such that it no longer silently swallows parsing issues

Once this PR is reviewed, I will submit a follow-on PR that includes regenerating the rest of the crates.

Ref: <https://docs.rs/quick-xml/latest/quick_xml/serde_helpers/text_content/index.html>
Ref: <https://docs.rs/quick-xml/latest/quick_xml/de/index.html#mapping-xml-to-rust-types>
@demoray demoray linked an issue Sep 15, 2023 that may be closed by this pull request
demoray pushed a commit to demoray/azure-sdk-for-rust that referenced this pull request Sep 15, 2023
This PR shows the results of regenerating the crates with Azure#1381 and Azure#1383 applied.
@demoray demoray merged commit bbe4230 into Azure:main Sep 18, 2023
19 checks passed
@demoray demoray deleted the fix-x-ms-paging-via-params branch September 18, 2023 03:25
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.

Blob Service Example fails with XML parse error
2 participants