A worked example, rendered from real sample data. Sign in to run the tool on your own input.
GET /users
GET /users/{id}
POST /users
PUT /users/{id}
DELETE /users/{id}{
"openapi": "3.0.0",
"info": {
"title": "API Documentation",
"version": "1.0.0",
"description": "Generated Swagger/OpenAPI documentation"
},
"servers": [
{
"url": "https://api.example.com",
"description": "Production"
}
],
"paths": {
"/users": {
"get": {
"summary": "Get all users",
"operationId": "getUsers",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"default": 10
}
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "integer",
"default": 0
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array"
}
}
}
}
}
}
},
"/users/{id}": {
"get": {
"summary": "Get user by ID",
"operationId": "getUserById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "User found"
},
"404": {
"description": "User not found"
}
}
}
}
},
"components": {
…
Generate Swagger/OpenAPI documentation with paths, schemas, and authentication definitions. Part of the DevTools Surf developer suite. Browse more tools in the API / Config collection.