Skip to content

[bug]: Cannot specify the spec as being required #885

@jamescooke-xyz

Description

@jamescooke-xyz

Describe the bug

If I have required properties in my spec, adding the below will validate:

apiVersion: mycrd.io/v1
kind: MyResource
metadata:
  name: example
  namespace: default
spec: {}

But adding this will not:

apiVersion: mycrd.io/v1
kind: MyResource
metadata:
  name: example
  namespace: default
spec:

We need to be able to specify that the spec is required. Either by allowing us to overriding it and explicitly setting it as [Required], or by convention (if a child property is required).

To reproduce

Any CRD created using the Transpiler won't have the spec marked as required.

Expected behavior

An ability to mark the spec marked as required.

Screenshots

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions