There is no Server type checking for URI parameters

Introduction

There is no Server type checking for URI parameters. This is because URI parameters are always passed as strings, and therefore there is no way to check the datatype.

Note: This was not a design decision that we made — instead it is part of the HTTP method design standards, URI parameters are always passed as text.

Issue [top]

There is no Server type checking for URI parameters.

Solution [top]

If you need type checking on your parameters you can simply use Structured Body instead — which is passed as JSON and includes type information. Be aware that the Structured Body is not available for all HTTP methods, they are only supported for: POST, PATCH and PUT.

How it Works [top]

This is because URI parameters are are always passed as strings (because they are part of the HTTP URI request). Therefore there is no way for the Server to identify the datatype (of the incoming string data) and check that it matches the API specification. This was not a design decision that we made — instead it is part of the HTTP method design standards, URI parameters are always passed as text.

Leave A Comment?