cuelang / cue

CUE has moved to https://github.com/cue-lang/cue
https://cuelang.org
Apache License 2.0
3.09k stars 171 forks source link

cmd/cue: better document which filetypes are supported for import/export #1012

Closed myitcv closed 3 years ago

myitcv commented 3 years ago

Is your feature request related to a problem? Please describe.

cue help filetypes explains the filetypes that CUE is aware of. However it does not detail which filetypes are supported for import/export:

$ cue import jsonschema: github-workflow.json
$ cue export --out jsonschema github-workflow.cue
unsupported interpretation "jsonschema"

Describe the solution you'd like

Better documentation as part of cue help filetypes

Describe alternatives you've considered

At some point the level of detail required in cue help filetypes might well outgrow the presentation we can afford in a CLI. So perhaps it needs to move to a version-linked URL at some point... ?

On the back of this we should, per https://github.com/cuelang/cue/discussions/897#discussioncomment-794005, create issues for "missing" conversions.

myitcv commented 3 years ago

Here's what such a table might look like:

Tag Extensions Description Import Export
cue .cue CUE source files n/a n/a
json .json JSON files Y Y
yaml .yaml/.yml YAML files Y Y
jsonl .jsonl/.ldjson Line-separated JSON values ? ?
jsonschema JSON Schema Y N
openapi OpenAPI schema N Y
textproto .textproto Text-based protocol buffers ? ?
proto .proto Protocl Buffer definitions Y ?
go .go Go source files Via get go See below
text .txt Raw text file ? Y
binary Raw binary file ? ?

TODO:

cueckoo commented 3 years ago

This issue has been migrated to https://github.com/cue-lang/cue/issues/1012.

For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.