Skip to content

Having the same type embedded more than once breaks generation #129

@enj

Description

@enj

ServiceServingCertSignerConfig embeds metav1.TypeMeta and configv1.GenericControllerConfig: https://github.com/openshift/api/blob/master/servicecertsigner/v1alpha1/types.go#L15-L21

At the time, configv1.GenericControllerConfig also embedded metav1.TypeMeta, which led to:

func schema_openshift_api_servicecertsigner_v1alpha1_ServiceServingCertSignerConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
    return common.OpenAPIDefinition{
        Schema: spec.Schema{
            SchemaProps: spec.SchemaProps{
                Description: "ServiceServingCertSignerConfig provides information to configure a serving serving cert signing controller",
                Properties: map[string]spec.Schema{
                    "kind": {
                        SchemaProps: spec.SchemaProps{
                            Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
                            Type:        []string{"string"},
                            Format:      "",
                        },
                    },
                    "apiVersion": {
                        SchemaProps: spec.SchemaProps{
                            Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
                            Type:        []string{"string"},
                            Format:      "",
                        },
                    },
                    "kind": {
                        SchemaProps: spec.SchemaProps{
                            Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
                            Type:        []string{"string"},
                            Format:      "",
                        },
                    },
                    "apiVersion": {
                        SchemaProps: spec.SchemaProps{
                            Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
                            Type:        []string{"string"},
                            Format:      "",
                        },
                    },
pkg/openapi/zz_generated.openapi.go:24107:6: duplicate key "kind" in map literal
pkg/openapi/zz_generated.openapi.go:24114:6: duplicate key "apiVersion" in map literal

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions