mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-24 14:35:46 +00:00
update openapi spec
This commit is contained in:
parent
a3f060350c
commit
517ce4973f
181
openapi.yaml
181
openapi.yaml
@ -18,9 +18,9 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/RegisterUser'
|
$ref: '#/components/schemas/RegisterUser'
|
||||||
example:
|
example:
|
||||||
username: "testuser"
|
username: 'testuser'
|
||||||
password: "mysuperlongandsecurepassword"
|
password: 'mysuperlongandsecurepassword'
|
||||||
email: "testuser@example.com"
|
email: 'testuser@example.com'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful registration
|
description: Successful registration
|
||||||
@ -53,8 +53,8 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/LoginUser'
|
$ref: '#/components/schemas/LoginUser'
|
||||||
example:
|
example:
|
||||||
username: "testuser"
|
username: 'testuser'
|
||||||
password: "mysuperlongandsecurepassword"
|
password: 'mysuperlongandsecurepassword'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful authentication
|
description: Successful authentication
|
||||||
@ -103,7 +103,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/DeleteUser'
|
$ref: '#/components/schemas/DeleteUser'
|
||||||
example:
|
example:
|
||||||
password: "mysuperlongandsecurepassword"
|
password: 'mysuperlongandsecurepassword'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@ -138,7 +138,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UserDetailCheck'
|
$ref: '#/components/schemas/UserDetailCheck'
|
||||||
example:
|
example:
|
||||||
val: "testuser"
|
val: 'testuser'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@ -165,7 +165,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UserDetailCheck'
|
$ref: '#/components/schemas/UserDetailCheck'
|
||||||
example:
|
example:
|
||||||
val: "testuser@example.com"
|
val: 'testuser@example.com'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@ -207,168 +207,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/BuildDetails'
|
$ref: '#/components/schemas/BuildDetails'
|
||||||
/api/v1/mcaptcha/domain/add:
|
|
||||||
post:
|
|
||||||
security:
|
|
||||||
- cookieAuth: []
|
|
||||||
summary: Add new domain to mCaptcha
|
|
||||||
operationId: addDomain
|
|
||||||
tags:
|
|
||||||
- mcaptcha
|
|
||||||
- domain
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AddDomain'
|
|
||||||
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: "Bad request: Submited domain name isn't a URI"
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'401':
|
|
||||||
description: 'authentication failed, wrong password'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'500':
|
|
||||||
description: Internal server error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
|
|
||||||
/api/v1/mcaptcha/domain/domain/verify/challenge/get:
|
|
||||||
post:
|
|
||||||
security:
|
|
||||||
- cookieAuth: []
|
|
||||||
summary: Get verification challenge for adding a domain
|
|
||||||
operationId: challengeDomain
|
|
||||||
tags:
|
|
||||||
- mcaptcha
|
|
||||||
- domain
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AddDomain'
|
|
||||||
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/DomainVerificationChallenge'
|
|
||||||
'400':
|
|
||||||
description: "Bad request: Submited domain name isn't a URI"
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'401':
|
|
||||||
description: 'authentication failed, wrong password'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'500':
|
|
||||||
description: Internal server error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
|
|
||||||
/api/v1/mcaptcha/domain/domain/verify/challenge/prove:
|
|
||||||
post:
|
|
||||||
security:
|
|
||||||
- cookieAuth: []
|
|
||||||
summary: Verifiy domain
|
|
||||||
operationId: proveDomain
|
|
||||||
tags:
|
|
||||||
- mcaptcha
|
|
||||||
- domain
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AddDomain'
|
|
||||||
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: 'Bad request: challenge is courrupt'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'401':
|
|
||||||
description: 'authentication failed or challenge verification failure'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'500':
|
|
||||||
description: Internal server error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'503':
|
|
||||||
description: Client server unavailable, please check if your server is online
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
|
|
||||||
/api/v1/mcaptcha/domain/delete:
|
|
||||||
post:
|
|
||||||
security:
|
|
||||||
- cookieAuth: []
|
|
||||||
summary: Delete domain from mcaptcha
|
|
||||||
operationId: deleteDomain
|
|
||||||
tags:
|
|
||||||
- mcaptcha
|
|
||||||
- domain
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AddDomain'
|
|
||||||
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: 'Bad request: Submited URI is not a URI'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'401':
|
|
||||||
description: 'authentication failed'
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
'500':
|
|
||||||
description: Internal server error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
|
|
||||||
/api/v1/mcaptcha/domain/token/add:
|
/api/v1/mcaptcha/domain/token/add:
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
@ -765,8 +603,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Error'
|
$ref: '#/components/schemas/Error'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
RegisterUser:
|
RegisterUser:
|
||||||
@ -952,7 +788,6 @@ components:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 2147483647
|
maximum: 2147483647
|
||||||
|
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
cookieAuth:
|
cookieAuth:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user