1 Star 0 Fork 0

zhaowen5168 / realworld

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
openapi.yaml 21.53 KB
一键复制 编辑 原始数据 按行查看 历史
zhao 提交于 2023-12-07 11:36 . realworld
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
# Generated with protoc-gen-openapi
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
openapi: 3.0.3
info:
title: RealWorld API
description: The greeting service definition.
version: 0.0.1
paths:
/api/articles:
get:
tags:
- RealWorld
operationId: RealWorld_ListArticles
parameters:
- name: tag
in: query
schema:
type: string
- name: author
in: query
schema:
type: string
- name: favorited
in: query
schema:
type: string
- name: limit
in: query
schema:
type: string
- name: offset
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.MultipleArticlesReply'
post:
tags:
- RealWorld
operationId: RealWorld_CreateArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.CreateArticleRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
/api/articles/feed:
get:
tags:
- RealWorld
operationId: RealWorld_FeedArticles
parameters:
- name: limit
in: query
schema:
type: string
- name: offset
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.MultipleArticlesReply'
/api/articles/{slug}:
get:
tags:
- RealWorld
operationId: RealWorld_GetArticle
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
put:
tags:
- RealWorld
operationId: RealWorld_UpdateArticle
parameters:
- name: slug
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UpdateArticleRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
delete:
tags:
- RealWorld
operationId: RealWorld_DeleteArticle
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
/api/articles/{slug}/comments:
get:
tags:
- RealWorld
operationId: RealWorld_GetComments
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.MultipleCommentsReply'
post:
tags:
- RealWorld
operationId: RealWorld_AddComment
parameters:
- name: slug
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.AddCommentRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleCommentReply'
/api/articles/{slug}/comments/{id}:
delete:
tags:
- RealWorld
operationId: RealWorld_DeleteComment
parameters:
- name: slug
in: path
required: true
schema:
type: string
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleCommentReply'
/api/articles/{slug}/favorite:
get:
tags:
- RealWorld
operationId: RealWorld_FavoriteArticle
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
delete:
tags:
- RealWorld
operationId: RealWorld_UnfavoriteArticle
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply'
/api/profiles/{username}:
get:
tags:
- RealWorld
operationId: RealWorld_GetProfile
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.ProfileReply'
/api/profiles/{username}/follow:
put:
tags:
- RealWorld
operationId: RealWorld_FollowUser
parameters:
- name: username
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.FollowUserRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.ProfileReply'
delete:
tags:
- RealWorld
operationId: RealWorld_UnFollowUser
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.ProfileReply'
/api/tags:
get:
tags:
- RealWorld
operationId: RealWorld_GetTags
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.GetTagsReply'
/api/user:
get:
tags:
- RealWorld
operationId: RealWorld_GetCurrentUser
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UserReply'
put:
tags:
- RealWorld
operationId: RealWorld_UpdateUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UpdateUserRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UserReply'
/api/users:
post:
tags:
- RealWorld
operationId: RealWorld_Register
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.RegisterRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UserReply'
/api/users/login:
post:
tags:
- RealWorld
operationId: RealWorld_Login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.LoginRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/realworld.v1.UserReply'
components:
schemas:
realworld.v1.AddCommentRequest:
type: object
properties:
comment:
$ref: '#/components/schemas/realworld.v1.AddCommentRequest_Comment'
slug:
type: string
realworld.v1.AddCommentRequest_Comment:
type: object
properties:
body:
type: string
realworld.v1.CreateArticleRequest:
type: object
properties:
article:
$ref: '#/components/schemas/realworld.v1.CreateArticleRequest_Article'
realworld.v1.CreateArticleRequest_Article:
type: object
properties:
title:
type: string
description:
type: string
body:
type: string
tagList:
type: array
items:
type: string
realworld.v1.FollowUserRequest:
type: object
properties:
username:
type: string
realworld.v1.GetTagsReply:
type: object
properties:
tags:
type: array
items:
type: string
realworld.v1.LoginRequest:
type: object
properties:
user:
$ref: '#/components/schemas/realworld.v1.LoginRequest_User'
realworld.v1.LoginRequest_User:
type: object
properties:
email:
type: string
password:
type: string
realworld.v1.MultipleArticlesReply:
type: object
properties:
articles:
type: array
items:
$ref: '#/components/schemas/realworld.v1.MultipleArticlesReply_Articles'
articlesCount:
type: integer
format: uint32
realworld.v1.MultipleArticlesReply_Articles:
type: object
properties:
slug:
type: string
title:
type: string
description:
type: string
body:
type: string
tagList:
type: array
items:
type: string
createdAt:
type: string
updatedAt:
type: string
favorited:
type: boolean
favoritesCount:
type: integer
format: uint32
author:
$ref: '#/components/schemas/realworld.v1.MultipleArticlesReply_Author'
realworld.v1.MultipleArticlesReply_Author:
type: object
properties:
username:
type: string
bio:
type: string
image:
type: string
following:
type: boolean
realworld.v1.MultipleCommentsReply:
type: object
properties:
comments:
type: array
items:
$ref: '#/components/schemas/realworld.v1.MultipleCommentsReply_Comments'
realworld.v1.MultipleCommentsReply_Author:
type: object
properties:
username:
type: string
bio:
type: string
image:
type: string
following:
type: boolean
realworld.v1.MultipleCommentsReply_Comments:
type: object
properties:
id:
type: integer
format: uint32
createdAt:
type: string
updatedAt:
type: string
body:
type: string
author:
$ref: '#/components/schemas/realworld.v1.MultipleCommentsReply_Author'
realworld.v1.ProfileReply:
type: object
properties:
profile:
$ref: '#/components/schemas/realworld.v1.ProfileReply_Profile'
realworld.v1.ProfileReply_Profile:
type: object
properties:
username:
type: string
bio:
type: string
image:
type: string
following:
type: boolean
realworld.v1.RegisterRequest:
type: object
properties:
user:
$ref: '#/components/schemas/realworld.v1.RegisterRequest_User'
realworld.v1.RegisterRequest_User:
type: object
properties:
username:
type: string
email:
type: string
password:
type: string
realworld.v1.SingleArticleReply:
type: object
properties:
article:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply_Article'
realworld.v1.SingleArticleReply_Article:
type: object
properties:
slug:
type: string
title:
type: string
description:
type: string
body:
type: string
tagList:
type: array
items:
type: string
createdAt:
type: string
updatedAt:
type: string
favorited:
type: boolean
favoritesCount:
type: integer
format: uint32
author:
$ref: '#/components/schemas/realworld.v1.SingleArticleReply_Author'
realworld.v1.SingleArticleReply_Author:
type: object
properties:
username:
type: string
bio:
type: string
image:
type: string
following:
type: boolean
realworld.v1.SingleCommentReply:
type: object
properties:
comment:
$ref: '#/components/schemas/realworld.v1.SingleCommentReply_Comment'
realworld.v1.SingleCommentReply_Author:
type: object
properties:
username:
type: string
bio:
type: string
image:
type: string
following:
type: boolean
realworld.v1.SingleCommentReply_Comment:
type: object
properties:
id:
type: integer
format: uint32
createdAt:
type: string
updatedAt:
type: string
body:
type: string
author:
$ref: '#/components/schemas/realworld.v1.SingleCommentReply_Author'
realworld.v1.UpdateArticleRequest:
type: object
properties:
article:
$ref: '#/components/schemas/realworld.v1.UpdateArticleRequest_Article'
slug:
type: string
realworld.v1.UpdateArticleRequest_Article:
type: object
properties:
title:
type: string
description:
type: string
body:
type: string
tagList:
type: array
items:
type: string
realworld.v1.UpdateUserRequest:
type: object
properties:
user:
$ref: '#/components/schemas/realworld.v1.UpdateUserRequest_User'
realworld.v1.UpdateUserRequest_User:
type: object
properties:
email:
type: string
token:
type: string
username:
type: string
bio:
type: string
image:
type: string
realworld.v1.UserReply:
type: object
properties:
user:
$ref: '#/components/schemas/realworld.v1.UserReply_User'
realworld.v1.UserReply_User:
type: object
properties:
email:
type: string
token:
type: string
username:
type: string
bio:
type: string
image:
type: string
tags:
- name: RealWorld
Go
1
https://gitee.com/zhaowen5168/realworld.git
git@gitee.com:zhaowen5168/realworld.git
zhaowen5168
realworld
realworld
master

搜索帮助