{"openapi":"3.1.0","info":{"title":"Codewalk Blogging API","version":"0.0.1"},"paths":{"/":{"get":{"summary":"Root Dashboard","description":"Serves the Materialize CSS backend status dashboard.","operationId":"root_dashboard__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"summary":"Health Check","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/register":{"post":{"tags":["Auth"],"summary":"Create User Registration","operationId":"create_user_registration_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/users":{"get":{"tags":["Auth"],"summary":"Get All Users","operationId":"get_all_users_api_auth_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DisplayAccount"},"type":"array","title":"Response Get All Users Api Auth Users Get"}}}}}}},"/api/auth/":{"get":{"tags":["Auth"],"summary":"List Users Root","operationId":"list_users_root_api_auth__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DisplayAccount"},"type":"array","title":"Response List Users Root Api Auth  Get"}}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"tags":["Auth"],"summary":"Google Auth","description":"Verify Google ID token, auto-provision user if needed, and issue native JWT token","operationId":"google_auth_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/profile":{"get":{"tags":["Auth"],"summary":"Get Profile","operationId":"get_profile_api_auth_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayAccount"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Auth"],"summary":"Update Profile","description":"Update user username, first name, or last name","operationId":"update_profile_api_auth_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayAccount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/me":{"get":{"tags":["Auth"],"summary":"Get Current User Info","description":"Get current user information","operationId":"get_current_user_info_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayAccount"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/change-password":{"put":{"tags":["Auth"],"summary":"Change Password","description":"Change logged-in user password","operationId":"change_password_api_auth_change_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/upload-avatar":{"post":{"tags":["Auth"],"summary":"Upload Avatar","description":"Upload profile image to Cloudinary and attach it to user account","operationId":"upload_avatar_api_auth_upload_avatar_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_avatar_api_auth_upload_avatar_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayAccount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/content/":{"post":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Create Content Item","description":"Create a new Blog, Project, or Gallery item with Editor.js content","operationId":"create_content_item_api_content__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Get All Content Items","description":"List all content items, optionally filtered by type","operationId":"get_all_content_items_api_content__get","parameters":[{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ContentType"},{"type":"null"}],"description":"Filter by blog, project, or gallery","title":"Content Type"},"description":"Filter by blog, project, or gallery"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContentItemResponse"},"title":"Response Get All Content Items Api Content  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/upload-image":{"post":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Upload Editor Image","description":"Upload an inline image from Editor.js to Cloudinary via backend","operationId":"upload_editor_image_api_content_upload_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_editor_image_api_content_upload_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/content/{content_id}/comments":{"get":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Get Comments For Content Item","description":"Fetch all top-level comments and nested replies for a specific content item","operationId":"get_comments_for_content_item_api_content__content_id__comments_get","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommentResponse"},"title":"Response Get Comments For Content Item Api Content  Content Id  Comments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Post Comment To Content","description":"Post a new comment or reply to a specific content item","operationId":"post_comment_to_content_api_content__content_id__comments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/comments/{comment_id}":{"put":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Update Comment Item","description":"Update an existing comment body (Owner only)","operationId":"update_comment_item_api_content_comments__comment_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Delete Comment Item","description":"Delete a comment by ID (Owner or Admin)","operationId":"delete_comment_item_api_content_comments__comment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{slug}":{"get":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Get Content Item By Slug","description":"Get a specific content item by its URL slug (auto increments view count)","operationId":"get_content_item_by_slug_api_content__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}":{"put":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Update Content Item","description":"Update an existing content item (Blog, Project, or Gallery)","operationId":"update_content_item_api_content__item_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Content (Blog, Projects, Gallery)"],"summary":"Delete Content Item","description":"Delete a content item by ID","operationId":"delete_content_item_api_content__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthorResponse":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"profile_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Image"}},"type":"object","required":["id","username"],"title":"AuthorResponse"},"Body_upload_avatar_api_auth_upload_avatar_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_avatar_api_auth_upload_avatar_post"},"Body_upload_editor_image_api_content_upload_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_editor_image_api_content_upload_image_post"},"ChangePassword":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePassword"},"CommentCreate":{"properties":{"body":{"type":"string","minLength":1,"title":"Body","description":"Comment body text"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id","description":"ID of the parent comment if this is a nested reply"}},"type":"object","required":["body"],"title":"CommentCreate"},"CommentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"content_id":{"type":"integer","title":"Content Id"},"user_id":{"type":"integer","title":"User Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"body":{"type":"string","title":"Body"},"date_created":{"type":"string","format":"date-time","title":"Date Created"},"is_edited":{"type":"boolean","title":"Is Edited"},"user":{"anyOf":[{"$ref":"#/components/schemas/AuthorResponse"},{"type":"null"}]},"replies":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Replies","default":[]}},"type":"object","required":["id","content_id","user_id","body","date_created","is_edited"],"title":"CommentResponse"},"CommentUpdate":{"properties":{"body":{"type":"string","minLength":1,"title":"Body","description":"Updated comment body text"}},"type":"object","required":["body"],"title":"CommentUpdate"},"ContentItemCreate":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title"},"content_type":{"$ref":"#/components/schemas/ContentType"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"},"meta_title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Meta Title"},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Description"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published","default":false},"tag_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tag Names"}},"type":"object","required":["title","content_type"],"title":"ContentItemCreate"},"ContentItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"content_type":{"$ref":"#/components/schemas/ContentType"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Title"},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Description"},"is_published":{"type":"boolean","title":"Is Published"},"views":{"type":"integer","title":"Views"},"date_posted":{"type":"string","format":"date-time","title":"Date Posted"},"date_updated":{"type":"string","format":"date-time","title":"Date Updated"},"tags":{"items":{"$ref":"#/components/schemas/TagResponse"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["id","user_id","title","slug","content_type","content","extra_metadata","meta_title","meta_description","is_published","views","date_posted","date_updated"],"title":"ContentItemResponse"},"ContentItemUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"},"meta_title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Meta Title"},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Description"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"},"tag_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tag Names"}},"type":"object","title":"ContentItemUpdate"},"ContentType":{"type":"string","enum":["blog","project","gallery"],"title":"ContentType"},"DisplayAccount":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"type":"string","format":"email","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"profile_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Image"}},"type":"object","required":["id","username","email"],"title":"DisplayAccount"},"GoogleAuthPayload":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"GoogleAuthPayload"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"Login"},"TagResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"integer","title":"Id"},"date_created":{"type":"string","format":"date-time","title":"Date Created"}},"type":"object","required":["name","id","date_created"],"title":"TagResponse"},"User":{"properties":{"username":{"type":"string","title":"Username"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","email","password"],"title":"User"},"UserUpdate":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}