alphastell 0.1.1

Rust CAD generator for stellarator fusion reactors: VMEC equilibria to STEP geometry for in-vessel layers and modular coils.
{
  "openapi": "3.0.0",
  "info": {
    "title": "alphastell API",
    "version": "0.1.0",
    "description": "HTTP facade over the alphastell vessel/magnet subcommands. Upload a VMEC\nNetCDF or MAKEGRID coils file and receive a tar archive containing the\ngenerated STEP + STL + CSV artifacts (one set per layer/coil group)."
  },
  "tags": [],
  "paths": {
    "/magnet": {
      "post": {
        "operationId": "magnet",
        "summary": "Generate a magnet_set STEP from a MAKEGRID coils file",
        "description": "Equivalent to the `magnet` subcommand. Accepts a MAKEGRID-format coils\nfile (e.g. `coils.example`) and returns a tar archive containing\n`magnet_set.step` + `magnet_set.stl` + `magnet_set.csv`.",
        "parameters": [
          {
            "name": "width",
            "in": "query",
            "required": false,
            "description": "Rectangular cross-section width [m]. Default 0.4 m matches parastell.",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.4
            },
            "explode": false
          },
          {
            "name": "thickness",
            "in": "query",
            "required": false,
            "description": "Rectangular cross-section thickness [m]. Default 0.5 m matches parastell.",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.5
            },
            "explode": false
          },
          {
            "name": "toroidal_extent",
            "in": "query",
            "required": false,
            "description": "Toroidal extent [deg]. 360 keeps all coils; values below 360 are reserved for future use.",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 360
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "Tar archive containing all generated artifacts (`<name>.{step,stl,csv}` per layer or coil group).",
            "content": {
              "application/x-tar": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input file or parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Processing failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/vessel": {
      "post": {
        "operationId": "vessel",
        "summary": "Generate in-vessel components from a VMEC NetCDF file",
        "description": "Equivalent to the `vessel` subcommand. Accepts a VMEC `wout_*.nc` file\nand returns a tar archive containing 18 entries: the 6 in-vessel layers\n(chamber, first_wall, breeder, back_wall, shield, vacuum_vessel) each as\n`<layer>.step` + `<layer>.stl` + `<layer>.csv`.",
        "parameters": [
          {
            "name": "wall_s",
            "in": "query",
            "required": false,
            "description": "Reference flux surface. Parastell default 1.08 (just outside the LCFS).",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 1.08
            },
            "explode": false
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Unit scaling factor. VMEC is in meters; 100 converts to centimeters to match the parastell default.",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 100
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "Tar archive containing all generated artifacts (`<name>.{step,stl,csv}` per layer or coil group).",
            "content": {
              "application/x-tar": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input file or parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Processing failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "/api",
      "description": "Main server",
      "variables": {}
    }
  ]
}