{
    "openapi": "3.0.0",
    "info": {
        "title": "Swagger SAILPOS",
        "contact": {
            "email": "support@avengers.pk"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "http://test-api.local/api/v1"
        }
    ],
    "paths": {
        "/login": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Sign in",
                "description": "Login by login_id, password",
                "operationId": "authLogin",
                "requestBody": {
                    "description": "Pass user credentials",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "login_id",
                                    "password"
                                ],
                                "properties": {
                                    "login_id": {
                                        "type": "email",
                                        "format": "login_id",
                                        "example": "tariq"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "aa"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "422": {
                        "description": "Wrong credentials response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Sorry, wrong email address or password. Please try again"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/verifyOtp": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Verify OTP",
                "description": "Verify OTP by login_id, code",
                "operationId": "verifyOtp",
                "requestBody": {
                    "description": "Pass login_id, code, device_id",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "login_id, otp_code, device_id"
                                ],
                                "properties": {
                                    "login_id": {
                                        "type": "email",
                                        "format": "login_id",
                                        "example": "tariq"
                                    },
                                    "otp_code": {
                                        "type": "string",
                                        "format": "code",
                                        "example": "1234"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "422": {
                        "description": "Wrong login_id, code response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Sorry, wrong login_id and code. Please try again"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/getDashboard": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Get Dashboard",
                "description": "",
                "operationId": "authLogin",
                "requestBody": {
                    "description": "Pass user credentials",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "422": {
                        "description": "Wrong credentials response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Sorry, wrong email address or password. Please try again"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "name": "bearerAuth",
                "in": "header",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    }
}