{
    "openapi": "3.0.0",
    "info": {
      "title": "Service API",
      "description": "API for managing services, including image uploads.",
      "version": "1.0.0"
    },
    "servers": [
      {
        "url": "https://backend.abyssiniasoftware.com/" 
      }
    ],
    "paths": {
      "/services": {
        "post": {
          "summary": "Create a new service",
          "operationId": "createService",
          "tags": ["Services"],
          "requestBody": {
            "required": true,
            "content": {
              "multipart/form-data": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Web Development"
                    },
                    "description": {
                      "type": "string",
                      "example": "High-quality web development services."
                    },
                    "category": {
                      "type": "string",
                      "example": "Development"
                    },
                    "time": {
                      "type": "string",
                      "example": "4 weeks"
                    },
                    "pricing": {
                      "type": "number",
                      "format": "float",
                      "example": 500.00
                    },
                    "image": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Service created successfully",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Service created successfully"
                      },
                      "service": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "time": {
                            "type": "string"
                          },
                          "pricing": {
                            "type": "number",
                            "format": "float"
                          },
                          "image": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "500": {
              "description": "Server error",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "get": {
          "summary": "Get all services",
          "operationId": "getAllServices",
          "tags": ["Services"],
          "responses": {
            "200": {
              "description": "A list of services",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "services": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "title": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "category": {
                              "type": "string"
                            },
                            "time": {
                              "type": "string"
                            },
                            "pricing": {
                              "type": "number",
                              "format": "float"
                            },
                            "image": {
                              "type": "string",
                              "format": "uri"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "500": {
              "description": "Server error",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "/services/{id}": {
        "get": {
          "summary": "Get a service by ID",
          "operationId": "getServiceById",
          "tags": ["Services"],
          "parameters": [
            {
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the service to retrieve",
              "schema": {
                "type": "integer"
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Service found",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "service": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "time": {
                            "type": "string"
                          },
                          "pricing": {
                            "type": "number",
                            "format": "float"
                          },
                          "image": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Service not found",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Service not found"
                      }
                    }
                  }
                }
              }
            },
            "500": {
              "description": "Server error",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "put": {
          "summary": "Update a service",
          "operationId": "updateService",
          "tags": ["Services"],
          "parameters": [
            {
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the service to update",
              "schema": {
                "type": "integer"
              }
            }
          ],
          "requestBody": {
            "required": true,
            "content": {
              "multipart/form-data": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Updated Web Development"
                    },
                    "description": {
                      "type": "string",
                      "example": "Updated description for web development services."
                    },
                    "category": {
                      "type": "string",
                      "example": "Development"
                    },
                    "time": {
                      "type": "string",
                      "example": "6 weeks"
                    },
                    "pricing": {
                      "type": "number",
                      "format": "float",
                      "example": 750.00
                    },
                    "image": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Service updated successfully",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Service updated successfully"
                      },
                      "service": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "time": {
                            "type": "string"
                          },
                          "pricing": {
                            "type": "number",
                            "format": "float"
                          },
                          "image": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Service not found",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Service not found"
                      }
                    }
                  }
                }
              }
            },
            "500": {
              "description": "Server error",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "delete": {
          "summary": "Delete a service",
          "operationId": "deleteService",
          "tags": ["Services"],
          "parameters": [
            {
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the service to delete",
              "schema": {
                "type": "integer"
              }
            }
          ],
          "responses": {
            "204": {
              "description": "Service deleted successfully"
            },
            "404": {
              "description": "Service not found",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "example": "Service not found"
                      }
                    }
                  }
                }
              }
            },
            "500": {
              "description": "Server error",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string"
                      },
                      "error": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "components": {
      "schemas": {
        "Service": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "time": {
              "type": "string"
            },
            "pricing": {
              "type": "number",
              "format": "float"
            },
            "image": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    }
  }
  