apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: foos.bar.baz
spec:
  group: bar.baz
  names:
    kind: Foo
    listKind: FooList
    plural: foos
    singular: foo
  scope: Cluster
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            $schema: http://json-schema.org/draft-06/schema#
            description: Spec of the Foo
            properties:
              bar:
                type: string
              baz:
                type: integer
            required:
            - bar
            - baz
            type: object
          status:
            $schema: http://json-schema.org/draft-06/schema#
            description: Status of the Foo
            properties:
              corge:
                type: number
              qux:
                type: boolean
            type: object
        type: object
    served: true
    storage: true