Skip to main content

Informazioni API

Endpoint

Parametri
Response

Output

{
  "openapi": "3.0.0",
  "info": {
    "title": "My API",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.example.com/v1"
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "summary": "List all users",
        "operationId": "get_users",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  }
}

Come utilizzare OpenAPI Spec Generator

Fill in the API information

Insert title, version, server URL and description: become the "info" and "servers" fields of the OpenAPI 3.0 spec.

Add endpoints

For each endpoint define path, HTTP method and summary, then add parameters (query/path/header) and responses with their respective status codes.

Choose output format

Pass through JSON tab to YAML tab to see the live preview of the generated spec in the chosen format.

Copy or download the spec

Use "Copy Spec" to paste it into Swagger Editor or "Download Spec" to save as a .json or .yaml file.

Suggerimenti

  • Operation ID is automatically generated by combining method and path (e.g. "getusers_id"): rename it manually after export if you need a more readable name for the SDK.
  • Mark parameters like "required" for path (
  • After generating the spec, attach it to the OpenAPI Validator on the site to check required fields, $ref and best practices before publishing.

Domande frequenti

What version of OpenAPI does the tool generate?

Generate always OpenAPI 3.0.0 specifications (fixed "openapi": "3.0.0" in output field) starting from the visual title definition, servers, endpoints, parameters, and responses.

Can I define a request body for POST/PUT/PATCH?

Yes, by pasting a valid JSON schema in the request body field of the endpoint, it will be automatically inserted as "application/json" only for POST, PUT, and PATCH methods. If the JSON is not valid, the field will simply be ignored in the generated spec.

What happens if I don't define any response for an endpoint?

The tool automatically inserts a default response of "200: OK" so that the generated spec always conforms to the OpenAPI structure.

How is the YAML output generated?

With an internal JSON-to-YAML converter (no external YAML library), the object is serialized recursively respecting standard YAML indentation.

Are data you enter sent to a server?

No, generation of the spec is entirely client-side: title, endpoint, parameters and responses stay in the browser until you copy or download the result.