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

Feature: Add Xml library #3035

Merged
merged 39 commits into from
Apr 9, 2024
Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Mar 20, 2024

Add xml library following the approved design.
fix #2970

Only minor change was inverting the parmaeters for @ns(namespace, prefix instead of @namespace(prefix, namespace) which makes it clearer with the other overload @ns(namespace: EnumMember)

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 20, 2024

All changed packages have been documented.

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3035/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3035/

Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

A few minor nits.

packages/xml/src/decorators.ts Show resolved Hide resolved
packages/xml/src/lib.ts Outdated Show resolved Hide resolved
packages/xml/src/lib.ts Outdated Show resolved Hide resolved
packages/xml/src/lib.ts Outdated Show resolved Hide resolved
@mpodwysocki
Copy link
Member

@timotheeguerin do we have any plans for CDATA support or would that be intrinsic to the encoding and decoding to decide whether one belongs? For example, Notification Hubs stores various things in CDATA sections such as template bodies and other information. Or is that a follow on item to this?

@timotheeguerin
Copy link
Member Author

@timotheeguerin do we have any plans for CDATA support or would that be intrinsic to the encoding and decoding to decide whether one belongs? For example, Notification Hubs stores various things in CDATA sections such as template bodies and other information. Or is that a follow on item to this?

Yeah this was left as a follow up, or as a serializer job. Current goal was to get parity with openapi for now. If you have some particular idea in mind on how specifying some data info would cover some use cases I would file a new issue with the example.

docs/libraries/xml/guide.md Outdated Show resolved Hide resolved
docs/libraries/xml/guide.md Outdated Show resolved Hide resolved
docs/libraries/xml/guide.md Outdated Show resolved Hide resolved
docs/libraries/xml/reference/index.mdx Show resolved Hide resolved
packages/xml/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/xml/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/xml/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/xml/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/xml/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/xml/lib/types.tsp Outdated Show resolved Hide resolved
timotheeguerin and others added 15 commits April 9, 2024 10:09
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
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.

Simple XML support
5 participants