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

ChannelDetails docs are misleading #1456

Open
owenpearson opened this issue Jun 13, 2022 · 0 comments
Open

ChannelDetails docs are misleading #1456

owenpearson opened this issue Jun 13, 2022 · 0 comments

Comments

@owenpearson
Copy link
Member

owenpearson commented Jun 13, 2022

The ChannelDetails type is used for both the channel status REST API and for lifecycle events sent with the channel.lifecycle reactor source. In the former case the region and isGlobalMaster fields are always absent and the ChannelDetails.status and ChannelDetails.status.occupancy fields are always present, however this is not true for the latter case. It is not possible from the docs to infer this so one might assume when using the REST API that ChannelDetails.status might not be returned (as has happened here #1455).

We could avoid this confusion by doing either of the following:

  1. Document two separate types for each of these cases - these types could still share the underlying Occupancy type.
  2. Add a paragraph to the docs for ChannelDetails to explain when each optional field will be present.

I personally think 1 would be much better but 2 would obviously require less work.

┆Issue is synchronized with this Jira Task by Unito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant