Input/Output Structure
Control how input and output data is structured in your API.
Introduction
Input and output structures define how data is organized when procedures are executed, affecting how input data is processed and how output data is formatted in the HTTP response.
Note: You only need to define the input and output schemas according to your requirements. The example provided above is solely for demonstration purposes.
Input Structure Options
The inputStructure
option determines how the input data is structured based on params
, query
, headers
, and body
.
-
'compact': Combines
params
and eitherquery
orbody
(depending on the HTTP method) into a single object.- For example, in a GET request,
params
andquery
are combined. - In a POST request,
params
andbody
are combined.
- For example, in a GET request,
-
'detailed': Keeps each part of the request (
params
,query
,headers
, andbody
) as separate fields in the input object.
Output Structure Options
The outputStructure
option determines how the response is structured based on the output.
-
'compact': Includes only the body data, encoded directly in the response.
-
'detailed': Separates the output into
headers
andbody
fields.
Default Behavior
inputStructure
defaults to'compact'
outputStructure
defaults to'compact'