openapi: 3.0.1
info:
  title: 시점 API
  version: 1.0.0
servers:
- url: http://localhost:8080
tags: []
paths:
  /api/interactions:
    post:
      tags:
      - api
      operationId: interaction-record
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-interactions-307770171'
            examples:
              interaction-record:
                value: |-
                  {
                    "eventId" : 1,
                    "interactionType" : "VIEWED"
                  }
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-interactions1818171561'
              examples:
                interaction-record:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : null
                    }
  /api/topics:
    get:
      tags:
      - api
      operationId: topic-list-query
      parameters:
      - name: page
        in: query
        description: "페이지 번호 (0부터 시작, 선택사항)"
        required: false
        schema:
          type: string
      - name: size
        in: query
        description: 페이지 크기 (선택사항)
        required: false
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-topics817829066'
              examples:
                topic-list-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : [ {
                        "id" : 1,
                        "title" : "인공지능 발전",
                        "description" : "AI 기술의 최신 동향과 발전사항"
                      }, {
                        "id" : 2,
                        "title" : "블록체인 기술",
                        "description" : "블록체인과 암호화폐의 최신 소식"
                      } ]
                    }
  /api/events/feed:
    get:
      tags:
      - api
      operationId: event-feed-query
      parameters:
      - name: category
        in: query
        description: 피드 카테고리 필터
        required: false
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-events-feed1589180745'
              examples:
                event-feed-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : [ {
                        "id" : 1,
                        "topic" : {
                          "id" : 1,
                          "title" : "AI 기술"
                        },
                        "title" : "AI 기술의 새로운 혁신",
                        "description" : "최신 AI 기술 동향과 발전 방향",
                        "imageUrl" : "https://example.com/image1.jpg",
                        "eventTime" : [ 2026, 3, 15, 4, 31, 33, 643970139 ],
                        "likeCount" : 15
                      } ]
                    }
  /api/notifications/push:
    post:
      tags:
      - api
      operationId: push-message-send-by-topic
      parameters:
      - name: by
        in: query
        description: Push 종류
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-notifications-push1462514891'
            examples:
              push-message-send-by-topic:
                value: |-
                  {
                    "topicId" : 1
                  }
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-notifications-push1115511519'
              examples:
                push-message-send-by-topic:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : { }
                    }
  /api/topics/search:
    get:
      tags:
      - api
      operationId: topic-search-query
      parameters:
      - name: keyword
        in: query
        description: 토픽 제목 또는 설명 검색 키워드
        required: true
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-topics-search-654273346'
              examples:
                topic-search-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : [ {
                        "id" : 1,
                        "title" : "인공지능 발전",
                        "description" : "AI 기술의 최신 동향과 발전사항"
                      } ]
                    }
  /api/topics/topk:
    get:
      tags:
      - api
      operationId: topic-topk-query
      parameters:
      - name: limit
        in: query
        description: "조회할 상위 토픽 수 (기본값: 5)"
        required: false
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-topics-topk-266144431'
              examples:
                topic-topk-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : [ {
                        "id" : 1,
                        "title" : "인공지능 발전"
                      } ]
                    }
  /api/topics/{topicId}:
    get:
      tags:
      - api
      operationId: topic-timeline-query
      parameters:
      - name: topicId
        in: path
        description: 토픽 ID
        required: true
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-topics-topicId376814265'
              examples:
                topic-timeline-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : {
                        "id" : 1,
                        "title" : "인공지능 발전",
                        "description" : "AI 기술의 최신 동향과 발전사항",
                        "events" : [ {
                          "id" : 1,
                          "title" : "ChatGPT 4.0 출시",
                          "description" : "OpenAI가 새로운 ChatGPT 버전을 공개했습니다",
                          "imageUrl" : "https://example.com/image1.jpg",
                          "eventTime" : [ 2024, 12, 4, 10, 0 ],
                          "articles" : [ {
                            "id" : 201,
                            "title" : "ChatGPT 4.0의 새로운 기능들",
                            "source" : "OpenAI",
                            "url" : "https://example.com/article2"
                          } ],
                          "likeCount" : 15,
                          "isActive" : true
                        } ],
                        "isFollowing" : true
                      }
                    }
  /api/users/device-token:
    post:
      tags:
      - api
      operationId: user-device-token-update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-users-device-token-1194226082'
            examples:
              user-device-token-update:
                value: |-
                  {
                    "deviceToken" : "fcm_device_token_12345"
                  }
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-interactions1818171561'
              examples:
                user-device-token-update:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : null
                    }
  /api/users/me:
    get:
      tags:
      - api
      operationId: user-current-query
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-users-me-1972346708'
              examples:
                user-current-query:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : {
                        "id" : 1,
                        "name" : "Test User",
                        "email" : "test@example.com",
                        "profileUrl" : null,
                        "role" : "USER"
                      }
                    }
  /api/users/withdraw:
    post:
      tags:
      - api
      operationId: user-withdrawal
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-users-withdraw-215701913'
            examples:
              user-withdrawal:
                value: |-
                  {
                    "reason" : "서비스 불만족",
                    "feedback" : "앱 속도가 너무 느림"
                  }
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-interactions1818171561'
              examples:
                user-withdrawal:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : null
                    }
  /api/events/{eventId}/like:
    post:
      tags:
      - api
      operationId: event-like
      parameters:
      - name: eventId
        in: path
        description: 이벤트 ID
        required: true
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-interactions1818171561'
              examples:
                event-like:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : null
                    }
  /api/topics/{topicId}/toggle-subscription:
    post:
      tags:
      - api
      operationId: topic-subscription-toggle
      parameters:
      - name: topicId
        in: path
        description: 토픽 ID
        required: true
        schema:
          type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-interactions1818171561'
              examples:
                topic-subscription-toggle:
                  value: |-
                    {
                      "code" : "200",
                      "message" : "성공",
                      "data" : null
                    }
