mirror of
https://github.com/better-auth/better-auth.git
synced 2026-07-30 17:12:35 -05:00
fix: multiple issues with openapi types and references (#1811)
This commit is contained in:
@@ -174,6 +174,7 @@ export const verifyEmail = createAuthEndpoint(
|
||||
properties: {
|
||||
user: {
|
||||
type: "object",
|
||||
ref: "#/components/schemas/User",
|
||||
},
|
||||
status: {
|
||||
type: "boolean",
|
||||
|
||||
@@ -66,17 +66,7 @@ export const getSession = <Option extends BetterAuthOptions>() =>
|
||||
properties: {
|
||||
session: {
|
||||
type: "object",
|
||||
properties: {
|
||||
token: {
|
||||
type: "string",
|
||||
},
|
||||
userId: {
|
||||
type: "string",
|
||||
},
|
||||
expiresAt: {
|
||||
type: "string",
|
||||
},
|
||||
},
|
||||
$ref: "#/components/schemas/Session",
|
||||
},
|
||||
user: {
|
||||
type: "object",
|
||||
|
||||
@@ -144,11 +144,12 @@ export const signInSocial = createAuthEndpoint(
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
session: {
|
||||
token: {
|
||||
type: "string",
|
||||
},
|
||||
user: {
|
||||
type: "object",
|
||||
ref: "#/components/schemas/User",
|
||||
},
|
||||
url: {
|
||||
type: "string",
|
||||
@@ -157,7 +158,7 @@ export const signInSocial = createAuthEndpoint(
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
required: ["session", "user", "url", "redirect"],
|
||||
required: ["redirect"],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -329,8 +330,12 @@ export const signInEmail = createAuthEndpoint(
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
token: {
|
||||
type: "string",
|
||||
},
|
||||
user: {
|
||||
type: "object",
|
||||
ref: "#/components/schemas/User",
|
||||
},
|
||||
url: {
|
||||
type: "string",
|
||||
@@ -339,7 +344,7 @@ export const signInEmail = createAuthEndpoint(
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
required: ["session", "user", "url", "redirect"],
|
||||
required: ["token", "user", "redirect"],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -61,6 +61,7 @@ export const updateUser = <O extends BetterAuthOptions>() =>
|
||||
properties: {
|
||||
user: {
|
||||
type: "object",
|
||||
ref: "#/components/schemas/User",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -547,6 +548,7 @@ export const changeEmail = createAuthEndpoint(
|
||||
properties: {
|
||||
user: {
|
||||
type: "object",
|
||||
ref: "#/components/schemas/User",
|
||||
},
|
||||
status: {
|
||||
type: "boolean",
|
||||
|
||||
Reference in New Issue
Block a user