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

Base64Url is not an AutoRest supported type #805

Closed
pomortaz opened this issue Mar 5, 2016 · 5 comments
Closed

Base64Url is not an AutoRest supported type #805

pomortaz opened this issue Mar 5, 2016 · 5 comments
Assignees
Milestone

Comments

@pomortaz
Copy link

pomortaz commented Mar 5, 2016

Key Vault REST API for data-plane has data type of Base64Url encoding
e.g. https://msdn.microsoft.com/en-us/library/azure/dn878060.aspx

However, this type is not supported by Swagger. Is it possible to add a Microsoft Azure Extension to allow for supporting Base64Url type? Otherwise, Key Vault data-plane SDK cannot be generated using AutoRest.

@stankovski stankovski added the bug label Mar 5, 2016
@stankovski
Copy link
Member

It's a bug. Swagger supports base64 formatted string via "byte" format (http://swagger.io/specification)

@pomortaz
Copy link
Author

pomortaz commented Mar 7, 2016

Base64Url is very similar to Base64, except that the value encoding for characters 62 and 63 is different as it is explained in https://tools.ietf.org/html/rfc4648#page-7.

Previously, Key Vault data plane SDK, was wrapping the hydra generated codes to enable data type conversion of byte to Base64URL. However, since AutoRest supports Base64, having an additional data type of Base64Url seems possible.
This is how Key Vault is currently doing the byte to Base64Url conversion.

@NiklasGustafsson
Copy link
Contributor

Maybe this is best addressed by adopting the convention that if the format is 'byte,' i.e. base64-encoded, and the parameter is a query or path parameter, then it's base64URL instead of standard base64?

@markcowl
Copy link
Member

Is this always going to occur in the url of the method, or can properties in the body include such an encoding?

@pomortaz
Copy link
Author

Properties of type Base64Url encoding are in the body of the requests.

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

No branches or pull requests

5 participants