Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
enj opened this issue Jan 4, 2019 · 5 comments
Open

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

enj opened this issue Jan 4, 2019 · 5 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@enj
Copy link
Member

enj commented Jan 4, 2019

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
@mbohlool mbohlool added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jan 15, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 16, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 16, 2019
@enj
Copy link
Member Author

enj commented May 16, 2019

/remove-lifecycle rotten
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels May 16, 2019
@awgrass
Copy link

awgrass commented Oct 12, 2024

Does it make sense for me to tackle this as my first contribution?

@yongruilin
Copy link

Add the code link with SHA https://github.com/openshift/api/blob/86cb5b750830da685a27b7e983971270c9c6f5f6/servicecertsigner/v1alpha1/types.go#L15-L21

@enj Do you think we still need to handle this case as the API has changed to no embedding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

6 participants