{"openapi":"3.0.1","info":{"title":"邻爪 API","description":"杭州同城宠物喂养 / 托管 / 领养撮合平台（展示名邻爪）。平台不自营门店，只提供定位、筛选、轻量认证留痕、订单短消息与一期爪灵。领养为公益信息，非买卖。不接 AI。","version":"0.2.0"},"servers":[{"url":"http://cy.vitalhub.vip","description":"Generated server url"}],"security":[{"bearer-jwt":[]}],"paths":{"/api/users/me":{"get":{"tags":["用户"],"summary":"当前用户资料","operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserProfileDto"}}}}}},"put":{"tags":["用户"],"summary":"更新资料","operationId":"update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserProfileDto"}}}}}}},"/api/users/me/verify":{"put":{"tags":["用户"],"summary":"轻量认证留痕","operationId":"verify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserProfileDto"}}}}}}},"/api/listings/{id}":{"get":{"tags":["服务"],"summary":"服务详情","operationId":"detail_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"lat","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"lng","in":"query","required":false,"schema":{"type":"number","format":"double"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListingDto"}}}}}},"put":{"tags":["服务"],"summary":"更新自己的服务","operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListingDto"}}}}}}},"/api/spirit/care":{"post":{"tags":["爪灵"],"summary":"照料：feed / pet / walk，消耗爪能","operationId":"care","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSpiritMeDto"}}}}}}},"/api/spirit/adopt":{"post":{"tags":["爪灵"],"summary":"领养爪灵","operationId":"adopt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSpiritMeDto"}}}}}}},"/api/orders":{"get":{"tags":["订单"],"summary":"我的订单","operationId":"mine","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListOrderDto"}}}}}},"post":{"tags":["订单"],"summary":"发起意向 / 下单","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOrderDto"}}}}}}},"/api/orders/{orderId}/messages":{"get":{"tags":["消息"],"summary":"订单短消息列表","operationId":"list","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMessageDto"}}}}}},"post":{"tags":["消息"],"summary":"发送短消息","operationId":"send","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageDto"}}}}}}},"/api/orders/{id}/status":{"post":{"tags":["订单"],"summary":"状态流转：PENDING → ACCEPTED → IN_PROGRESS → COMPLETED，任一方可 CANCELLED","operationId":"status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOrderDto"}}}}}}},"/api/listings":{"get":{"tags":["服务"],"summary":"筛选附近服务","operationId":"search","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["FEEDING","BOARDING","ADOPTION"]}},{"name":"city","in":"query","required":false,"schema":{"type":"string","default":"杭州"}},{"name":"keyword","in":"query","required":false,"schema":{"type":"string"}},{"name":"petType","in":"query","required":false,"schema":{"type":"string"}},{"name":"minPriceFen","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"maxPriceFen","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"lat","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"lng","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"radiusKm","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"distance"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePageDto"}}}}}},"post":{"tags":["服务"],"summary":"发布服务或领养信息","operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListingDto"}}}}}}},"/api/listings/{id}/offline":{"post":{"tags":["服务"],"summary":"下架","operationId":"offline","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListingDto"}}}}}}},"/api/auth/wechat":{"post":{"tags":["认证"],"summary":"微信 code 换登录态（未配 AppId 时 mock）","operationId":"wechat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatLoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLoginResponse"}}}}}}},"/api/auth/demo":{"post":{"tags":["认证"],"summary":"开发登录","operationId":"demo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoLoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLoginResponse"}}}}}}},"/api/spirit/me":{"get":{"tags":["爪灵"],"summary":"我的爪灵舱（每日首次自动签到发爪能）","operationId":"me_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSpiritMeDto"}}}}}}},"/api/orders/{id}":{"get":{"tags":["订单"],"summary":"订单详情","operationId":"detail","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOrderDto"}}}}}}},"/api/listings/mine":{"get":{"tags":["服务"],"summary":"我发布的服务","operationId":"mine_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListListingDto"}}}}}}},"/api/health":{"get":{"tags":["健康检查"],"summary":"存活探针","operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}}},"components":{"schemas":{"UpdateProfileRequest":{"type":"object","properties":{"nickname":{"maxLength":64,"minLength":0,"type":"string"},"avatarUrl":{"maxLength":512,"minLength":0,"type":"string"},"phone":{"maxLength":20,"minLength":0,"type":"string"},"city":{"maxLength":32,"minLength":0,"type":"string"},"bio":{"maxLength":400,"minLength":0,"type":"string"}},"description":"更新资料"},"ApiResponseUserProfileDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/UserProfileDto"}},"description":"统一响应"},"UserProfileDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"nickname":{"type":"string"},"avatarUrl":{"type":"string"},"phone":{"type":"string"},"city":{"type":"string"},"bio":{"type":"string"},"verified":{"type":"boolean"},"verifyTrace":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"description":"用户资料"},"VerifyRequest":{"required":["idLast4","realNameHint"],"type":"object","properties":{"realNameHint":{"maxLength":32,"minLength":0,"type":"string"},"idLast4":{"maxLength":4,"minLength":4,"type":"string"}},"description":"轻量认证留痕，非权威实名核验"},"UpsertRequest":{"required":["description","latitude","longitude","title","type"],"type":"object","properties":{"type":{"type":"string","enum":["FEEDING","BOARDING","ADOPTION"]},"title":{"maxLength":80,"minLength":0,"type":"string"},"description":{"maxLength":2000,"minLength":0,"type":"string"},"petTypes":{"maxLength":64,"minLength":0,"type":"string"},"priceFen":{"type":"integer","format":"int32"},"priceUnit":{"type":"string","enum":["PER_VISIT","PER_DAY","NEGOTIABLE","FREE"]},"city":{"maxLength":32,"minLength":0,"type":"string"},"district":{"maxLength":32,"minLength":0,"type":"string"},"addressHint":{"maxLength":120,"minLength":0,"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"availableNote":{"maxLength":200,"minLength":0,"type":"string"},"coverUrl":{"maxLength":512,"minLength":0,"type":"string"},"orgName":{"maxLength":80,"minLength":0,"type":"string"},"noBundleSale":{"type":"boolean"}},"description":"发布 / 更新服务"},"ApiResponseListingDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/ListingDto"}},"description":"统一响应"},"ListingDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["FEEDING","BOARDING","ADOPTION"]},"title":{"type":"string"},"description":{"type":"string"},"petTypes":{"type":"string"},"priceFen":{"type":"integer","format":"int32"},"priceUnit":{"type":"string","enum":["PER_VISIT","PER_DAY","NEGOTIABLE","FREE"]},"city":{"type":"string"},"district":{"type":"string"},"addressHint":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"distanceKm":{"type":"number","format":"double"},"availableNote":{"type":"string"},"coverUrl":{"type":"string"},"orgName":{"type":"string"},"noBundleSale":{"type":"boolean"},"status":{"type":"string","enum":["ACTIVE","OFFLINE"]},"createdAt":{"type":"string","format":"date-time"},"publisher":{"$ref":"#/components/schemas/UserProfileDto"}},"description":"服务卡片"},"CareRequest":{"required":["action"],"type":"object","properties":{"action":{"type":"string","enum":["feed","pet","walk"]}}},"ApiResponseSpiritMeDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/SpiritMeDto"}},"description":"统一响应"},"SpiritDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"species":{"type":"string","enum":["CAT","DOG","CRITTER"]},"speciesLabel":{"type":"string"},"name":{"type":"string"},"stage":{"type":"integer","format":"int32"},"stageLabel":{"type":"string"},"artKey":{"type":"string"},"intimacy":{"type":"integer","format":"int32"},"mood":{"type":"integer","format":"int32"},"satiety":{"type":"integer","format":"int32"},"lastCaredAt":{"type":"string","format":"date-time"}},"description":"爪灵状态"},"SpiritMeDto":{"type":"object","properties":{"adopted":{"type":"boolean"},"spirit":{"$ref":"#/components/schemas/SpiritDto"},"wallet":{"$ref":"#/components/schemas/WalletDto"},"careCosts":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}},"checkInGain":{"type":"integer","format":"int32"}},"description":"我的爪灵舱"},"WalletDto":{"type":"object","properties":{"pawEnergy":{"type":"integer","format":"int32"},"streakDays":{"type":"integer","format":"int32"},"todayCaps":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}},"description":"爪能钱包"},"AdoptRequest":{"required":["name","species"],"type":"object","properties":{"species":{"type":"string","enum":["CAT","DOG","CRITTER"]},"name":{"maxLength":24,"minLength":0,"type":"string"}}},"CreateRequest":{"required":["listingId"],"type":"object","properties":{"listingId":{"type":"integer","format":"int64"},"note":{"maxLength":500,"minLength":0,"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}}},"ApiResponseOrderDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/OrderDto"}},"description":"统一响应"},"OrderDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"listingId":{"type":"integer","format":"int64"},"listingTitle":{"type":"string"},"listingType":{"type":"string","enum":["FEEDING","BOARDING","ADOPTION"]},"status":{"type":"string","enum":["PENDING","ACCEPTED","IN_PROGRESS","COMPLETED","CANCELLED"]},"note":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"seeker":{"$ref":"#/components/schemas/UserProfileDto"},"provider":{"$ref":"#/components/schemas/UserProfileDto"},"lastMessage":{"type":"string"}},"description":"意向 / 订单"},"SendRequest":{"required":["content"],"type":"object","properties":{"content":{"maxLength":800,"minLength":0,"type":"string"}}},"ApiResponseMessageDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/MessageDto"}},"description":"统一响应"},"MessageDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"orderId":{"type":"integer","format":"int64"},"senderId":{"type":"integer","format":"int64"},"senderNickname":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"description":"订单短消息"},"StatusRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","enum":["PENDING","ACCEPTED","IN_PROGRESS","COMPLETED","CANCELLED"]}}},"WechatLoginRequest":{"required":["code"],"type":"object","properties":{"code":{"maxLength":128,"minLength":0,"type":"string"},"nickname":{"maxLength":64,"minLength":0,"type":"string"},"avatarUrl":{"maxLength":512,"minLength":0,"type":"string"}},"description":"微信登录。未配置 AppId 时按 code 生成 mock openid"},"ApiResponseLoginResponse":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/LoginResponse"}},"description":"统一响应"},"LoginResponse":{"type":"object","properties":{"token":{"type":"string"},"tokenType":{"type":"string"},"user":{"$ref":"#/components/schemas/UserProfileDto"},"mockWechat":{"type":"boolean"}},"description":"登录结果"},"DemoLoginRequest":{"type":"object","properties":{"nickname":{"maxLength":64,"minLength":0,"type":"string"},"roleHint":{"maxLength":32,"minLength":0,"type":"string"}},"description":"开发登录，仅 demo.login-enabled=true 时可用"},"ApiResponseListOrderDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderDto"}}},"description":"统一响应"},"ApiResponseListMessageDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageDto"}}},"description":"统一响应"},"ApiResponsePageDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"$ref":"#/components/schemas/PageDto"}},"description":"统一响应"},"PageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ListingDto"}},"total":{"type":"integer","format":"int64"},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"}},"description":"分页列表"},"ApiResponseListListingDto":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ListingDto"}}},"description":"统一响应"},"ApiResponseMapStringObject":{"type":"object","properties":{"code":{"type":"integer","description":"0 表示成功","format":"int32"},"message":{"type":"string","description":"提示文案"},"data":{"type":"object","additionalProperties":{"type":"object"}}},"description":"统一响应"}},"securitySchemes":{"bearer-jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}