Skip to content
Fourohtwo

code.halowerk.com/v1/swagger2-to-openapi3

Convert a Swagger 2.0 document to OpenAPI 3.1.0 (default) or 3.0.0, list every 3.0->3.1 change and validate input and output against the official JSON Schemas. Step 1: swagger2openapi 7.0.8 converts Swagger 2.0 to OpenAPI 3.0.0 (servers from schemes/host/basePath, body/formData parameters to requestBody, definitions to components, securityDefinitions to securitySchemes; minor errors patched).

BaseAnswering
POSThttps://code.halowerk.com/v1/swagger2-to-openapi3

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://code.halowerk.com/v1/swagger2-to-openapi3", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"spec":{"basePath":"/v1","host":"api.halowerk.com","info":{"title":"Pets","version":"1.0"},"paths":{"/pets":{"get":{"produces":["application/json"],"responses":{"200":{"description":"ok","schema":{"items":{"type":"string"},"type":"array"}}}}}},"schemes":["https"],"swagger":"2.0"},"target":"3.1"}),
});
console.log(await res.json());

Example input

{
  "spec": {
    "basePath": "/v1",
    "host": "api.halowerk.com",
    "info": {
      "title": "Pets",
      "version": "1.0"
    },
    "paths": {
      "/pets": {
        "get": {
          "produces": [
            "application/json"
          ],
          "responses": {
            "200": {
              "description": "ok",
              "schema": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            }
          }
        }
      }
    },
    "schemes": [
      "https"
    ],
    "swagger": "2.0"
  },
  "target": "3.1"
}