{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/users/":{"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_users__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUser"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["users"],"summary":"Get All Users","operationId":"get_all_users_users__get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUsers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","operationId":"get_user_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update User","operationId":"update_user_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUser"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","operationId":"delete_user_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth","auth"],"summary":"User Login","description":"Authenticate user and return JWT token.","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseToken"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh_token":{"post":{"tags":["auth","auth"],"summary":"Refresh Token","description":"Refresh the JWT token using the refresh token.","operationId":"refresh_auth_refresh_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/validate_token":{"post":{"tags":["auth","auth"],"summary":"Validate Token","description":"Validate the JWT token to ensure it's valid.","operationId":"validate_auth_validate_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth","auth"],"summary":"User Logout","description":"Logout user by invalidating the token.","operationId":"logout_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Detail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/chat/chat":{"post":{"tags":["chat","chat"],"summary":"Chat with a model","description":"Chat with the model","operationId":"chat_chat_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/saif-chat/chat":{"post":{"tags":["saif-chat"],"summary":"Chat With Saif","operationId":"chat_with_saif_saif_chat_chat_post","parameters":[{"name":"user_question","in":"query","required":true,"schema":{"type":"string","title":"User Question"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_login_auth_token_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_auth_token_post"},"ChatRequest":{"properties":{"model":{"type":"string","title":"Model"},"message":{"type":"string","title":"Message"}},"type":"object","required":["model","message"],"title":"ChatRequest"},"ChatResponse":{"properties":{"model":{"type":"string","title":"Model"},"response":{"type":"string","title":"Response"}},"type":"object","required":["model","response"],"title":"ChatResponse"},"CreateUser":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"role":{"type":"string","title":"Role"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"organization_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Size"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["email","password"],"title":"CreateUser"},"Detail":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"Detail"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PaginatedUsers":{"properties":{"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_users":{"type":"integer","title":"Total Users"},"total_pages":{"type":"integer","title":"Total Pages"},"users":{"items":{"$ref":"#/components/schemas/ResponseUser"},"type":"array","title":"Users"}},"type":"object","required":["page","page_size","total_users","total_pages","users"],"title":"PaginatedUsers"},"ResponseToken":{"properties":{"access_token":{"type":"string","title":"Access Token","examples":["eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NjYwMzhlNmJiNjE3ZWEzZmY4NjBmOTciLCJpYXQiOjE3MjAxODM4NjEsIm5iZiI6MTcyMDE4Mzg2MSwianRpIjoiODIwYWJkZmQtNjZhMi00MTQ2LWIxNDEtMDFhYWEzZDRjMWY3IiwiZXhwIjoxNzIwMjcwMjYxLCJ0eXBlIjoiYWNjZXNzIiwiZnJlc2giOmZhbHNlfQ.e95JIcO2ZEFhjXI1bC7wT1LPnS1LRw6Iyzpmy7YuAbs"]},"refresh_token":{"type":"string","title":"Refresh Token","examples":["eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NjYwMzhlNmJiNjE3ZWEzZmY4NjBmOTciLCJpYXQiOjE3MDE4Mzg2MSwiZXhwIjoxNzIwMjcwMjYxLCJ0eXBlIjoicmVmcmVzaCJ9.e95JIcO2ZEFhjXI1bC7wT1LPnS1LRw6Iyzpmy7YuAbs"]},"user_id":{"type":"string","title":"User Id","examples":["666038e6bb617ea3ff860f97"]},"token_type":{"type":"string","title":"Token Type","examples":["bearer"]}},"type":"object","required":["access_token","refresh_token","user_id","token_type"],"title":"ResponseToken"},"ResponseUser":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"organization_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Size"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["id","email","is_active"],"title":"ResponseUser"},"Token":{"properties":{"token":{"type":"string","title":"Token","examples":["eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NjYwMzhlNmJiNjE3ZWEzZmY4NjBmOTciLCJpYXQiOjE3MjAxODM4NjEsIm5iZiI6MTcyMDE4Mzg2MSwianRpIjoiODIwYWJkZmQtNjZhMi00MTQ2LWIxNDEtMDFhYWEzZDRjMWY3IiwiZXhwIjoxNzIwMjcwMjYxLCJ0eXBlIjoiYWNjZXNzIiwiZnJlc2giOmZhbHNlfQ.e95JIcO2ZEFhjXI1bC7wT1LPnS1LRw6Iyzpmy7YuAbs"]},"token_type":{"type":"string","title":"Token Type","examples":["access"]}},"type":"object","required":["token","token_type"],"title":"Token"},"UpdateUser":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"roles":{"anyOf":[{"items":{"type":"string","enum":["user","admin","tester","organization","developer"]},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","title":"UpdateUser"},"UserLogin":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"UserLogin"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"auth/token"}}}}}}