3131use OCP \AppFramework \Http \Attribute \ApiRoute ;
3232use OCP \AppFramework \Http \Attribute \NoAdminRequired ;
3333use OCP \AppFramework \Http \Attribute \NoCSRFRequired ;
34+ use OCP \AppFramework \Http \Attribute \OpenAPI ;
3435use OCP \AppFramework \Http \Attribute \PublicPage ;
3536use OCP \AppFramework \Http \DataResponse ;
3637use OCP \IL10N ;
@@ -83,8 +84,9 @@ public function __construct(
8384 #[NoCSRFRequired]
8485 #[RequireManager]
8586 #[PublicPage]
87+ #[OpenAPI(tags: ['signing ' ])]
8688 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/sign/file_id/{fileId} ' , requirements: ['apiVersion ' => '(v1) ' ])]
87- public function signUsingFileId (int $ fileId , string $ method , array $ elements = [], string $ identifyValue = '' , string $ token = '' , bool $ async = false ): DataResponse {
89+ public function signByFileId (int $ fileId , string $ method , array $ elements = [], string $ identifyValue = '' , string $ token = '' , bool $ async = false ): DataResponse {
8890 return $ this ->sign ($ method , $ elements , $ identifyValue , $ token , $ fileId , null , $ async );
8991 }
9092
@@ -107,8 +109,9 @@ public function signUsingFileId(int $fileId, string $method, array $elements = [
107109 #[NoCSRFRequired]
108110 #[RequireSigner]
109111 #[PublicPage]
112+ #[OpenAPI(tags: ['signing ' ])]
110113 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/sign/uuid/{uuid} ' , requirements: ['apiVersion ' => '(v1) ' ])]
111- public function signUsingUuid (string $ uuid , string $ method , array $ elements = [], string $ identifyValue = '' , string $ token = '' , bool $ async = false ): DataResponse {
114+ public function signBySignerUuid (string $ uuid , string $ method , array $ elements = [], string $ identifyValue = '' , string $ token = '' , bool $ async = false ): DataResponse {
112115 return $ this ->sign ($ method , $ elements , $ identifyValue , $ token , null , $ uuid , $ async );
113116 }
114117
@@ -253,6 +256,7 @@ private function signSync($libreSignFile, array $elements, array $metadata): Dat
253256 #[NoCSRFRequired]
254257 #[PublicPage]
255258 #[CanSignRequestUuid]
259+ #[OpenAPI(tags: ['signing ' ])]
256260 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/sign/uuid/{uuid}/renew/{method} ' , requirements: ['apiVersion ' => '(v1) ' ])]
257261 public function signRenew (string $ method ): DataResponse {
258262 $ this ->signFileService ->renew (
@@ -283,8 +287,9 @@ public function signRenew(string $method): DataResponse {
283287 #[NoCSRFRequired]
284288 #[RequireSigner]
285289 #[PublicPage]
290+ #[OpenAPI(tags: ['signing ' ])]
286291 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/sign/uuid/{uuid}/code ' , requirements: ['apiVersion ' => '(v1) ' ])]
287- public function getCodeUsingUuid (string $ uuid , ?string $ identifyMethod , ?string $ signMethod , ?string $ identify ): DataResponse {
292+ public function requestCodeBySignerUuid (string $ uuid , ?string $ identifyMethod , ?string $ signMethod , ?string $ identify ): DataResponse {
288293 try {
289294 $ signRequest = $ this ->signRequestMapper ->getBySignerUuidAndUserId ($ uuid );
290295 } catch (\Throwable ) {
@@ -309,8 +314,9 @@ public function getCodeUsingUuid(string $uuid, ?string $identifyMethod, ?string
309314 #[NoCSRFRequired]
310315 #[RequireSigner]
311316 #[PublicPage]
317+ #[OpenAPI(tags: ['signing ' ])]
312318 #[ApiRoute(verb: 'POST ' , url: '/api/{apiVersion}/sign/file_id/{fileId}/code ' , requirements: ['apiVersion ' => '(v1) ' ])]
313- public function getCodeUsingFileId (int $ fileId , ?string $ identifyMethod , ?string $ signMethod , ?string $ identify ): DataResponse {
319+ public function requestCodeByFileId (int $ fileId , ?string $ identifyMethod , ?string $ signMethod , ?string $ identify ): DataResponse {
314320 try {
315321 $ signRequest = $ this ->signRequestMapper ->getByFileIdAndUserId ($ fileId );
316322 } catch (\Throwable ) {
0 commit comments