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

When the maximum type is float64, using json.Unmarshal(raw, &spec.Swagger{}) will lose precision #201

Open
O3cheng opened this issue Aug 7, 2024 · 0 comments

Comments

@O3cheng
Copy link

O3cheng commented Aug 7, 2024

When the maximum type is float64, using json.Unmarshal(raw, &spec.Swagger{}) will lose precision

definitions:
  TestResponse:
    description: test
    type: object
    properties:
      test_1:
        description: test_1
        type: long
        format: int64
        **maximum: 9223372036854775807**
        minimum: 0

because

type SchemaProps struct {
	Maximum              *float64         `json:"maximum,omitempty"`
}
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

1 participant