components:
  schemas:
    api-events-feed1589180745:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          type: array
          description: 피드 리스트
          items:
            required:
            - description
            - eventTime
            - id
            - imageUrl
            - likeCount
            - title
            - topic
            type: object
            properties:
              imageUrl:
                type: string
                description: 피드 이미지 URL
              eventTime:
                type: array
                description: 피드 발생 시간(YYYY-MM-DDTHH:mm:ss)
                items:
                  oneOf:
                  - type: object
                  - type: boolean
                  - type: string
                  - type: number
              description:
                type: string
                description: 피드 설명
              topic:
                required:
                - id
                - title
                type: object
                properties:
                  id:
                    type: number
                    description: 토픽 ID
                  title:
                    type: string
                    description: 토픽 제목
                description: 토픽 정보
              likeCount:
                type: number
                description: 피드 좋아요 수
              id:
                type: number
                description: 피드 ID
              title:
                type: string
                description: 피드 제목
        message:
          type: string
          description: 응답 메시지
    api-interactions-307770171:
      required:
      - eventId
      - interactionType
      type: object
      properties:
        eventId:
          type: number
          description: 사용자가 상호작용한 이벤트 ID
        interactionType:
          type: string
          description: "상호작용 유형 (VIEWED, ARTICLE_CLICKED, TOPIC_VIEWED, TOPIC_FOLLOWED,\
            \ TOPIC_UNFOLLOWED)"
    api-notifications-push1115511519:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          type: object
          description: 응답 데이터
          nullable: true
        message:
          type: string
          description: 응답 메시지
    api-topics-topk-266144431:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          type: array
          description: 상위 K개 토픽 배열 데이터
          items:
            required:
            - id
            - title
            type: object
            properties:
              id:
                type: number
                description: 토픽 ID
              title:
                type: string
                description: 토픽 제목
        message:
          type: string
          description: 응답 메시지
    api-users-withdraw-215701913:
      required:
      - reason
      type: object
      properties:
        feedback:
          type: string
          description: 추가 피드백
          nullable: true
        reason:
          type: string
          description: 탈퇴 사유
    api-topics817829066:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          type: array
          description: 토픽 목록 배열 데이터
          items:
            required:
            - description
            - id
            - title
            type: object
            properties:
              description:
                type: string
                description: 토픽 설명
              id:
                type: number
                description: 토픽 ID
              title:
                type: string
                description: 토픽 제목
        message:
          type: string
          description: 응답 메시지
    api-interactions1818171561:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        message:
          type: string
          description: 응답 메시지
    api-notifications-push1462514891:
      required:
      - topicId
      type: object
      properties:
        topicId:
          type: number
          description: 토픽 ID
    api-users-me-1972346708:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          required:
          - email
          - id
          - name
          - role
          type: object
          properties:
            role:
              type: string
              description: "사용자 역할 (USER, ADMIN)"
            name:
              type: string
              description: 사용자 이름
            id:
              type: number
              description: 사용자 ID
            email:
              type: string
              description: 사용자 이메일
          description: Current user data
        message:
          type: string
          description: 응답 메시지
    api-topics-topicId376814265:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          required:
          - description
          - events
          - id
          - isFollowing
          - title
          type: object
          properties:
            isFollowing:
              type: boolean
              description: 사용자의 토픽 팔로우 여부
            description:
              type: string
              description: 토픽 설명
            id:
              type: number
              description: 토픽 ID
            title:
              type: string
              description: 토픽 제목
            events:
              type: array
              description: 타임라인 이벤트 목록
              items:
                required:
                - articles
                - description
                - eventTime
                - id
                - imageUrl
                - isActive
                - likeCount
                - title
                type: object
                properties:
                  imageUrl:
                    type: string
                    description: 이벤트 이미지 URL
                  eventTime:
                    type: array
                    description: 이벤트 발생 시간
                    items:
                      oneOf:
                      - type: object
                      - type: boolean
                      - type: string
                      - type: number
                  description:
                    type: string
                    description: 이벤트 설명
                  likeCount:
                    type: number
                    description: 이벤트 좋아요 수
                  id:
                    type: number
                    description: 이벤트 ID
                  isActive:
                    type: boolean
                    description: 이벤트 활성/좋아요 여부
                  title:
                    type: string
                    description: 이벤트 제목
                  articles:
                    type: array
                    description: 이벤트 관련 기사 목록
                    items:
                      required:
                      - id
                      - source
                      - title
                      - url
                      type: object
                      properties:
                        source:
                          type: string
                          description: 기사 출처
                        id:
                          type: number
                          description: 기사 ID
                        title:
                          type: string
                          description: 기사 제목
                        url:
                          type: string
                          description: 기사 URL
          description: 토픽 타임라인 데이터
        message:
          type: string
          description: 응답 메시지
    api-topics-search-654273346:
      required:
      - code
      - data
      - message
      type: object
      properties:
        code:
          type: string
          description: "응답 코드 (200, 400, 500 등)"
        data:
          type: array
          description: 검색 결과 배열 데이터
          items:
            required:
            - description
            - id
            - title
            type: object
            properties:
              description:
                type: string
                description: 토픽 설명
              id:
                type: number
                description: 토픽 ID
              title:
                type: string
                description: 토픽 제목
        message:
          type: string
          description: 응답 메시지
    api-users-device-token-1194226082:
      required:
      - deviceToken
      type: object
      properties:
        deviceToken:
          type: string
          description: 푸시 알림용 FCM 디바이스 토큰
