Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

cmd/cue: add doc command #998

Closed
myitcv opened this issue May 24, 2021 · 4 comments
Closed

cmd/cue: add doc command #998

myitcv opened this issue May 24, 2021 · 4 comments
Labels
FeatureRequest New feature or request Triage Requires triage/attention

Comments

@myitcv
Copy link
Contributor

myitcv commented May 24, 2021

This has been discussed many times in passing in other issues/discussions/Slack messages; creating an issue to track the addition of a cue doc command.

Would be similar in nature to go doc

@myitcv myitcv added the FeatureRequest New feature or request label May 24, 2021
@jugaadi
Copy link

jugaadi commented May 24, 2021

JSON Schema supports annotations like title, description and comments while OpenAPI(v3.1) supports summary, and tags along with existing JSON Schema annotations.

A special attribute for documentation like @doc would be helpful to resolve the doc metadata as well as the multiline docstring(or comment) below it.

@myitcv
Copy link
Contributor Author

myitcv commented May 24, 2021

@jugaadi - can you explain what you are trying to achieve here? Because it sounds like you are trying to extract documentation about certain identifiers/packages? That being the case, I suspect working with cue/ast is what you are after. Or alternatively, cue.Value.Doc() depending on how you are working with CUE.

@jugaadi
Copy link

jugaadi commented May 24, 2021

Sorry for the misunderstanding.. Actually I was just stating my requirement for the feature. Just like JSONSchema/OpenAPI support all these constructs for documentation, it would be really helpful if cue docs support more than just line comments. For example, OpenAPI description fields support CommonMark formatting to render rich text in the generated docs.

In order to do this, I was wondering whether an attribute(@doc) is the right way to go about it so that doc tooling can take advantage of additional metadata that can be passed along with it.

@myitcv myitcv added the Triage Requires triage/attention label May 29, 2021
@cueckoo
Copy link

cueckoo commented Jul 3, 2021

This issue has been migrated to cue-lang/cue#998.

For more details about CUE's migration to a new home, please see cue-lang/cue#1078.

@cueckoo cueckoo closed this as completed Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest New feature or request Triage Requires triage/attention
Projects
None yet
Development

No branches or pull requests

3 participants