prism
prism copied to clipboard
Mock server returns int64 value less than the lower limit
Describe the bug
The range of int64 is -9223372036854775808 (-2^63) ~ 9223372036854775807 (2^63-1), but the mock server seems to return -9223372036854776000 by default.
To Reproduce
- Install prism.
npm install -g @stoplight/prism-cli
- Start a mock server with the following command.
prism mock https://raw.githack.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml
- Call a REST API that returns a response containing an int64 value.
curl -X GET "http://localhost:4010/pets/1"
{"name":"string","tag":"string","id":-9223372036854776000}
Expected behavior
The mock server returns -9223372036854775808 or a value in the range of int64.
Additional context
Environment (remove any that are not applicable):
- Library version: 4.7.0
- OS: Pop!_OS 21.04
- Browser: Not using
- Platform: Desktop