{
  "openapi": "3.0.1",
  "info": {
    "title": "Kmila.Web | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://localhost:5297/"
    }
  ],
  "paths": {
    "/api-docs": {
      "get": {
        "tags": [
          "Kmila.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "SimulationApi"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/projects": {
      "post": {
        "tags": [
          "SimulationApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/projects/{id}/files": {
      "post": {
        "tags": [
          "SimulationApi"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/projects/{id}/files/{name}": {
      "get": {
        "tags": [
          "SimulationApi"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/projects/{id}": {
      "delete": {
        "tags": [
          "SimulationApi"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/simulate": {
      "post": {
        "tags": [
          "SimulationApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiPortMoment": {
        "type": "object",
        "properties": {
          "port": {
            "type": "string"
          },
          "t": {
            "type": "integer",
            "format": "int32"
          },
          "scale": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "CreateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "retain": {
            "type": "boolean"
          }
        },
        "nullable": true
      },
      "SimulateRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "entryPoint": {
            "type": "string",
            "nullable": true
          },
          "fpga": {
            "type": "string",
            "nullable": true
          },
          "timeScale": {
            "type": "string"
          },
          "duration": {
            "type": "integer",
            "format": "int32"
          },
          "systemClockMhz": {
            "type": "integer",
            "format": "int32"
          },
          "tickResNs": {
            "type": "integer",
            "format": "int32"
          },
          "portMoments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPortMoment"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WriteFileRequest"
            },
            "nullable": true
          }
        }
      },
      "WriteFileRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Kmila.Web"
    },
    {
      "name": "SimulationApi"
    }
  ]
}