Semantic concepts support? #1890
Unanswered
domino-pablo-rodriguez
asked this question in
Ideas
Replies: 2 comments
-
@domino-pablo-rodriguez, Are you asking if cue can consume json/yaml and produce new json/yaml with additional fields based on the original? main.cue package main
// stub for imported yaml/josn
let data = {
name: "Guy"
email: "guy@gmail.com"
secret: "onetwothree"
}
// Extensions
{
data
extensions: {
password: "pw_\(data.secret)"
}
} cli
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@domino-pablo-rodriguez I think you are looking for attributes, but if you can expand with an example (in pseudo code) then we might be able to help further. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m currently evaluating CUE to use it for both yaml validation and semantic inference (similar to https://a.ml/docs/). From the documentation it seems like assigning a semantic meaning and querying is not supported. An example would be: be able to mark certaing bits of a yaml/json configuration file as a “Secret” (and define other concepts that can inherit from this, such as a password, token, keys, etc) and be able to query them (for example to redact them). This semantic meaning is orthogonal to the schema values (a string could be a secret, or a more complex struct). So my question is (maybe to the owners of the spec), do you envision that CUE could fit this use case?
Beta Was this translation helpful? Give feedback.
All reactions