Settings

Theme

Show HN: Crd-to-sample-YAML is v1.0.0 with a ton of features

github.com

1 points by skarlso a year ago · 0 comments · 2 min read

Reader

Hello! :)

This project of mine has grown quite a bit now. It has a TON if features and today, I'm happy to say that it reached maturity and entered v1.0.0 major version.

With this latest version, the WASM frontend got a live editor in which you can play around with the CRD JSON schema and find out how it looks like on the fly.

It can also generate a JSON schema now from the CRD that can be used for auto-completion offering your users an additional nicety to show them that your CRDs can be autocompleted.

It's also offering support for all types, not just CRDs, that follow the this YAML structure:

    # top level spec field
    spec:
      names:
        kind: # this should be the kind of the generated object
      group: # the group of the generated object
      # optional version field 
      versions:
        - name: v1alpha1
          # OpenAPI schema (like the one used by Kubernetes CRDs). Determines what fields
          # the XR (and claim) will have. Will be automatically extended by crossplane.
          # See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/
          # for full CRD documentation and guide on how to write OpenAPI schemas
          schema:
            openAPIV3Schema:
      # optional validation field describing all versions
      validation:
        openAPIV3Schema:
It's all unstructured in the background so it _should_ work ( please report any errors... ).

For more information checkout out the release notes and the README.

Happy generating!

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection