Skip to content

Commit

Permalink
Docs: fix required
Browse files Browse the repository at this point in the history
  • Loading branch information
chlehdwon committed Feb 5, 2024
1 parent 81f3d76 commit a60fc1d
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions src/routes/docs/roomsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ const { objectIdPattern, roomsPattern } = require("./utils");
const participantSchema = {
part: {
type: "object",
required: ["user", "settlementStatus", "readAt"],
required: ["_id", "name", "nickname", "profileImageUrl", "readAt"],
properties: {
user: {
_id: {
type: "string",
pattern: objectIdPattern,
},
settlementStatus: {
name: {
type: "string",
},
nickname: {
type: "string",
},
profileImageUrl: {
type: "string",
},
isSettlement: {
type: "string",
enum: ["not-departed", "paid", "send-required", "sent"],
default: "not-departed",
Expand All @@ -30,9 +39,10 @@ const roomsSchema = {
"from",
"to",
"time",
"part",
"madeat",
"settlementTotal",
"maxPartLength",
"isDeparted",
],
properties: {
name: {
Expand All @@ -59,13 +69,19 @@ const roomsSchema = {
type: "string",
format: "date-time",
},
maxPartLength: {
type: "integer",
default: 4,
},
settlementTotal: {
type: "integer",
default: 0,
},
maxPartLength: {
type: "integer",
default: 4,
isOver: {
type: "boolean",
},
isDeparted: {
type: "boolean",
},
},
},
Expand Down

0 comments on commit a60fc1d

Please sign in to comment.