autorest icon indicating copy to clipboard operation
autorest copied to clipboard

Support Base64Url format

Open tbombach opened this issue 10 years ago • 4 comments

AutoRest modeler supports a base64url format for string types. This is implemented in some languages, but requires serialization/deserialization code in some remaining languages.

This issue: https://github.com/Azure/autorest/issues/805 tracked the changes needed in the modeler. It was implemented in C# in this PR: https://github.com/Azure/autorest/pull/878

Here is the specification for Base64Url format: https://tools.ietf.org/html/rfc4648#page-7

tbombach avatar Jun 03 '16 16:06 tbombach

@jianghaolu I've assigned this to you for the Java implementation, but please re-assign to someone else if they're going to end up doing this work.

tbombach avatar Jun 03 '16 17:06 tbombach

Thanks @tbombach

jianghaolu avatar Jun 03 '16 17:06 jianghaolu

@jianghaolu there are issues with the solution when generating the code.

Error with :

    public byte[] result() {
        if (this.result == null) {
            return null;
        }
        return this.result.getbyte[]();
    } 

Error for not accepting byte[] in the constructor of Base64Url:

    public KeyOperationsParameters withValue(byte[] value) {
        this.value = new Base64Url(value);
        return this;
    } 

pomortaz avatar Jul 18 '16 16:07 pomortaz

This is tracked in https://github.com/Azure/azure-sdk-for-go/issues/2111.

jhendrixMSFT avatar Nov 12 '18 19:11 jhendrixMSFT