How to use the OpenAPI Specification Generator.
An API specification should reflect the actual contract, including errors and authentication. Mark unknown behavior instead of inventing a polished endpoint description.
Make the workflow fit your task.
Document the actual endpoint, parameters, authentication and response contract using a specified OpenAPI version. Include known errors and mark unknown behavior rather than creating a complete-looking contract from assumptions.
- What you provide
- Verified endpoint descriptions and example responses.
- What you get
- OpenAPI draft with unresolved contracts flagged.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
Produce an OpenAPI 3.1.1 JSON fragment for fictional GET /items. Confirmed response: status 200, application/json array, each item requires string id and name. Authentication and errors are not specified.
Completed example
{
"openapi": "3.1.1",
"info": {"title": "Illustrative Items API", "version": "0.1.0"},
"paths": {
"/items": {
"get": {
"description": "Draft: authentication and error responses remain unspecified.",
"responses": {
"200": {
"description": "Items",
"content": {"application/json": {"schema": {
"type": "array",
"items": {"type": "object", "required": ["id", "name"], "properties": {
"id": {"type": "string"}, "name": {"type": "string"}
}}
}}}
}
}
}
}
}
}Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Should an OpenAPI draft invent authentication for an undocumented endpoint?
Record the gap and request the actual requirement. A generated security scheme must not be mistaken for implemented protection.
Why do generated clients fail despite a valid specification document?
Compare schemas and status behavior with the real API. Structural validity does not establish that the documented contract matches implementation.
Reference for this workflow.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