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

Add support for JSON Schema-style additional fields #785

Closed
myitcv opened this issue Feb 20, 2021 · 1 comment
Closed

Add support for JSON Schema-style additional fields #785

myitcv opened this issue Feb 20, 2021 · 1 comment
Labels
FeatureRequest New feature or request
Milestone

Comments

@myitcv
Copy link
Contributor

myitcv commented Feb 20, 2021

In the v0.3.0-alpha6 release we confirmed that the semantics of pattern constraints would remain as is:

The spec recently included a change that proposed to use the JSON schema semantics for pattern constraints ([k]: v), rather than the old CUE semantics. To aid in the transition, cue fmt rewrote these fields to be enclosed in curly braces, which mimics the old semantics under these planned rules.

It has now been decided to keep the old semantics and stop rewriting old uses.

It went on to describe how the JSON Schema concept of additional fields would instead be added:

Instead we now intend to allow the JSON schema semantics additionally by writing [...k]: v. The nice thing here is that any pattern which is to be matched additionally, is now always preceded by a .... It also is a nicer generalization of the syntax.

This issue tracks the changes required for support of additional fields.

@cueckoo
Copy link

cueckoo commented Jul 3, 2021

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

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
Projects
None yet
Development

No branches or pull requests

2 participants