yusuketk 6 лет назад
Родитель
Сommit
f4ff824890
1 измененных файлов с 15 добавлено и 9 удалено
  1. 15 9
      src/server/routes/apiv3/app-settings.js

+ 15 - 9
src/server/routes/apiv3/app-settings.js

@@ -43,7 +43,7 @@ const validator = {
  *
  *
  *  components:
  *  components:
  *    schemas:
  *    schemas:
- *      AppSettingsParams:
+ *      AppSettingParams:
  *        type: object
  *        type: object
  *          title:
  *          title:
  *            type: String
  *            type: String
@@ -57,12 +57,16 @@ const validator = {
  *          fileUpload:
  *          fileUpload:
  *            type: boolean
  *            type: boolean
  *            description: enable upload file except image file
  *            description: enable upload file except image file
+ *     SiteUrlSettingParams:
+ *        type: object
  *          siteUrl:
  *          siteUrl:
  *            type: String
  *            type: String
  *            description: Site URL. e.g. https://example.com, https://example.com:8080
  *            description: Site URL. e.g. https://example.com, https://example.com:8080
  *          envSiteUrl:
  *          envSiteUrl:
  *            type: String
  *            type: String
  *            description: environment variable 'APP_SITE_URL'
  *            description: environment variable 'APP_SITE_URL'
+ *     MailSettingParams:
+ *        type: object
  *          fromAddress:
  *          fromAddress:
  *            type: String
  *            type: String
  *            description: e-mail address used as from address of mail which sent from GROWI app
  *            description: e-mail address used as from address of mail which sent from GROWI app
@@ -103,8 +107,10 @@ module.exports = (crowi) => {
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
-   *                    AppSettingsParams:
-   *                      $ref: '#/components/schemas/AppSettingsParams'
+   *                    schema:
+   *                      $ref: '#/components/schemas/AppSettingParams'
+   *                      $ref: '#/components/schemas/SiteUrlSettingParams'
+   *                      $ref: '#/components/schemas/MailSettingParams'
    */
    */
   router.get('/', accessTokenParser, loginRequired, adminRequired, async(req, res) => {
   router.get('/', accessTokenParser, loginRequired, adminRequired, async(req, res) => {
     const appSettingsParams = {
     const appSettingsParams = {
@@ -139,7 +145,7 @@ module.exports = (crowi) => {
    *              schema:
    *              schema:
    *                type: object
    *                type: object
    *                properties:
    *                properties:
-   *                  $ref: '#/components/schemas/AppSettingsParams/AppSettingParams'
+   *                  $ref: '#/components/schemas/AppSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update app setting
    *            description: Succeeded to update app setting
@@ -148,7 +154,7 @@ module.exports = (crowi) => {
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
    *                    status:
    *                    status:
-   *                      $ref: '#/components/schemas/appSettingParams/AppSettingParams'
+   *                      $ref: '#/components/schemas/AppSettingParams'
    */
    */
   router.put('/app-setting', loginRequiredStrictly, adminRequired, csrf, validator.appSetting, ApiV3FormValidator, async(req, res) => {
   router.put('/app-setting', loginRequiredStrictly, adminRequired, csrf, validator.appSetting, ApiV3FormValidator, async(req, res) => {
     const requestAppSettingParams = {
     const requestAppSettingParams = {
@@ -190,7 +196,7 @@ module.exports = (crowi) => {
    *              schema:
    *              schema:
    *                type: object
    *                type: object
    *                properties:
    *                properties:
-   *                  $ref: '#/components/schemas/AppSettingsParams/SiteUrlSettingParams'
+   *                  $ref: '#/components/schemas/SiteUrlSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update site url setting
    *            description: Succeeded to update site url setting
@@ -199,7 +205,7 @@ module.exports = (crowi) => {
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
    *                    status:
    *                    status:
-   *                      $ref: '#/components/schemas/appSettingParams/SiteUrlSettingParams'
+   *                      $ref: '#/components/schemas/SiteUrlSettingParams'
    */
    */
   router.put('/site-url-setting', loginRequiredStrictly, adminRequired, csrf, validator.siteUrlSetting, ApiV3FormValidator, async(req, res) => {
   router.put('/site-url-setting', loginRequiredStrictly, adminRequired, csrf, validator.siteUrlSetting, ApiV3FormValidator, async(req, res) => {
 
 
@@ -284,7 +290,7 @@ module.exports = (crowi) => {
    *              schema:
    *              schema:
    *                type: object
    *                type: object
    *                properties:
    *                properties:
-   *                  $ref: '#/components/schemas/AppSettingsParams/MailSettingParams'
+   *                  $ref: '#/components/schemas/MailSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update site url setting
    *            description: Succeeded to update site url setting
@@ -293,7 +299,7 @@ module.exports = (crowi) => {
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
    *                    status:
    *                    status:
-   *                      $ref: '#/components/schemas/appSettingParams/MailSettingParams'
+   *                      $ref: '#/components/schemas/MailSettingParams'
    */
    */
   router.put('/mail-setting', loginRequiredStrictly, adminRequired, csrf, validator.mailSetting, ApiV3FormValidator, async(req, res) => {
   router.put('/mail-setting', loginRequiredStrictly, adminRequired, csrf, validator.mailSetting, ApiV3FormValidator, async(req, res) => {
     // テストメール送信によるバリデート
     // テストメール送信によるバリデート