Advertisement
KoctrX

Untitled

Nov 20th, 2023
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * @swagger
  3.  * /api/assets:
  4.  *   post:
  5.  *     tags:
  6.  *       - Assets
  7.  *     description: Create a new asset with possible attachments and bot kit details.
  8.  *     consumes:
  9.  *       - multipart/form-data
  10.  *     produces:
  11.  *       - application/json
  12.  *     parameters:
  13.  *       - in: formData
  14.  *         name: name
  15.  *         type: string
  16.  *         description: Name of the asset.
  17.  *         required: true
  18.  *       - in: formData
  19.  *         name: content
  20.  *         type: string
  21.  *         description: Content related to the asset.
  22.  *       - in: formData
  23.  *         name: productId
  24.  *         type: integer
  25.  *         description: ID of the associated product.
  26.  *       - in: formData
  27.  *         name: collectionId
  28.  *         type: integer
  29.  *         description: ID of the associated collection.
  30.  *       - in: formData
  31.  *         name: category
  32.  *         type: string
  33.  *         description: Category of the asset.
  34.  *       - in: formData
  35.  *         name: bot[logo]
  36.  *         type: file
  37.  *         description: Bot logo (only PNG, JPG formats are accepted). Max count: 1.
  38.  *       - in: formData
  39.  *         name: bot[name]
  40.  *         type: string
  41.  *         description: Name of the bot.
  42.  *       - in: formData
  43.  *         name: bot[description]
  44.  *         type: string
  45.  *         description: Description of the bot.
  46.  *       - in: formData
  47.  *         name: bot[roles]
  48.  *         type: string
  49.  *         description: Roles of the bot.
  50.  *       - in: formData
  51.  *         name: bot[bot_tone]
  52.  *         type: string
  53.  *         description: Tone of the bot.
  54.  *       - in: formData
  55.  *         name: bot[brand_tone]
  56.  *         type: string
  57.  *         description: Brand tone of the bot.
  58.  *       - in: formData
  59.  *         name: bot[response_length]
  60.  *         type: integer
  61.  *         description: Response length of the bot.
  62.  *       - in: formData
  63.  *         name: bot[multilang_enabled]
  64.  *         type: boolean
  65.  *         description: Whether multilanguage is enabled for the bot.
  66.  *       - in: formData
  67.  *         name: bot[language]
  68.  *         type: string
  69.  *         description: Language of the bot.
  70.  *       - in: formData
  71.  *         name: bot[imported_data]
  72.  *         type: string
  73.  *         description: Imported data for the bot.
  74.  *       - in: formData
  75.  *         name: bot[include_citations]
  76.  *         type: boolean
  77.  *         description: Whether to include citations for the bot.
  78.  *       - in: formData
  79.  *         name: attachments
  80.  *         type: file
  81.  *         description: File(s) to upload as attachments (only PNG, JPG formats are accepted).
  82.  *     responses:
  83.  *       201:
  84.  *         description: Asset created successfully
  85.  *         content:
  86.  *           application/json:
  87.  *             schema:
  88.  *               type: object
  89.  *               properties:
  90.  *                 success:
  91.  *                   type: boolean
  92.  *                 data:
  93.  *                   type: object
  94.  *                   properties:
  95.  *                     id:
  96.  *                       type: integer
  97.  *                     name:
  98.  *                       type: string
  99.  *                     content:
  100.  *                       type: string
  101.  *                     productId:
  102.  *                       type: integer
  103.  *                     collectionId:
  104.  *                       type: integer
  105.  *                     category:
  106.  *                       type: string
  107.  *                     activeHistoryId:
  108.  *                       type: integer
  109.  *                     bot:
  110.  *                       type: object
  111.  *                       properties:
  112.  *                         name:
  113.  *                           type: string
  114.  *                         description:
  115.  *                           type: string
  116.  *                         roles:
  117.  *                           type: string
  118.  *                         bot_tone:
  119.  *                           type: string
  120.  *                         brand_tone:
  121.  *                           type: string
  122.  *                         response_length:
  123.  *                           type: integer
  124.  *                         multilang_enabled:
  125.  *                           type: boolean
  126.  *                         language:
  127.  *                           type: string
  128.  *                         imported_data:
  129.  *                           type: string
  130.  *                         include_citations:
  131.  *                           type: boolean
  132.  *                         logo:
  133.  *                           type: string
  134.  *                     attachments:
  135.  *                       type: array
  136.  *                       items:
  137.  *                         type: object
  138.  *                         properties:
  139.  *                           id:
  140.  *                             type: integer
  141.  *                           filename:
  142.  *                             type: string
  143.  *                           path:
  144.  *                             type: string
  145.  *                           mimetype:
  146.  *                             type: string
  147.  *       400:
  148.  *         description: Validation error
  149.  *         content:
  150.  *           application/json:
  151.  *             schema:
  152.  *               type: object
  153.  *               properties:
  154.  *                 success:
  155.  *                   type: boolean
  156.  *                 message:
  157.  *                   type: string
  158.  *       500:
  159.  *         description: Error creating asset
  160.  *         content:
  161.  *           application/json:
  162.  *             schema:
  163.  *               type: object
  164.  *               properties:
  165.  *                 message:
  166.  *                   type: string
  167.  *                 success:
  168.  *                   type: boolean
  169.  */
  170.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement