OpenAPI Import

Import an OpenAPI 3.x specification and Nolxy automatically creates all matching routes, converting OpenAPI path parameters to Nolxy format. One API call — your entire gateway configured.

How It Works

Parse

Validate OpenAPI 3.x spec structure

Convert

Map paths + methods → Nolxy routes

Insert

Bulk insert routes to your account

Supported versionOpenAPI 3.x only (not Swagger 2.x)
Max routes per import100
Path param conversion{id} → :id (automatic)
Duplicate handlingImport aborted if any route already exists
Format supportJSON only (YAML not yet supported)

API Endpoint

POST/api/v1/openapi/import

Requires a valid JWT in the Authorization: Bearer header (your management API token, not an API key).

Request Body

specobject — OpenAPI 3.x spec (parsed JSON)
baseUrlstring — Upstream base URL for all imported routes

Example

curl -X POST https://api.nolxy.com/api/v1/openapi/import \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "spec": { ...your OpenAPI 3.x spec object... },
    "baseUrl": "https://api.example.com"
  }'

Example Spec

Given this OpenAPI spec with 5 operations across 2 paths:

{
  "openapi": "3.0.0",
  "info": { "title": "My API", "version": "1.0.0" },
  "servers": [{ "url": "https://api.example.com" }],
  "paths": {
    "/users": {
      "get": {
        "operationId": "listUsers",
        "summary": "List all users"
      },
      "post": {
        "operationId": "createUser",
        "summary": "Create a user"
      }
    },
    "/users/{id}": {
      "get": { "operationId": "getUser", "summary": "Get user by ID" },
      "put": { "operationId": "updateUser", "summary": "Update user" },
      "delete": { "operationId": "deleteUser", "summary": "Delete user" }
    }
  }
}

Response

Nolxy creates 5 routes and returns:

{
  "status": "Success",
  "data": {
    "imported": 5,
    "skipped": 0,
    "routes": [
      { "name": "listUsers",   "path": "/users",      "method": "GET"    },
      { "name": "createUser",  "path": "/users",      "method": "POST"   },
      { "name": "getUser",     "path": "/users/:id",  "method": "GET"    },
      { "name": "updateUser",  "path": "/users/:id",  "method": "PUT"    },
      { "name": "deleteUser",  "path": "/users/:id",  "method": "DELETE" }
    ],
    "errors": []
  }
}

Path Parameter Conversion

OpenAPI uses curly-brace syntax for path parameters. Nolxy converts them automatically:

/users/{id}
/users/:id

Nested parameters are also supported: /orgs/{orgId}/repos/{repoId}/orgs/:orgId/repos/:repoId.

Route Naming

Route names are derived in priority order:

  1. operationId — used as-is if present (e.g., listUsers)
  2. summary — truncated to 100 characters if no operationId
  3. method + path — auto-generated (e.g., GET users id) as fallback

It is strongly recommended to set operationId on every operation for clean route names.

Security & Limits

Path traversal blocked — paths containing .. or // are rejected.

URL validationbaseUrl must be a valid http:// or https:// URL.

Max path length — paths longer than 512 characters are skipped.

Route quota enforced — import respects your plan's max routes limit.

Atomic import — if any route conflicts with an existing one, the entire import is aborted. No partial imports.

After Import

Imported routes behave identically to manually created routes. You can:

  • Enable response caching, circuit breaker, retries, CORS per route
  • Attach request/response pipelines
  • Set a backend secret header
  • Configure per-route rate limit rules
  • View analytics broken down by route

All routes are created with isActive: true and are immediately proxying traffic.

Plan Requirements

OpenAPI Import is available on Pro plans and above.