The following is the minimum content required in a devfile.yaml file:

apiVersion: 1.0.0
metadata:
  name: che-in-che-out
projects:
  - name: che
    source:
      type: git
      location: 'https://github.com/eclipse/che.git'

For a complete devfile example, see Eclipse Che in Che devfile.yaml.

name or generateName must be defined

Both name and generateName are optional parameters, but at least one of them must be defined. See [generating-workspace-names_{context}].