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

GetRetainedMessageResult getPayload documentation says that it returns a byte buffer that is base64 encoded, but it is in fact not #3651

Open
Meantub opened this issue Dec 17, 2024 · 1 comment
Labels
documentation In code. For issues with public website, move to https://github.com/aws-amplify/docs feature-request Request a new feature pending-maintainer-response Issue is pending response from an Amplify team member

Comments

@Meantub
Copy link

Meantub commented Dec 17, 2024

GetRetainedMessageResult.getPayload's Javadoc says that it is a base64 encoded byte buffer but there is a ByteBufferJsonUnmarshaller which in it's implementation decodes the incoming base64 byte buffer and returns the decoded byte buffer.

https://github.com/aws-amplify/aws-sdk-android/blob/225234b3f75a26ce50613ee2f7b46e0508000f28/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iotdata/model/GetRetainedMessageResult.java#L103C1-L114C6

Wasn't sure if the link above would render correctly so here is the code I am talking about

    /**
     * <p>
     * The Base64-encoded message payload of the retained message body.
     * </p>
     *
     * @return <p>
     *         The Base64-encoded message payload of the retained message body.
     *         </p>
     */
    public java.nio.ByteBuffer getPayload() {
        return payload;
    }

I think either modifying the documentation to reflect that this isn't a Base64 encoded buffer would work or perhaps creating and using a Base64EncodedByteBufferJsonUnmarshaller if we want the documentation to be the same as it is currently.

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Dec 17, 2024
@tylerjroach
Copy link
Member

The documentation is just codegenerated and matches what is provided in this link: https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetRetainedMessage.html#API_iotdata_GetRetainedMessage_ResponseSyntax

Will take a further look to see if we can do anything about this.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Dec 17, 2024
@tylerjroach tylerjroach added feature-request Request a new feature pending-maintainer-response Issue is pending response from an Amplify team member documentation In code. For issues with public website, move to https://github.com/aws-amplify/docs labels Dec 17, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation In code. For issues with public website, move to https://github.com/aws-amplify/docs feature-request Request a new feature pending-maintainer-response Issue is pending response from an Amplify team member
Projects
None yet
Development

No branches or pull requests

2 participants