{"openapi": "3.1.0", "info": {"title": "NinjaAPI", "version": "1.0.0", "description": ""}, "paths": {"/api/posts": {"get": {"operationId": "blog_api_list_posts", "summary": "List Posts", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PostListOut"}, "title": "Response", "type": "array"}}}}}}, "post": {"operationId": "blog_api_create_post", "summary": "Create Post", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PostCreateOut"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PostCreateIn"}}}, "required": true}}}, "/api/posts/search": {"get": {"operationId": "blog_api_search_posts", "summary": "Search Posts", "parameters": [{"in": "query", "name": "q", "schema": {"title": "Q", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PostListOut"}, "title": "Response", "type": "array"}}}}}}}, "/api/posts/by-tag/{slug}": {"get": {"operationId": "blog_api_posts_by_tag", "summary": "Posts By Tag", "parameters": [{"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PostListOut"}, "title": "Response", "type": "array"}}}}}}}, "/api/posts/{post_id}": {"get": {"operationId": "blog_api_get_post", "summary": "Get Post", "parameters": [{"in": "path", "name": "post_id", "schema": {"title": "Post Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PostDetailOut"}}}}}}}, "/api/posts/{post_id}/comments": {"post": {"operationId": "blog_api_create_comment", "summary": "Create Comment", "parameters": [{"in": "path", "name": "post_id", "schema": {"title": "Post Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CommentCreateOut"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CommentCreateIn"}}}, "required": true}}}, "/api/users/find": {"get": {"operationId": "blog_api_find_user_by_email", "summary": "Find User By Email", "parameters": [{"in": "query", "name": "email", "schema": {"title": "Email", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserDetailOut"}}}}}}}, "/api/users/{user_id}": {"get": {"operationId": "blog_api_get_user", "summary": "Get User", "parameters": [{"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserDetailOut"}}}}}}}}, "components": {"schemas": {"AuthorOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "username": {"title": "Username", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}}, "required": ["id", "username", "display_name"], "title": "AuthorOut", "type": "object"}, "PostListOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "title": {"title": "Title", "type": "string"}, "author": {"$ref": "#/components/schemas/AuthorOut"}, "tags": {"items": {"$ref": "#/components/schemas/TagOut"}, "title": "Tags", "type": "array"}, "view_count": {"title": "View Count", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "title", "author", "tags", "view_count", "created_at"], "title": "PostListOut", "type": "object"}, "TagOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}}, "required": ["id", "name", "slug"], "title": "TagOut", "type": "object"}, "PostCreateOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "title": {"title": "Title", "type": "string"}}, "required": ["id", "title"], "title": "PostCreateOut", "type": "object"}, "PostCreateIn": {"properties": {"author_id": {"title": "Author Id", "type": "integer"}, "title": {"title": "Title", "type": "string"}, "body": {"title": "Body", "type": "string"}, "tag_slugs": {"default": [], "items": {"type": "string"}, "title": "Tag Slugs", "type": "array"}}, "required": ["author_id", "title", "body"], "title": "PostCreateIn", "type": "object"}, "CommentOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "author": {"$ref": "#/components/schemas/AuthorOut"}, "body": {"title": "Body", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "author", "body", "created_at"], "title": "CommentOut", "type": "object"}, "PostDetailOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "title": {"title": "Title", "type": "string"}, "body": {"title": "Body", "type": "string"}, "author": {"$ref": "#/components/schemas/AuthorOut"}, "tags": {"items": {"$ref": "#/components/schemas/TagOut"}, "title": "Tags", "type": "array"}, "comments": {"items": {"$ref": "#/components/schemas/CommentOut"}, "title": "Comments", "type": "array"}, "view_count": {"title": "View Count", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "title", "body", "author", "tags", "comments", "view_count", "created_at", "updated_at"], "title": "PostDetailOut", "type": "object"}, "CommentCreateOut": {"properties": {"id": {"title": "Id", "type": "integer"}}, "required": ["id"], "title": "CommentCreateOut", "type": "object"}, "CommentCreateIn": {"properties": {"author_id": {"title": "Author Id", "type": "integer"}, "body": {"title": "Body", "type": "string"}}, "required": ["author_id", "body"], "title": "CommentCreateIn", "type": "object"}, "UserDetailOut": {"properties": {"id": {"title": "Id", "type": "integer"}, "username": {"title": "Username", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "bio": {"title": "Bio", "type": "string"}, "post_count": {"title": "Post Count", "type": "integer"}, "comment_count": {"title": "Comment Count", "type": "integer"}}, "required": ["id", "username", "display_name", "email", "bio", "post_count", "comment_count"], "title": "UserDetailOut", "type": "object"}}}, "servers": []}