Skip to content

Commit

Permalink
Merge pull request #4694 from LibreSign/chore/update-openapi
Browse files Browse the repository at this point in the history
chore: update openapi
  • Loading branch information
vitormattos authored Feb 28, 2025
2 parents 2897b25 + 7bb3881 commit 65e53fd
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 503 deletions.
Empty file added .github/workflows/openapi.yml
Empty file.
2 changes: 1 addition & 1 deletion lib/Controller/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct(
* @param string $email email to the new account
* @param string $password the password to then new account
* @param string|null $signPassword The password to create certificate
* @return DataResponse<Http::STATUS_OK|Http::STATUS_UNPROCESSABLE_ENTITY, array{action: 2000|2500, description?: null|string, filename?: string, message: string, pdf?: array{url: string}}|DataResponse<Http::STATUS_UNPROCESSABLE_ENTITY, array{message: string,action: int}, array{}>
* @return DataResponse<Http::STATUS_OK, array{action: 2000|2500, description?: null|string, filename?: string, message: string, pdf?: array{url: string}}, array{}>|DataResponse<Http::STATUS_UNPROCESSABLE_ENTITY, array{message: string,action: int}, array{}>
*
* 200: OK
* 422: Validation page not accessible if unauthenticated
Expand Down
1 change: 1 addition & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ public function validation(): TemplateResponse {
* @param string $uuid Sign request uuid
* @return TemplateResponse<Http::STATUS_OK, array{}>
*
* 200: OK
* 303: Redirected to validation page
* 401: Validation page not accessible if unauthenticated
*/
Expand Down
200 changes: 20 additions & 180 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,10 @@
}
],
"responses": {
"303": {
"description": "Redirected to validation page",
"headers": {
"Location": {
"200": {
"description": "OK",
"content": {
"text/html": {
"schema": {
"type": "string"
}
Expand Down Expand Up @@ -1805,19 +1805,27 @@
"data": {
"type": "object",
"required": [
"message",
"action",
"pdf",
"filename",
"description"
"message"
],
"properties": {
"message": {
"type": "string"
},
"action": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
2000,
2500
]
},
"description": {
"type": "string",
"nullable": true
},
"filename": {
"type": "string"
},
"message": {
"type": "string"
},
"pdf": {
"type": "object",
Expand All @@ -1829,12 +1837,6 @@
"type": "string"
}
}
},
"filename": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -3866,168 +3868,6 @@
}
}
}
},
"get": {
"operationId": "file-validate",
"summary": "Validate a file",
"description": "Validate a file returning file data.",
"tags": [
"file"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "type",
"in": "query",
"description": "The type of identifier could be Uuid or FileId",
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "identifier",
"in": "query",
"description": "The identifier value, could be string or integer, if UUID will be a string, if FileId will be an integer",
"schema": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"$ref": "#/components/schemas/ValidateFile"
}
}
}
}
}
}
}
},
"404": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"action",
"errors"
],
"properties": {
"action": {
"type": "integer",
"format": "int64"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
},
"messages": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/libresign/api/{apiVersion}/file/list": {
Expand Down
Loading

0 comments on commit 65e53fd

Please sign in to comment.