Skip to content

Commit

Permalink
Merge pull request #4266 from LibreSign/fix/path-of-renew-url
Browse files Browse the repository at this point in the history
fix: path of renew url
  • Loading branch information
vitormattos authored Jan 13, 2025
2 parents 43f24e0 + 1ac6f7e commit da01a27
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
8 changes: 4 additions & 4 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function signFPath(string $uuid): TemplateResponse {
}

/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
*
* The path is used only by frontend
*
Expand All @@ -259,13 +259,13 @@ public function signFPath(string $uuid): TemplateResponse {
#[RequireSetupOk]
#[PublicPage]
#[RequireSignRequestUuid]
#[FrontpageRoute(verb: 'GET', url: '/p/sign/{uuid}/pdf')]
public function signPdf(string $uuid): TemplateResponse {
#[FrontpageRoute(verb: 'GET', url: '/p/sign/{uuid}/{path}', requirements: ['path' => '.+'])]
public function signPPath(string $uuid): TemplateResponse {
return $this->sign($uuid);
}

/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
*
* The path is used only by frontend
*
Expand Down
17 changes: 13 additions & 4 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -1290,10 +1290,10 @@
}
}
},
"/index.php/apps/libresign/p/sign/{uuid}/pdf": {
"/index.php/apps/libresign/p/sign/{uuid}/{path}": {
"get": {
"operationId": "page-sign-pdf",
"summary": "Sign page to authenticated signer",
"operationId": "page-signp-path",
"summary": "Sign page to unauthenticated signer",
"description": "The path is used only by frontend",
"tags": [
"page"
Expand All @@ -1316,6 +1316,15 @@
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^.+$"
}
}
],
"responses": {
Expand All @@ -1335,7 +1344,7 @@
"/index.php/apps/libresign/p/sign/{uuid}": {
"get": {
"operationId": "page-sign",
"summary": "Sign page to authenticated signer",
"summary": "Sign page to unauthenticated signer",
"description": "The path is used only by frontend",
"tags": [
"page"
Expand Down
17 changes: 13 additions & 4 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1194,10 +1194,10 @@
}
}
},
"/index.php/apps/libresign/p/sign/{uuid}/pdf": {
"/index.php/apps/libresign/p/sign/{uuid}/{path}": {
"get": {
"operationId": "page-sign-pdf",
"summary": "Sign page to authenticated signer",
"operationId": "page-signp-path",
"summary": "Sign page to unauthenticated signer",
"description": "The path is used only by frontend",
"tags": [
"page"
Expand All @@ -1220,6 +1220,15 @@
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^.+$"
}
}
],
"responses": {
Expand All @@ -1239,7 +1248,7 @@
"/index.php/apps/libresign/p/sign/{uuid}": {
"get": {
"operationId": "page-sign",
"summary": "Sign page to authenticated signer",
"summary": "Sign page to unauthenticated signer",
"description": "The path is used only by frontend",
"tags": [
"page"
Expand Down
11 changes: 6 additions & 5 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ export type paths = {
patch?: never;
trace?: never;
};
"/index.php/apps/libresign/p/sign/{uuid}/pdf": {
"/index.php/apps/libresign/p/sign/{uuid}/{path}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
* @description The path is used only by frontend
*/
get: operations["page-sign-pdf"];
get: operations["page-signp-path"];
put?: never;
post?: never;
delete?: never;
Expand All @@ -181,7 +181,7 @@ export type paths = {
cookie?: never;
};
/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
* @description The path is used only by frontend
*/
get: operations["page-sign"];
Expand Down Expand Up @@ -1510,13 +1510,14 @@ export interface operations {
};
};
};
"page-sign-pdf": {
"page-signp-path": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Sign request uuid */
uuid: string;
path: string;
};
cookie?: never;
};
Expand Down
11 changes: 6 additions & 5 deletions src/types/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ export type paths = {
patch?: never;
trace?: never;
};
"/index.php/apps/libresign/p/sign/{uuid}/pdf": {
"/index.php/apps/libresign/p/sign/{uuid}/{path}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
* @description The path is used only by frontend
*/
get: operations["page-sign-pdf"];
get: operations["page-signp-path"];
put?: never;
post?: never;
delete?: never;
Expand All @@ -181,7 +181,7 @@ export type paths = {
cookie?: never;
};
/**
* Sign page to authenticated signer
* Sign page to unauthenticated signer
* @description The path is used only by frontend
*/
get: operations["page-sign"];
Expand Down Expand Up @@ -1364,13 +1364,14 @@ export interface operations {
};
};
};
"page-sign-pdf": {
"page-signp-path": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Sign request uuid */
uuid: string;
path: string;
};
cookie?: never;
};
Expand Down

0 comments on commit da01a27

Please sign in to comment.