openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: profile description: Taste profile operations - name: recommendations description: AI recommendation operations - name: stats description: Dashboard statistics paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /profile: get: operationId: getProfile tags: [profile] summary: Get the taste profile responses: "200": description: The taste profile content: application/json: schema: $ref: "#/components/schemas/TasteProfile" put: operationId: updateProfile tags: [profile] summary: Update the taste profile requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TasteProfileInput" responses: "200": description: Updated taste profile content: application/json: schema: $ref: "#/components/schemas/TasteProfile" /recommendations: get: operationId: listRecommendations tags: [recommendations] summary: List recommendations parameters: - name: mediaType in: query required: false schema: $ref: "#/components/schemas/MediaType" - name: saved in: query required: false schema: type: boolean responses: "200": description: A list of recommendations content: application/json: schema: type: array items: $ref: "#/components/schemas/Recommendation" /recommendations/generate: post: operationId: generateRecommendations tags: [recommendations] summary: Generate new AI recommendations requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/GenerateInput" responses: "200": description: Newly generated recommendations content: application/json: schema: type: array items: $ref: "#/components/schemas/Recommendation" /recommendations/{id}: patch: operationId: updateRecommendation tags: [recommendations] summary: Update a recommendation (save or give feedback) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RecommendationUpdate" responses: "200": description: Updated recommendation content: application/json: schema: $ref: "#/components/schemas/Recommendation" delete: operationId: deleteRecommendation tags: [recommendations] summary: Delete a recommendation parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /stats: get: operationId: getStats tags: [stats] summary: Get dashboard statistics responses: "200": description: Dashboard statistics content: application/json: schema: $ref: "#/components/schemas/Stats" components: schemas: HealthStatus: type: object properties: status: type: string required: - status MediaType: type: string enum: [movie, tv, book, game] Feedback: type: string enum: [like, dislike] TasteProfile: type: object required: - id - favoriteTitles - favoriteGenres - preferredMediaTypes - vibe - notes - updatedAt properties: id: type: integer favoriteTitles: type: array items: type: string favoriteGenres: type: array items: type: string preferredMediaTypes: type: array items: $ref: "#/components/schemas/MediaType" vibe: type: string notes: type: string updatedAt: type: string TasteProfileInput: type: object required: - favoriteTitles - favoriteGenres - preferredMediaTypes - vibe - notes properties: favoriteTitles: type: array items: type: string favoriteGenres: type: array items: type: string preferredMediaTypes: type: array items: $ref: "#/components/schemas/MediaType" vibe: type: string notes: type: string Recommendation: type: object required: - id - title - mediaType - genres - year - creator - summary - reason - matchScore - saved - feedback - createdAt properties: id: type: integer title: type: string mediaType: $ref: "#/components/schemas/MediaType" genres: type: array items: type: string year: type: ["integer", "null"] creator: type: ["string", "null"] summary: type: string reason: type: string matchScore: type: integer saved: type: boolean feedback: oneOf: - $ref: "#/components/schemas/Feedback" - type: "null" createdAt: type: string GenerateInput: type: object required: - mediaTypes - mood - count properties: mediaTypes: type: array items: $ref: "#/components/schemas/MediaType" mood: type: string count: type: integer minimum: 1 maximum: 12 RecommendationUpdate: type: object properties: saved: type: boolean feedback: oneOf: - $ref: "#/components/schemas/Feedback" - type: "null" Stats: type: object required: - totalRecommendations - savedCount - likedCount - dislikedCount - byMediaType - topGenres properties: totalRecommendations: type: integer savedCount: type: integer likedCount: type: integer dislikedCount: type: integer byMediaType: type: array items: $ref: "#/components/schemas/MediaTypeCount" topGenres: type: array items: $ref: "#/components/schemas/GenreCount" MediaTypeCount: type: object required: - mediaType - count properties: mediaType: $ref: "#/components/schemas/MediaType" count: type: integer GenreCount: type: object required: - genre - count properties: genre: type: string count: type: integer