fix: path of url

Was wrong, fixed.

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2025-01-22 09:00:59 -03:00
parent 8832985dad
commit acf677fd7c
5 changed files with 385 additions and 385 deletions

View file

@ -215,7 +215,7 @@ class SignatureElementsController extends AEnvironmentAwareController implements
#[PublicPage]
#[NoCSRFRequired]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[ApiRoute(verb: 'PATCH', url: '/api/{apiVersion}/signature/elements/preview/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
#[ApiRoute(verb: 'PATCH', url: '/api/{apiVersion}/signature/elements/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
public function patchSignatureElement(int $nodeId, string $type = '', array $file = []): DataResponse {
try {
$element['nodeId'] = $nodeId;

View file

@ -7629,6 +7629,127 @@
}
}
}
}
},
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
"get": {
"operationId": "signature_elements-get-signature-element",
"summary": "Get signature element of signer",
"tags": [
"signature_elements"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "nodeId",
"in": "path",
"description": "Node id of a Nextcloud file",
"required": true,
"schema": {
"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/UserElement"
}
}
}
}
}
}
}
},
"404": {
"description": "Invalid data",
"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": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"patch": {
"operationId": "signature_elements-patch-signature-element",
@ -7789,127 +7910,6 @@
}
}
}
}
},
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
"get": {
"operationId": "signature_elements-get-signature-element",
"summary": "Get signature element of signer",
"tags": [
"signature_elements"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "nodeId",
"in": "path",
"description": "Node id of a Nextcloud file",
"required": true,
"schema": {
"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/UserElement"
}
}
}
}
}
}
}
},
"404": {
"description": "Invalid data",
"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": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "signature_elements-delete-signature-element",

View file

@ -7533,6 +7533,127 @@
}
}
}
}
},
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
"get": {
"operationId": "signature_elements-get-signature-element",
"summary": "Get signature element of signer",
"tags": [
"signature_elements"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "nodeId",
"in": "path",
"description": "Node id of a Nextcloud file",
"required": true,
"schema": {
"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/UserElement"
}
}
}
}
}
}
}
},
"404": {
"description": "Invalid data",
"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": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"patch": {
"operationId": "signature_elements-patch-signature-element",
@ -7693,127 +7814,6 @@
}
}
}
}
},
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
"get": {
"operationId": "signature_elements-get-signature-element",
"summary": "Get signature element of signer",
"tags": [
"signature_elements"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "nodeId",
"in": "path",
"description": "Node id of a Nextcloud file",
"required": true,
"schema": {
"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/UserElement"
}
}
}
}
}
}
}
},
"404": {
"description": "Invalid data",
"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": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "signature_elements-delete-signature-element",

View file

@ -896,8 +896,7 @@ export type paths = {
delete?: never;
options?: never;
head?: never;
/** Update signature element */
patch: operations["signature_elements-patch-signature-element"];
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
@ -915,7 +914,8 @@ export type paths = {
delete: operations["signature_elements-delete-signature-element"];
options?: never;
head?: never;
patch?: never;
/** Update signature element */
patch: operations["signature_elements-patch-signature-element"];
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": {
@ -4060,74 +4060,6 @@ export interface operations {
};
};
};
"signature_elements-patch-signature-element": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
/** @description Node id of a Nextcloud file */
nodeId: number;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/**
* @description The type of signature element
* @default
*/
type?: string;
/**
* @description Element object
* @default {}
*/
file?: {
[key: string]: Record<string, never>;
};
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
elements: components["schemas"]["UserElement"][];
message: string;
};
};
};
};
};
/** @description Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
"signature_elements-get-signature-element": {
parameters: {
query?: never;
@ -4226,6 +4158,74 @@ export interface operations {
};
};
};
"signature_elements-patch-signature-element": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
/** @description Node id of a Nextcloud file */
nodeId: number;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/**
* @description The type of signature element
* @default
*/
type?: string;
/**
* @description Element object
* @default {}
*/
file?: {
[key: string]: Record<string, never>;
};
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
elements: components["schemas"]["UserElement"][];
message: string;
};
};
};
};
};
/** @description Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
"admin-generate-certificate-cfssl": {
parameters: {
query?: never;

View file

@ -896,8 +896,7 @@ export type paths = {
delete?: never;
options?: never;
head?: never;
/** Update signature element */
patch: operations["signature_elements-patch-signature-element"];
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": {
@ -915,7 +914,8 @@ export type paths = {
delete: operations["signature_elements-delete-signature-element"];
options?: never;
head?: never;
patch?: never;
/** Update signature element */
patch: operations["signature_elements-patch-signature-element"];
trace?: never;
};
};
@ -3914,74 +3914,6 @@ export interface operations {
};
};
};
"signature_elements-patch-signature-element": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
/** @description Node id of a Nextcloud file */
nodeId: number;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/**
* @description The type of signature element
* @default
*/
type?: string;
/**
* @description Element object
* @default {}
*/
file?: {
[key: string]: Record<string, never>;
};
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
elements: components["schemas"]["UserElement"][];
message: string;
};
};
};
};
};
/** @description Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
"signature_elements-get-signature-element": {
parameters: {
query?: never;
@ -4080,4 +4012,72 @@ export interface operations {
};
};
};
"signature_elements-patch-signature-element": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
/** @description Node id of a Nextcloud file */
nodeId: number;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/**
* @description The type of signature element
* @default
*/
type?: string;
/**
* @description Element object
* @default {}
*/
file?: {
[key: string]: Record<string, never>;
};
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
elements: components["schemas"]["UserElement"][];
message: string;
};
};
};
};
};
/** @description Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
}