Просмотр исходного кода

Merge commit '4c6b563dc953e9172d378309ec5812aedebdfa4c' into reactify-admin/enable-aws-setting

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

+ 12 - 22
src/server/routes/apiv3/app-settings.js

@@ -52,6 +52,7 @@ const validator = {
  *    schemas:
  *    schemas:
  *      AppSettingParams:
  *      AppSettingParams:
  *        type: object
  *        type: object
+ *        properties:
  *          title:
  *          title:
  *            type: String
  *            type: String
  *            description: site name show on page header and tilte of HTML
  *            description: site name show on page header and tilte of HTML
@@ -66,6 +67,7 @@ const validator = {
  *            description: enable upload file except image file
  *            description: enable upload file except image file
  *     SiteUrlSettingParams:
  *     SiteUrlSettingParams:
  *        type: object
  *        type: object
+ *        properties:
  *          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
@@ -74,6 +76,7 @@ const validator = {
  *            description: environment variable 'APP_SITE_URL'
  *            description: environment variable 'APP_SITE_URL'
  *     MailSettingParams:
  *     MailSettingParams:
  *        type: object
  *        type: object
+ *        properties:
  *          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
@@ -131,10 +134,9 @@ module.exports = (crowi) => {
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
    *                  properties:
    *                  properties:
-   *                    schema:
-   *                      $ref: '#/components/schemas/AppSettingParams'
-   *                      $ref: '#/components/schemas/SiteUrlSettingParams'
-   *                      $ref: '#/components/schemas/MailSettingParams'
+   *                    appSettingsParams:
+   *                      type: object
+   *                      description: app settings params
    */
    */
   router.get('/', accessTokenParser, loginRequired, adminRequired, async(req, res) => {
   router.get('/', accessTokenParser, loginRequired, adminRequired, async(req, res) => {
     const appSettingsParams = {
     const appSettingsParams = {
@@ -172,18 +174,14 @@ module.exports = (crowi) => {
    *          content:
    *          content:
    *            application/json:
    *            application/json:
    *              schema:
    *              schema:
-   *                type: object
-   *                properties:
-   *                  $ref: '#/components/schemas/AppSettingParams'
+   *                $ref: '#/components/schemas/AppSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update app setting
    *            description: Succeeded to update app setting
    *            content:
    *            content:
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
-   *                  properties:
-   *                    status:
-   *                      $ref: '#/components/schemas/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 = {
@@ -223,18 +221,14 @@ module.exports = (crowi) => {
    *          content:
    *          content:
    *            application/json:
    *            application/json:
    *              schema:
    *              schema:
-   *                type: object
-   *                properties:
-   *                  $ref: '#/components/schemas/SiteUrlSettingParams'
+   *                $ref: '#/components/schemas/SiteUrlSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update site url setting
    *            description: Succeeded to update site url setting
    *            content:
    *            content:
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
-   *                  properties:
-   *                    status:
-   *                      $ref: '#/components/schemas/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) => {
 
 
@@ -317,18 +311,14 @@ module.exports = (crowi) => {
    *          content:
    *          content:
    *            application/json:
    *            application/json:
    *              schema:
    *              schema:
-   *                type: object
-   *                properties:
-   *                  $ref: '#/components/schemas/MailSettingParams'
+   *                $ref: '#/components/schemas/MailSettingParams'
    *        responses:
    *        responses:
    *          200:
    *          200:
    *            description: Succeeded to update site url setting
    *            description: Succeeded to update site url setting
    *            content:
    *            content:
    *              application/json:
    *              application/json:
    *                schema:
    *                schema:
-   *                  properties:
-   *                    status:
-   *                      $ref: '#/components/schemas/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) => {
     // テストメール送信によるバリデート
     // テストメール送信によるバリデート