From 3a1b72a1f92cdbb4eb388905e5a22c77bc8840b0 Mon Sep 17 00:00:00 2001 From: Shreyaschorge Date: Tue, 10 Dec 2024 01:25:44 +0530 Subject: [PATCH] Add metadata in POST user-api --- src/v2/spec.yaml | 68 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/src/v2/spec.yaml b/src/v2/spec.yaml index bdb3405..e7fa4b8 100644 --- a/src/v2/spec.yaml +++ b/src/v2/spec.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: Farcaster API V2 - version: "2.1.0" + version: "2.1.1" description: > The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details. @@ -1941,39 +1941,43 @@ components: $ref: "#/components/schemas/Address" block_hash: type: string + UserMetadata: + type: object + bio: + type: string + pfp_url: + type: string + url: + type: string + username: + type: string + display_name: + type: string + location: + type: object + required: + - latitude + - longitude + properties: + latitude: + type: number + format: double + minimum: -90 + maximum: 90 + longitude: + type: number + format: double + minimum: -180 + maximum: 180 UpdateUserReqBody: - type: object - required: - - signer_uuid - properties: - signer_uuid: - $ref: "#/components/schemas/SignerUUID" - bio: - type: string - pfp_url: - type: string - url: - type: string - username: - type: string - display_name: - type: string - location: - type: object + allOf: + - $ref: "#/components/schemas/UserMetadata" + - type: object required: - - latitude - - longitude + - signer_uuid properties: - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 + signer_uuid: + $ref: "#/components/schemas/SignerUUID" CastViewerContext: type: object description: Adds context on interactions the viewer has made with the cast. @@ -3201,6 +3205,8 @@ components: type: number fname: type: string + metadata: + $ref: "#/components/schemas/UserMetadata" RegisterUserResponse: type: object required: