mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
[Swagger]Add /app/create
This commit is contained in:
parent
66d6f4420e
commit
a5ff6fb285
2 changed files with 54 additions and 0 deletions
|
@ -7,6 +7,59 @@ import rndstr from 'rndstr';
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
import serialize from '../../serializers/app';
|
import serialize from '../../serializers/app';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @swagger
|
||||||
|
* /app/create:
|
||||||
|
* post:
|
||||||
|
* summary: Create an application
|
||||||
|
* parameters:
|
||||||
|
* - $ref: "#/parameters/AccessToken"
|
||||||
|
* -
|
||||||
|
* name: name_id
|
||||||
|
* description: Application unique name
|
||||||
|
* in: formData
|
||||||
|
* required: true
|
||||||
|
* type: string
|
||||||
|
* -
|
||||||
|
* name: name
|
||||||
|
* description: Application name
|
||||||
|
* in: formData
|
||||||
|
* required: true
|
||||||
|
* type: string
|
||||||
|
* -
|
||||||
|
* name: description
|
||||||
|
* description: Application description
|
||||||
|
* in: formData
|
||||||
|
* required: true
|
||||||
|
* type: string
|
||||||
|
* -
|
||||||
|
* name: permission
|
||||||
|
* description: Permissions that application has
|
||||||
|
* in: formData
|
||||||
|
* required: true
|
||||||
|
* type: array
|
||||||
|
* items:
|
||||||
|
* type: string
|
||||||
|
* collectionFormat: csv
|
||||||
|
* -
|
||||||
|
* name: callback_url
|
||||||
|
* description: URL called back after authentication
|
||||||
|
* in: formData
|
||||||
|
* required: false
|
||||||
|
* type: string
|
||||||
|
*
|
||||||
|
* responses:
|
||||||
|
* 200:
|
||||||
|
* description: Created application's information
|
||||||
|
* schema:
|
||||||
|
* $ref: "#/definitions/Application"
|
||||||
|
*
|
||||||
|
* default:
|
||||||
|
* description: Failed
|
||||||
|
* schema:
|
||||||
|
* $ref: "#/definitions/Error"
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an app
|
* Create an app
|
||||||
*
|
*
|
||||||
|
|
|
@ -9,6 +9,7 @@ const files = [
|
||||||
'users.js',
|
'users.js',
|
||||||
//app
|
//app
|
||||||
'app/show.js',
|
'app/show.js',
|
||||||
|
'app/create.js',
|
||||||
'app/name_id/available.js',
|
'app/name_id/available.js',
|
||||||
//auth
|
//auth
|
||||||
'auth/accept.js',
|
'auth/accept.js',
|
||||||
|
|
Loading…
Reference in a new issue