Skip to content

docs: improving serialization docs - #1613

Merged
aludwiko merged 2 commits into
mainfrom
5200-wrong-documentation-of-typename
May 20, 2026
Merged

aludwiko merged 2 commits into
mainfrom
5200-wrong-documentation-of-typename

Conversation

@aludwiko

@aludwiko aludwiko commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added the documentation documentation related label May 19, 2026

@octonato octonato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, CI disagrees.

Questions, can you confirm that we rely on the expected typed whenever possible instead of always using the typeUrl?

@aludwiko

Copy link
Copy Markdown
Contributor Author

Questions, can you confirm that we rely on the expected typed whenever possible instead of always using the typeUrl?

Yes, we use TypeName only for events and workflow input for cases when it's an interface:

private def decodeInput(input: BytesPayload, expectedInputClass: Class[_]) = {
    if (input.isEmpty)
      null // input can't be empty, but just in case
    else if (expectedInputClass.isInterface)
      // if it's an interface, we must rely on the typeHint in the payload
      serializer.fromBytes(input)
    else
      // if a concrete type using expectedInputClass should be enough to deserialize it
      serializer.fromBytes(expectedInputClass, input)
  }

I think we could skip this detail in docs.

@patriknw patriknw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@aludwiko
aludwiko force-pushed the 5200-wrong-documentation-of-typename branch from c3f3733 to 6fa24c7 Compare May 20, 2026 07:21
@aludwiko
aludwiko merged commit bbb4a8c into main May 20, 2026
10 checks passed
@aludwiko
aludwiko deleted the 5200-wrong-documentation-of-typename branch May 20, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants