Skip to content

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

Description

@O3cheng

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"`
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions