This Commented CUE demonstrates how to disallow specific data fields inside an otherwise open schema.

file.cue
package example

// This schema is open because we do not know
// which additional fields might be present.
name!:    string
address!: string

// We must not allow our data model to contain
// people's ages, so we disallow the age field.
age?: _|_
data.yaml
name: Charlie Cartwright
address: Ripon, North Yorkshire
species: cat
age: 15.5
TERMINAL
$ cue vet . data.yaml
explicit error (_|_ literal) in source:
    ./file.cue:10:7

Another common way to prevent the existence of unwanted data fields is to rely on the closedness property that comes from the use of definitions or the close built-in function. However, in situations such as the example above, closedness cannot be used to disallow specific fields because the schema author cannot specify each and every acceptable field - and therefore the schema must be left open.