The Status Codes widget in Theneo's web editor is a feature that allows you to document the HTTP status codes that your API might return. This helps users understand the responses they receive from your API. Here's a guide to using this widget effectively:
Insert the Widget: Navigate to the section in your documentation where you want to list the status codes. Start a new line, type /status codes, and select the Status Codes widget from the dropdown menu.
Add Status Codes: Use the Add button to insert new entries for each status code your API uses. For each status code, provide:
The status code number (e.g., 200, 400, 404, etc.).
A brief title for the status code (e.g., OK, Bad Request, Not Found).
A clear description explaining when this status code is returned and what it signifies.
Utilize the Library: As you type the status code, you'll notice that Theneo's library suggests existing status codes as a reference. This helps maintain consistency and accuracy in your documentation.
Organize and Edit: You can reorder the status codes using the up and down arrows to match the flow of your documentation or delete any unnecessary status code entries using the trash icon.
Completeness: Ensure you document all status codes that your API might return, including success and error responses, to provide comprehensive documentation.