-
Notifications
You must be signed in to change notification settings - Fork 408
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Add format for float types #566
Conversation
Signed-off-by: Tamal Saha <tamal@appscode.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tamalsaha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
Relevant issue is #245 and it doesn't seem clear if we should allow this or not. The kube api conventions excplicitly mention not to allow floats in spec: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#primitive-types /hold |
@alvaroaleman possibly worth seeing discussion on #449 for history. |
case types.Float32: | ||
format = "float" | ||
case types.Float64, types.UntypedFloat: | ||
format = "double" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tamalsaha,
That is nice. But did you check the comment on top of this method? See:
// builtinToType converts builtin basic types to their equivalent JSON schema form.
// It *only* handles types allowed by the kubernetes API standards. Floats are not
// allowed unless allowDangerousTypes is true
In this way, I understand that we cannot add the floats here.
Signed-off-by: Tamal Saha tamal@appscode.com
https://swagger.io/docs/specification/data-models/data-types/#numbers