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

Do we really support application/xml? #2055

Closed
darrelmiller opened this issue Dec 11, 2022 · 5 comments
Closed

Do we really support application/xml? #2055

darrelmiller opened this issue Dec 11, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities.
Milestone

Comments

@darrelmiller
Copy link
Member

The default value for --structured-mime-types includes the following:

  "structuredMimeTypes": [
    "application/json",
    "application/xml",
    "text/plain",
    "text/xml",
    "text/yaml"
  ],

Do we really support serialization of application/xml? Are the text/yaml and text/xml processed by the text serializer? Does the method signature accept/return as a string?

@baywet
Copy link
Member

baywet commented Dec 11, 2022

We support the generation of models. However we don't have serialization and deserialization implementations today.

@baywet baywet added enhancement New feature or request generator Issues or improvements relater to generation capabilities. labels Dec 11, 2022
@baywet baywet added this to the Kiota post-GA milestone Dec 11, 2022
@baywet baywet assigned darrelmiller and baywet and unassigned baywet and darrelmiller Dec 12, 2022
@baywet
Copy link
Member

baywet commented Dec 15, 2022

FYI I've removed those mime types from the default supported ones in #2078
I guess we should now rename this issue to add serialization support for those types.

@darrelmiller
Copy link
Member Author

I am happy with this change. I don't believe we need to have inbox support for XML.

@julealgon
Copy link

@darrelmiller is there documentation around creating and registering custom serializers for Kiota that you could share? Our team has just hit a situation where we wanted to use Kiota proxies with a XML-based API.

From your comment above, I assume creating a serializer for XML and plugging it in should be a supported extension point.

@andrueastman
Copy link
Member

@julealgon

For serialization you would need to implement these two interfaces.

For deserialization

Once this is done, you will register the serializer and deserializer as is done here with the client and you should be able to make requests.

https://github.com/microsoft/kiota-samples/blob/dc238d655fc0e7fb3d1886affd95cd663385329c/msgraph-mail/dotnet/ApiClient.cs#L32

You can also checkout the example implementation for form serialization here for inspiration.

https://github.com/microsoft/kiota-dotnet/tree/main/src/serialization/form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities.
Projects
Archived in project
Development

No branches or pull requests

4 participants