You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
odo has a few gaps when it comes to JSON output. To be specific, the outputs are inconsistent at few places, incomplete at other, and overall unreliable as we keep changing things. Sometimes even between patch releases (z stream).
Part of this is attributed to not having API documentation and design; we keep adding/modifying/removing things as it dims fit to us at CLI level without much thought into how it would impact tooling created on top of odo. Another reason for this problem is that we never had, what @feloy described as, a "contract" that gave an idea about what to expect in terms of JSON output for various commands.
As mentioned in the original discussion linked above and conversation with @deboer-tim, we should return structs from the business logic layer such that:
if the CLI user requested JSON output, the CLI layer could simply marshal these structs into JSON
if the CLI user requested human-readable output, CLI layer could use these structs to construct one
Maybe getting too optimistic here, but this could also make odo usable as a library instead of just CLI.
This was originally discussed on #5293 (comment).
odo has a few gaps when it comes to JSON output. To be specific, the outputs are inconsistent at few places, incomplete at other, and overall unreliable as we keep changing things. Sometimes even between patch releases (z stream).
Part of this is attributed to not having API documentation and design; we keep adding/modifying/removing things as it dims fit to us at CLI level without much thought into how it would impact tooling created on top of odo. Another reason for this problem is that we never had, what @feloy described as, a "contract" that gave an idea about what to expect in terms of JSON output for various commands.
As mentioned in the original discussion linked above and conversation with @deboer-tim, we should return structs from the business logic layer such that:
Maybe getting too optimistic here, but this could also make odo usable as a library instead of just CLI.
/kind discussion