diff --git a/openapi b/openapi new file mode 100644 index 0000000..c8854e3 --- /dev/null +++ b/openapi @@ -0,0 +1,144 @@ +--- +openapi: 3.0.3 +info: + title: quarkus-demo API + version: 1.0-SNAPSHOT +paths: + /redis/{name}: + get: + tags: + - Redis Resource + parameters: + - name: name + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + type: string + /redis/{name}/{value}: + post: + tags: + - Redis Resource + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: value + in: path + required: true + schema: + type: string + responses: + "201": + description: Created + /user: + get: + tags: + - User Resource + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + post: + tags: + - User Resource + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/User' + /user/page: + get: + tags: + - User Resource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Page' + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + /user/{id}: + get: + tags: + - User Resource + parameters: + - name: id + in: path + required: true + schema: + format: int64 + type: integer + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/User' +components: + schemas: + Gender: + enum: + - UNKNOWN + - MALE + - FEMALE + type: string + LocalDateTime: + format: date-time + type: string + example: 2022-03-10T12:15:50 + Page: + type: object + properties: + index: + format: int32 + type: integer + size: + format: int32 + type: integer + User: + type: object + properties: + id: + format: int64 + type: integer + nickName: + type: string + avatarUrl: + type: string + avatarUrlBack: + type: string + openId: + type: string + gender: + $ref: '#/components/schemas/Gender' + signInTime: + $ref: '#/components/schemas/LocalDateTime' + createTime: + $ref: '#/components/schemas/LocalDateTime' + inviteId: + format: int64 + type: integer