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

Document command output structure #953

Closed
christophermaier opened this issue Sep 15, 2016 · 5 comments
Closed

Document command output structure #953

christophermaier opened this issue Sep 15, 2016 · 5 comments
Assignees

Comments

@christophermaier
Copy link
Collaborator

Commands can return JSON objects, but to enable the efficient construction of pipelines, users should be able to quickly determine the structure of those objects, so they can know exactly how to extract the data they care about.

A first pass at this could be providing an OUTPUT section in the structured documentation. Having some way to actually ensure that the documented output is the same as the generated output would be ideal, but that's likely a bigger task.

Related: #948

@kevsmith kevsmith added this to the Cog 0.16 milestone Oct 10, 2016
@kevsmith kevsmith modified the milestones: Cog 0.16, Cog 0.17 Oct 31, 2016
@vanstee vanstee self-assigned this Dec 2, 2016
@vanstee
Copy link
Member

vanstee commented Dec 2, 2016

@christophermaier Do you think a freeform text attribute named output for each command would be good enough here.

@christophermaier
Copy link
Collaborator Author

@vanstee I think that'll be good for a first pass. If we ever get some kind of automated verification wired up (still not sure how we'd accomplish that, though), then having it be something like JSON Schema would make sense, but absent that, I don't think we gain anything by imposing any more structure than "arbitrary text".

TL;DR - 👍

@vanstee
Copy link
Member

vanstee commented Dec 2, 2016

Cool. Yeah, agreed that a JSON schema would be interesting eventually.

@christophermaier
Copy link
Collaborator Author

@vanstee That being said, if it's possible to easily permit the value to be text or a map, then users could have a bit of flexibility in how they choose to describe things.

@christophermaier
Copy link
Collaborator Author

Capturing some out-of-band discussion on this: we're just going to stick with plain text for now, since commands can dynamically change the structure they return based on arbitrary criteria. It'll be easier for now to explain "the output looks like this if you call a command this way, but like that if you call it that way" with text.

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

No branches or pull requests

3 participants