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>
Unique identifier for the resource.
Examples
Optional field
<ResponseField name="description" field-type="string">
Optional description text for the resource.
</ResponseField>
Optional description text for the resource.
Deprecated field
<ResponseField name="legacy_id" field-type="integer" deprecated="true">
Deprecated legacy identifier. Use `id` instead.
</ResponseField>
Deprecated legacy identifier. Use id instead.
Complex type
<ResponseField name="user" field-type="object" required="true">
User object containing profile information and preferences.
</ResponseField>
User object containing profile information and preferences.
Attributes
Field name displayed in the response documentation (default: "response").
Data type: string, integer, boolean, object, array, etc.
Set to "true" for required fields (default: "false").
Set to "true" to mark as deprecated (default: "false").
Last updated 1 week ago