WinCL Admin News API

Admin News Controller

OpenAPI Specification

wincl-admin-news-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Wincl Admin Admin News API
  version: '1.0'
  description: Admin Controller
servers:
- url: https://api.wincl.io:443
  description: Inferred Url
tags:
- name: Admin News
  description: Admin News Controller
paths:
  /bapi/v1/news:
    get:
      tags:
      - Admin News
      summary: 뉴스 리스트 조회
      operationId: getNewsUsingGET
      parameters:
      - name: category
        in: query
        description: 카테고리
        required: false
        style: form
        schema:
          type: string
      - name: searchKeyword
        in: query
        description: 검색 키워드
        required: false
        style: form
        schema:
          type: string
      - name: sortType
        in: query
        description: 정렬 타입
        required: false
        style: form
        schema:
          type: string
          enum:
          - AMOUNT_ASC
          - AMOUNT_DESC
          - ASC
          - DESC
          - NONE
          - PRICE_ASC
          - PRICE_DESC
          - UNIT_PRICE_ASC
          - UNIT_PRICE_DESC
      - name: pageNum
        in: query
        description: 페이지 넘버
        required: true
        style: form
        schema:
          type: integer
          format: int32
      - name: pageSize
        in: query
        description: 페이지당 아이템 개수
        required: true
        style: form
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponseDataList«News»'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
    post:
      tags:
      - Admin News
      summary: 뉴스 등록
      operationId: insertNewsUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddNewsRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
  /bapi/v1/news/category:
    get:
      tags:
      - Admin News
      summary: 뉴스 카테고리 리스트
      operationId: getNewsCategoryListUsingGET
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponseData«List«CommonCode»»'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
    post:
      tags:
      - Admin News
      summary: 뉴스 카테고리 추가
      operationId: addNewsCategoryUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddNewsCategoryRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
    delete:
      tags:
      - Admin News
      summary: 뉴스 카테고리 삭제
      operationId: removeNewsCategoryUsingDELETE
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteNewsCategoryRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponse'
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - Bearer 토큰 값:
        - global
  /bapi/v1/news/{no}:
    get:
      tags:
      - Admin News
      summary: 뉴스 디테일
      operationId: getNewsDetailUsingGET
      parameters:
      - name: 'no'
        in: path
        description: 'no'
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponseData«News»'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
    put:
      tags:
      - Admin News
      summary: 뉴스 업데이트
      operationId: updateNewsUsingPUT
      parameters:
      - name: 'no'
        in: path
        description: 'no'
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNewsRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - Bearer 토큰 값:
        - global
    delete:
      tags:
      - Admin News
      summary: 뉴스 삭제
      operationId: deleteNewsUsingDELETE
      parameters:
      - name: 'no'
        in: path
        description: 'no'
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WinclResponse'
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - Bearer 토큰 값:
        - global
components:
  schemas:
    DeleteNewsCategoryRequest:
      title: DeleteNewsCategoryRequest
      type: object
      properties:
        code:
          type: string
    News:
      title: News
      type: object
      properties:
        category:
          type: string
        contents:
          type: string
        createTimestamp:
          type: integer
          format: int64
        'no':
          type: integer
          format: int32
        title:
          type: string
        updateTimestamp:
          type: integer
          format: int64
    WinclResponse:
      title: WinclResponse
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    WinclResponseData«News»:
      title: WinclResponseData«News»
      type: object
      properties:
        code:
          type: string
        data:
          $ref: '#/components/schemas/News'
        message:
          type: string
    WinclResponseDataList«News»:
      title: WinclResponseDataList«News»
      type: object
      properties:
        code:
          type: string
        currentPageNum:
          type: integer
          description: 현재 페이지 번호
          format: int32
        items:
          type: array
          items:
            $ref: '#/components/schemas/News'
        message:
          type: string
        pageSize:
          type: integer
          description: 페이지당 아이템 개수
          format: int32
        sortType:
          type: string
          description: 정렬 기준
          enum:
          - AMOUNT_ASC
          - AMOUNT_DESC
          - ASC
          - DESC
          - NONE
          - PRICE_ASC
          - PRICE_DESC
          - UNIT_PRICE_ASC
          - UNIT_PRICE_DESC
        totalCount:
          type: integer
          description: 전체 아이템 개수
          format: int32
        totalPages:
          type: integer
          description: 전체 페이지 수
          format: int32
    AddNewsRequest:
      title: AddNewsRequest
      type: object
      properties:
        category:
          type: string
        contents:
          type: string
        title:
          type: string
    AddNewsCategoryRequest:
      title: AddNewsCategoryRequest
      type: object
      properties:
        code:
          type: string
        nameEn:
          type: string
        nameKr:
          type: string
    WinclResponseData«List«CommonCode»»:
      title: WinclResponseData«List«CommonCode»»
      type: object
      properties:
        code:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/CommonCode'
        message:
          type: string
    UpdateNewsRequest:
      title: UpdateNewsRequest
      type: object
      properties:
        category:
          type: string
        contents:
          type: string
        title:
          type: string
    CommonCode:
      title: CommonCode
      type: object
      properties:
        cd:
          type: string
          description: 코드
        cd_grp:
          type: string
          description: 코드 그룹
          enum:
          - ADMIN_AUTHORITY
          - B2B_PARTNER_QUESTION_CATEGORY
          - FAQ_CATEGORY
          - NEWS_CATEGORY
          - PROJECT_EFFECT
          - PROJECT_TYPE
          - QNA_TYPE
        nm_en:
          type: string
          description: 영어 이름
        nm_kr:
          type: string
          description: 한글 이름
        pos:
          type: integer
          description: 표시 순서
          format: int32
  securitySchemes:
    Bearer 토큰 값:
      type: http
      scheme: bearer
      bearerFormat: JWT