basePath: /api/v1 definitions: ent.Library: properties: created_at: description: CreatedAt holds the value of the "created_at" field. type: string id: description: ID of the ent. type: integer name: description: Name holds the value of the "name" field. type: string updated_at: description: UpdatedAt holds the value of the "updated_at" field. type: string user_id: description: UserID holds the value of the "user_id" field. type: string type: object models.CreateLibraryResponse: properties: library: $ref: '#/definitions/ent.Library' type: object models.CurrentUserResponse: properties: ip: type: string userEmail: type: string userId: type: string valid: type: boolean type: object models.ListLibraryResponse: properties: libraries: items: $ref: '#/definitions/ent.Library' type: array type: object host: localhost:8080 info: contact: email: support@swagger.io name: API Support url: http://www.swagger.io/support description: This is a sample server celler server. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: http://swagger.io/terms/ title: Swagger Example API version: "1.0" paths: /library: get: responses: "200": description: OK schema: items: $ref: '#/definitions/models.ListLibraryResponse' type: array summary: 获取当前用户的资料库 post: responses: "200": description: OK schema: $ref: '#/definitions/models.CreateLibraryResponse' security: - ApiKeyAuth: [] summary: 创建一个资料库 /user: get: responses: "200": description: OK schema: $ref: '#/definitions/models.CurrentUserResponse' summary: 获取当前用户的请求 securityDefinitions: ApiKeyAuth: description: Description for what is this security definition being used in: header name: Authorization type: apiKey swagger: "2.0"