What version of Effect is running?
4.0.0-rc.108
What steps can reproduce the bug?
Run the same Effect Play example with these versions:
The example calls OpenApi.fromApi twice for an API whose OpenAPI transform adds a
JSON.rawJSON("9223372036854775807") value.
What is the expected behavior?
Both calls should serialize the value as the exact JSON number:
{"value":9223372036854775807}
What do you see instead?
In 4.0.0-rc.108, the first call is correct, but the cached second call serializes:
{"value":{"rawJSON":"9223372036854775807"}}
4.0.0-beta.107 serializes the exact JSON number on both calls.
Additional information
This appears to be caused by cloneOpenAPISpec, added in #6550. The clone copies the enumerable rawJSON property into a plain object and loses the special JSON.rawJSON behavior.
What version of Effect is running?
4.0.0-rc.108
What steps can reproduce the bug?
Run the same Effect Play example with these versions:
4.0.0-beta.107: https://www.effect.website/play#9cf62c4c6bea4.0.0-rc.108: https://www.effect.website/play#557f76a45080The example calls
OpenApi.fromApitwice for an API whose OpenAPI transform adds aJSON.rawJSON("9223372036854775807")value.What is the expected behavior?
Both calls should serialize the value as the exact JSON number:
What do you see instead?
In
4.0.0-rc.108, the first call is correct, but the cached second call serializes:4.0.0-beta.107serializes the exact JSON number on both calls.Additional information
This appears to be caused by
cloneOpenAPISpec, added in #6550. The clone copies the enumerablerawJSONproperty into a plain object and loses the specialJSON.rawJSONbehavior.