Skip to content

Commit

Permalink
Merge pull request #9526 from goofmint/fix/doc-v3-installer
Browse files Browse the repository at this point in the history
support(jsdoc): add swagger document to installer.ts
  • Loading branch information
yuki-takei authored Dec 27, 2024
2 parents e938555 + 33936c8 commit 46b693b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/app/bin/swagger-jsdoc/definition-apiv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module.exports = {
'UserGroups',
'Users Management',
'FullTextSearch Management',
'Install',
],
},
{
Expand Down
42 changes: 42 additions & 0 deletions apps/app/src/server/routes/apiv3/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@ module.exports = (crowi: Crowi): Router => {

const minPasswordLength = configManager.getConfig('crowi', 'app:minPasswordLength');

/**
* @swagger
*
* /installer:
* post:
* tags: [Install]
* security: []
* operationId: Install
* summary: /installer
* description: Install GROWI
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* registerForm:
* type: object
* properties:
* name:
* type: string
* username:
* type: string
* email:
* type: string
* password:
* type: string
* app:globalLang:
* type: string
* default: en_US
* responses:
* 200:
* description: import settings params
* content:
* application/json:
* schema:
* properties:
* message:
* type: string
* example: Installation completed (Logged in as an admin user)
*/
// eslint-disable-next-line max-len
router.post('/', registerRules(minPasswordLength), registerValidation, addActivity, async(req: FormRequest, res: ApiV3Response) => {
const appService = crowi.appService;
Expand Down

0 comments on commit 46b693b

Please sign in to comment.