mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
Add override documentation to upload and users-permissions
This commit is contained in:
parent
7906e43129
commit
f002a0d144
1
packages/strapi-plugin-email/.gitignore
vendored
1
packages/strapi-plugin-email/.gitignore
vendored
@ -7,3 +7,4 @@ stats.json
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
.idea
|
||||
documentation
|
||||
1
packages/strapi-plugin-upload/.gitignore
vendored
1
packages/strapi-plugin-upload/.gitignore
vendored
@ -9,3 +9,4 @@ yarn.lock
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
.idea
|
||||
documentation/1.0.0
|
||||
@ -6,7 +6,11 @@
|
||||
"handler": "Upload.upload",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Upload a file"
|
||||
"description": "Upload a file",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -39,7 +43,11 @@
|
||||
"handler": "Upload.count",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Retrieve the total number of uploaded files"
|
||||
"description": "Retrieve the total number of uploaded files",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -48,7 +56,11 @@
|
||||
"handler": "Upload.find",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Retrieve all file documents"
|
||||
"description": "Retrieve all file documents",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -57,7 +69,11 @@
|
||||
"handler": "Upload.findOne",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Retrieve a single file depending on its id"
|
||||
"description": "Retrieve a single file depending on its id",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -66,7 +82,11 @@
|
||||
"handler": "Upload.search",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Search for an uploaded file"
|
||||
"description": "Search for an uploaded file",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -75,7 +95,11 @@
|
||||
"handler": "Upload.destroy",
|
||||
"config": {
|
||||
"policies": [],
|
||||
"description": "Delete an uploaded file"
|
||||
"description": "Delete an uploaded file",
|
||||
"tag": {
|
||||
"plugin": "upload",
|
||||
"name": "File"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
165
packages/strapi-plugin-upload/documentation/overrides/1.0.0/upload-File.json
vendored
Normal file
165
packages/strapi-plugin-upload/documentation/overrides/1.0.0/upload-File.json
vendored
Normal file
@ -0,0 +1,165 @@
|
||||
{
|
||||
"paths": {
|
||||
"/upload/files/count": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"count": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/upload/files": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/UploadFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/upload/search/{id}": {
|
||||
"get": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "",
|
||||
"deprecated": false,
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/UploadFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/upload/files/{_id}": {
|
||||
"get": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "_id",
|
||||
"in": "path",
|
||||
"description": "",
|
||||
"deprecated": false,
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UploadFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "_id",
|
||||
"in": "path",
|
||||
"description": "",
|
||||
"deprecated": false,
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Document deleted"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"UploadFile": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string"
|
||||
},
|
||||
"hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"ext": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
},
|
||||
"mime": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"related": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type":"string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,3 +10,4 @@ actions.json
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
.idea
|
||||
documentation/1.0.0
|
||||
@ -228,7 +228,7 @@
|
||||
"config": {
|
||||
"policies": [],
|
||||
"prefix": "",
|
||||
"description": "Login a user using a custom provider",
|
||||
"description": "Successfull redirection after approving a provider",
|
||||
"tag": {
|
||||
"plugin": "users-permissions",
|
||||
"name": "User"
|
||||
|
||||
281
packages/strapi-plugin-users-permissions/documentation/overrides/1.0.0/users-permissions-User.json
vendored
Normal file
281
packages/strapi-plugin-users-permissions/documentation/overrides/1.0.0/users-permissions-User.json
vendored
Normal file
@ -0,0 +1,281 @@
|
||||
{
|
||||
"paths": {
|
||||
"/auth/local/register": {
|
||||
"post": {
|
||||
"tags": ["Authentication"],
|
||||
"externalDocs": {
|
||||
"description": "Find out more in the strapi's documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html#usage"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfully register a user",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Users-PermissionsRegisterResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"description": "",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["username", "email", "password"],
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"minLength": 3
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"minLength": 6
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"minLength": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/email-confirmation": {
|
||||
"get": {
|
||||
"tags": ["Authentication"]
|
||||
}
|
||||
},
|
||||
"/users-permissions/search/{id}": {
|
||||
"get": {
|
||||
"summary": "Retrieve a list of users by searching for their username or email",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "A string matching a user's email or username",
|
||||
"deprecated": false,
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/connect/*": {
|
||||
"get": {
|
||||
"summary": "Authenticate your user with a custom provider",
|
||||
"tags": ["Authentication"],
|
||||
"parameters":[
|
||||
{
|
||||
"name": "provider",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"deprecated": false,
|
||||
"description": "The name of the provider you want to use",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"externalDocs": {
|
||||
"description": "Find out more about the authentication flow in the strapi documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html#providers"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Your user is redirected"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/local": {
|
||||
"post": {
|
||||
"externalDocs": {
|
||||
"description": "Find out more in the strapi's documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html#login"
|
||||
},
|
||||
"tags": ["Authentication"],
|
||||
"requestBody": {
|
||||
"description": "The identifier param can either be an email or a username",
|
||||
"content": {
|
||||
"application/json":{
|
||||
"schema":{
|
||||
"required":[
|
||||
"identifier",
|
||||
"password"
|
||||
],
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"type": "string"
|
||||
},
|
||||
"password":{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"identifier": "hi@strapi.io",
|
||||
"password": "superSecure123"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Users-PermissionsRegisterResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/{provider}/callback": {
|
||||
"get": {
|
||||
"tags": ["Authentication"],
|
||||
"externalDocs": {
|
||||
"description": "Find out more in the strapi's documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html#providers"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "provider",
|
||||
"in": "path",
|
||||
"description": "The provider used to authenticate your user",
|
||||
"deprecated": false,
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successfull redirection after approving a provider",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Users-PermissionsRegisterResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/forgot-password": {
|
||||
"post": {
|
||||
"tags": ["Authentication"],
|
||||
"summary": "Send an email to reset your password",
|
||||
"externalDocs": {
|
||||
"description": "Find out more in the strapi's documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html#send-forgot-password-request"
|
||||
},
|
||||
"requestBody": {
|
||||
"description": "",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://mon-site.com/rest-password"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Email sent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/reset-password": {
|
||||
"post": {
|
||||
"tags": ["Authentication"],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Users-PermissionsRegisterResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"description": "",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["code", "password", "passwordConfirmation"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"passwordConfirmation": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Users-PermissionsRegisterResponse": {
|
||||
"properties": {
|
||||
"jwt": {
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "#/components/schemas/Users-PermissionsUser"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Authentication",
|
||||
"description": "All the routes related to the authentication",
|
||||
"externalDocs": {
|
||||
"description": "Find out more in strapi's documentation",
|
||||
"url": "https://strapi.io/documentation/guides/authentication.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Users-Permissions - User"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user