Sifa professional network API (Fastify, AT Protocol, Jetstream) sifa.id/

fix(schemas): add skills field to positionSchema (#83)

The PUT /api/profile/position/:rkey endpoint validated against
positionSchema which did not include a skills field. This caused
400 errors when the frontend sent skill-position linking updates.

Adds an optional skills array (strongRef objects, max 50) matching
the position lexicon definition.

Closes singi-labs/sifa-api#65 (partial)
Ref singi-labs/sifa-web#98

authored by

Guido X Jansen and committed by
GitHub
eedd6290 37dbb63a

+6
+6
src/routes/schemas.ts
··· 24 24 }) 25 25 .passthrough(); 26 26 27 + const strongRefSchema = z.object({ 28 + uri: z.string(), 29 + cid: z.string(), 30 + }); 31 + 27 32 export const positionSchema = z.object({ 28 33 companyName: z.string().min(1).max(200), 29 34 title: z.string().min(1).max(200), ··· 34 39 startDate: z.string().optional(), 35 40 endDate: z.string().optional(), 36 41 current: z.boolean().default(false), 42 + skills: z.array(strongRefSchema).max(50).optional(), 37 43 }); 38 44 39 45 export const educationSchema = z.object({