Skip to content

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

@O3cheng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions