Skip to content

HTTP interceptor strict JSON validation #106

@diego-aquino

Description

@diego-aquino

As of v0.2.x, JSON bodies are not completely statically validated. This allows defining bodies using non-JSON values, such as Date and Error.

This issue means to add strict JSON validation to interceptor declarations. Unfortunately, it won't be possible to declare body types using raw TypeScript interface's, because they do not have automatic index signatures as type's. See microsoft/TypeScript#15300 for more information.

microsoft/TypeScript#1897 proposes a native json type, which might help in the future. Right now, though, the interface vs type problem seems unsolvable natively.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions