Components
Response Field
Reference for documenting API response fields with types, requirements, and status indicators.
Basic syntax
Use the <ResponseField> component to document API response fields with their type and status.
ResponseField is similar to ParamField but specifically designed for documenting API response fields and returned data structures.
<ResponseField name="id" field-type="string" required="true">
Unique identifier for the resource.
</ResponseField>
idstring
RequiredUnique identifier for the resource.
Examples
Optional field
<ResponseField name="description" field-type="string">
Optional description text for the resource.
</ResponseField>
descriptionstring
Optional description text for the resource.
Deprecated field
<ResponseField name="legacy_id" field-type="integer" deprecated="true">
Deprecated legacy identifier. Use `id` instead.
</ResponseField>
legacy_idinteger
DeprecatedDeprecated legacy identifier. Use id instead.
Complex type
<ResponseField name="user" field-type="object" required="true">
User object containing profile information and preferences.
</ResponseField>
userobject
RequiredUser object containing profile information and preferences.
Attributes
namestring
Field name displayed in the response documentation (default: "response").
field-typestring
Data type: string, integer, boolean, object, array, etc.
requiredstring
Set to "true" for required fields (default: "false").
deprecatedstring
Set to "true" to mark as deprecated (default: "false").