ip-allocator-client 0.1.0

Rust API client for ip-allocator-webserver
Documentation
{
  "openapi": "3.0.0",
  "info": {
    "title": "ip-allocator-webserver",
    "version": "0.1.0"
  },
  "paths": {
    "/borrow": {
      "get": {
        "description": "Borrow an item from the freelist",
        "operationId": "handlers_ip_borrow",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BorrowOutput"
                }
              }
            }
          },
          "400": {
            "description": "# [400 Bad Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400)\nThe request given is wrongly formatted or data asked could not be fulfilled. "
          },
          "404": {
            "description": "# [404 Not Found](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)\nThis response is given when you request a page that does not exists."
          },
          "422": {
            "description": "# [422 Unprocessable Entity](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422)\nThis response is given when you request body is not correctly formatted. "
          },
          "500": {
            "description": "# [500 Internal Server Error](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500)\nThis response is given when something wend wrong on the server. "
          }
        }
      }
    },
    "/return": {
      "post": {
        "description": "Return an item to the freelist",
        "operationId": "handlers_ip_return_item",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationRef"
                }
              }
            }
          },
          "400": {
            "description": "# [400 Bad Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400)\nThe request given is wrongly formatted or data asked could not be fulfilled. "
          },
          "404": {
            "description": "# [404 Not Found](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)\nThis response is given when you request a page that does not exists."
          },
          "422": {
            "description": "# [422 Unprocessable Entity](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422)\nThis response is given when you request body is not correctly formatted. "
          },
          "500": {
            "description": "# [500 Internal Server Error](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500)\nThis response is given when something wend wrong on the server. "
          }
        }
      }
    },
    "/operations/{id}": {
      "get": {
        "description": "Poll the status of an async operation",
        "operationId": "handlers_ip_get_operation_status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationStatusOutput"
                }
              }
            }
          },
          "400": {
            "description": "# [400 Bad Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400)\nThe request given is wrongly formatted or data asked could not be fulfilled. "
          },
          "404": {
            "description": "# [404 Not Found](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)\nThis response is given when you request a page that does not exists."
          },
          "422": {
            "description": "# [422 Unprocessable Entity](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422)\nThis response is given when you request body is not correctly formatted. "
          },
          "500": {
            "description": "# [500 Internal Server Error](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500)\nThis response is given when something wend wrong on the server. "
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BorrowOutput": {
        "type": "object",
        "required": [
          "item"
        ],
        "properties": {
          "item": {}
        }
      },
      "OperationRef": {
        "type": "object",
        "required": [
          "operation_id",
          "status"
        ],
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ReturnInput": {
        "type": "object",
        "required": [
          "item"
        ],
        "properties": {
          "item": {}
        }
      },
      "OperationStatusOutput": {
        "type": "object",
        "required": [
          "operation_id",
          "status"
        ],
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        }
      }
    }
  }
}