Skip to content

Generated Go schemas use inconsistent capitalization #113

@adamwg

Description

@adamwg

What happened?

Normally, when I generate Go schemas for the Kubernetes types (e.g., with crossplane dependency add k8s:v1.35.0), I get the following const generated:

// Defines values for ServiceAPIVersion.
const (
        ServiceAPIVersionV1 ServiceAPIVersion = "v1"
)

But sometimes the capitalization is different, which breaks compilation of any functions that use the const:

// Defines values for ServiceApiVersion.
const (
        ServiceApiVersionV1 ServiceApiVersion = "v1"
)

How can we reproduce it?

I'm not able to reproduce this consistently - most of the time the expected API is generated. However, I have seen the incorrect Api pop up more than once.

What environment did it happen in?

  • Crossplane CLI version: v2.3.2
  • Platform (e.g., linux/amd64): linux/amd64
  • Crossplane version (if applicable): n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions