|
@@ -33,7 +33,36 @@ module.exports = (crowi) => {
|
|
|
body('isEnabledLinebreaks').isBoolean(),
|
|
body('isEnabledLinebreaks').isBoolean(),
|
|
|
body('isEnabledLinebreaksInComments').isBoolean(),
|
|
body('isEnabledLinebreaksInComments').isBoolean(),
|
|
|
];
|
|
];
|
|
|
- // TODO swagger
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * paths:
|
|
|
|
|
+ * /_api/v3/markdown-setting/lineBreak:
|
|
|
|
|
+ * put:
|
|
|
|
|
+ * tags: [MarkDownSetting]
|
|
|
|
|
+ * description: Update lineBreak
|
|
|
|
|
+ * parameters:
|
|
|
|
|
+ * - name: isEnabledLinebreaks
|
|
|
|
|
+ * in: query
|
|
|
|
|
+ * description: enable lineBreak
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * - name: isEnabledLinebreaksInComments
|
|
|
|
|
+ * in: query
|
|
|
|
|
+ * description: enable lineBreak in comment
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Updating lineBreak success
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * xssParams:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * description: new lineBreak params
|
|
|
|
|
+ */
|
|
|
router.put('/lineBreak', loginRequiredStrictly, adminRequired, csrf, validator.lineBreak, ApiV3FormValidator, async(req, res) => {
|
|
router.put('/lineBreak', loginRequiredStrictly, adminRequired, csrf, validator.lineBreak, ApiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
|
|
const lineBreakParams = {
|
|
const lineBreakParams = {
|
|
@@ -65,20 +94,20 @@ module.exports = (crowi) => {
|
|
|
* paths:
|
|
* paths:
|
|
|
* /_api/v3/markdown-setting/xss:
|
|
* /_api/v3/markdown-setting/xss:
|
|
|
* put:
|
|
* put:
|
|
|
- * tags: [Users]
|
|
|
|
|
|
|
+ * tags: [MarkDownSetting]
|
|
|
* description: Update xss
|
|
* description: Update xss
|
|
|
* parameters:
|
|
* parameters:
|
|
|
- * - name: markdown:xss:isEnabledPrevention
|
|
|
|
|
|
|
+ * - name: isEnabledPrevention
|
|
|
* in: query
|
|
* in: query
|
|
|
* description: enable xss
|
|
* description: enable xss
|
|
|
* schema:
|
|
* schema:
|
|
|
* type: boolean
|
|
* type: boolean
|
|
|
- * - name: markdown:xss:option
|
|
|
|
|
|
|
+ * - name: option
|
|
|
* in: query
|
|
* in: query
|
|
|
* description: xss option
|
|
* description: xss option
|
|
|
* schema:
|
|
* schema:
|
|
|
* type: number
|
|
* type: number
|
|
|
- * - name: markdown:xss:tagWhiteList
|
|
|
|
|
|
|
+ * - name: tagWhiteList
|
|
|
* in: query
|
|
* in: query
|
|
|
* description: custom tag whitelist
|
|
* description: custom tag whitelist
|
|
|
* schema:
|
|
* schema:
|
|
@@ -86,7 +115,7 @@ module.exports = (crowi) => {
|
|
|
* items:
|
|
* items:
|
|
|
* type: string
|
|
* type: string
|
|
|
* description: tag whitelist
|
|
* description: tag whitelist
|
|
|
- * - name: markdown:xss:attrWhiteList
|
|
|
|
|
|
|
+ * - name: attrWhiteList
|
|
|
* in: query
|
|
* in: query
|
|
|
* description: custom attr whitelist
|
|
* description: custom attr whitelist
|
|
|
* schema:
|
|
* schema:
|