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

Add +optional to optional fields #17

Closed
bobcatfish opened this issue Sep 7, 2018 · 1 comment · Fixed by #56
Closed

Add +optional to optional fields #17

bobcatfish opened this issue Sep 7, 2018 · 1 comment · Fixed by #56
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

The k8s API conventions explain that optional fields should have both the json omitempty directive and should have the +optional comment.

Actual Behavior

We are currently using only "omitempty" to indicate which fields are optional, e.g. a Pipeline's Task source bindings: https://github.com/knative/build-pipeline/blob/ef113e1d513c67b692eb1096904789be0e9616b6/pkg/apis/pipeline/v1beta1/pipeline_types.go#L55

Additional Info

@bobcatfish bobcatfish added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Sep 7, 2018
@nader-ziada
Copy link
Member

/assign @pivotal-nader-ziada

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. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants