Untitled

                Never    
YAML
       
consumes:
- application/json
info:
  title: News Feed api 
  version: 1.0.0
produces:
- application/json
schemes:
- http
swagger: "2.0"

definitions:
  PostNewsRequest:
    type: object
    properties:
      domain:
        type: string
        minLength: 1
        maxLength: 255
      name:
        type: string
        minLength: 1
        maxLength: 45
      title:
        type: string
        minLength: 1
        maxLength: 512
      link:
        type: string
        minLength: 1
        maxLength: 512
      pub_date:
        type: integer
        description: "Unix timestamp with date of publication"
        nullable: true
      description:
        type: string
        nullable: true
      content:
        type: string
        nullable: true
      type:
        type: integer
      video_id:
        type: string
        minLength: 1
        maxLength: 100
        nullable: true
      properties:
        type: object
        nullable: true

  PostNewsResponse:
    type: object
    properties:
      success:
        type: bool
      error:
        type: string
    required:
      - sucess

  GetNews:
      type: object
      properties:
        domain:
          type: string
          minLength: 1
          maxLength: 255
        name:
          type: string
          minLength: 1
          maxLength: 45
        title:
          type: string
          minLength: 1
          maxLength: 512
        link:
          type: string
          minLength: 1
          maxLength: 512
        pub_date:
          type: integer
          description: "Unix timestamp with date of publication"
        description:
          type: string
          nullable: true
        content:
          type: string
          nullable: true
        is_status:
          type: integer
        votes_like:
          type: integer
        votes_dislike:
          type: integer
        votes_bearish:
          type: integer
        votes_bullish:
          type: integer
        votes_funny:
          type: integer
        votes_important:
          type: integer
        votes_saved:
          type: integer
        type:
          type: integer
        video_id:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
        properties:
          type: object
          nullable: true
        root_comments_count:
          type: integer
        categorized:
          type: integer
          nullable: true

paths:
  /news:
    post:
      consumes:
        - application/json
      parameters:
        - in: body
          name: request
          description: "Request body"
          schema:
            $ref: '#/definitions/PostNews'
      responses:
        200:
          description: "OK"
          schema:
            $ref: "#/definitions/PostNewsResponse"
          
    get:
      responses:
        200:
          description: "OK"
          schema:
            $ref: "#/definitions/GetNews"

Raw Text