All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dronesecurity.userapplication.presentation.user.userAPI.json Maven / Gradle / Ivy

{
  "openapi": "3.0.3",
  "info": {
    "title": "API exposing user operations.",
    "version": "1.0.1"
  },
  "servers": [
    {
      "url": "http://{host}:{port}/{basePath}",
      "description": "Localhost server",
      "variables": {
        "host": {
          "default": "localhost"
        },
        "port": {
          "default": "17000"
        },
        "basePath": {
          "default": "userAPI"
        }
      }
    }
  ],
  "paths": {
    "/logIn": {
      "post": {
        "operationId": "logIn",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully logged in.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/logOut": {
      "post": {
        "operationId": "logOut",
        "responses": {
          "200": {
            "description": "Successfully logged out.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/retrieveCourierByUsername": {
      "get": {
        "operationId": "retrieveCourierByUsername",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Courier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Courier"
                }
              }
            }
          }
        }
      }
    },
    "/retrieveMaintainerByUsername": {
      "get": {
        "operationId": "retrieveMaintainerByUsername",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Maintainer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Maintainer"
                }
              }
            }
          }
        }
      }
    },
    "/checkLoggedUserRole": {
      "get": {
        "operationId": "checkLoggedUserRole",
        "responses": {
          "200": {
            "description": "Successfully checked logged user role.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/retrieveLoggedCourierIfPresent": {
      "get": {
        "operationId": "retrieveLoggedCourierIfPresent",
        "responses": {
          "200": {
            "description": "Successfully retrieved logged Courier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Courier"
                }
              }
            }
          }
        }
      }
    },
    "/retrieveLoggedMaintainerIfPresent": {
      "get": {
        "operationId": "retrieveLoggedMaintainerIfPresent",
        "responses": {
          "200": {
            "description": "Successfully retrieved logged Maintainer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Maintainer"
                }
              }
            }
          }
        }
      }
    },
    "/addDrone": {
      "post": {
        "operationId": "addDrone",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "droneId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully added drone."
          }
        }
      }
    },
    "/removeDrone": {
      "post": {
        "operationId": "removeDrone",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "droneId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully removed drone."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Courier": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "Maintainer": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy