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

Items fields in List types do not need annotations #185

Closed
lavalamp opened this issue Jan 29, 2020 · 8 comments
Closed

Items fields in List types do not need annotations #185

lavalamp opened this issue Jan 29, 2020 · 8 comments
Assignees

Comments

@lavalamp
Copy link
Member

https://github.com/kubernetes/kube-openapi/blob/master/pkg/generators/rules/idl_tag.go#L25

This code needs to make an exception for List types (served as a result of a LIST verb and never a target for a mutating operation).

If:

  • There's a Metadata v1meta.ListMeta sibling field AND
  • The field is named "Items" and is a list of something

Then we should actually require that people NOT include a listType= annotation. (and ideally, suppress emitting the tag in the resulting openapi spec)

Why? Otherwise people have to add an exception for this, and I don't want people doing that for nothingburgers, it's bad karma.

@apelisse
Copy link
Member

/wg apply

@apelisse
Copy link
Member

/cc @mariantalla

@mariantalla
Copy link
Contributor

/assign

@mariantalla
Copy link
Contributor

Closing this, let's reopen if needed.

/close

@k8s-ci-robot
Copy link
Contributor

@mariantalla: Closing this issue.

In response to this:

Closing this, let's reopen if needed.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lavalamp
Copy link
Member Author

lavalamp commented Feb 4, 2020 via email

@apelisse
Copy link
Member

apelisse commented Feb 4, 2020

Yeah, I suspect that's also going to force us to remove a lot of the "exceptions", which is always good.

@apelisse
Copy link
Member

apelisse commented Feb 4, 2020

@mariantalla Do you want to take care of it? (not today ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants