Skip to content

Commit b8cefb8

Browse files
authored
chore: remove useless trailing whitespaces which make test edit harder (#422)
1 parent 52bc5bf commit b8cefb8

File tree

7 files changed

+55
-56
lines changed

7 files changed

+55
-56
lines changed

templates/base/route-docs.ejs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ const jsDocLines = _.compact([
2121
` * @response \`${status}\` \`${_.replace(_.replace(type, /\/\*/g, "\\*"), /\*\//g, "*\\")}\` ${description}`,
2222
)
2323
: []),
24-
]).join("\n");
25-
24+
]).map(str => str.trimEnd()).join("\n");
2625
2726
return {
2827
description: jsDocDescription,

templates/default/procedure-call.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const describeReturnType = () => {
8181
/**
8282
<%~ routeDocs.description %>
8383

84-
* <% /* Here you can add some other JSDoc tags */ %>
84+
*<% /* Here you can add some other JSDoc tags */ %>
8585

8686
<%~ routeDocs.lines %>
8787

@@ -96,4 +96,4 @@ const describeReturnType = () => {
9696
<%~ bodyContentKindTmpl ? `type: ${bodyContentKindTmpl},` : '' %>
9797
<%~ responseFormatTmpl ? `format: ${responseFormatTmpl},` : '' %>
9898
...<%~ _.get(requestConfigParam, "name") %>,
99-
})<%~ route.namespace ? ',' : '' %>
99+
})<%~ route.namespace ? ',' : '' %>

templates/modular/procedure-call.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const describeReturnType = () => {
8181
/**
8282
<%~ routeDocs.description %>
8383

84-
* <% /* Here you can add some other JSDoc tags */ %>
84+
*<% /* Here you can add some other JSDoc tags */ %>
8585

8686
<%~ routeDocs.lines %>
8787

@@ -96,4 +96,4 @@ const describeReturnType = () => {
9696
<%~ bodyContentKindTmpl ? `type: ${bodyContentKindTmpl},` : '' %>
9797
<%~ responseFormatTmpl ? `format: ${responseFormatTmpl},` : '' %>
9898
...<%~ _.get(requestConfigParam, "name") %>,
99-
})
99+
})

tests/spec/responses/expected.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
277277
key = {
278278
/**
279279
* @description Revoke an Authentiq ID using email & phone. If called with `email` and `phone` only, a verification code will be sent by email. Do a second call adding `code` to complete the revocation.
280-
*
280+
*
281281
* @tags key, delete
282282
* @name KeyRevokeNosecret
283283
* @request DELETE:/key
@@ -289,7 +289,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
289289
* @response `401` `Error` Authentication error `auth-error`
290290
* @response `404` `Error` Unknown key `unknown-key`
291291
* @response `409` `Error` Confirm with code sent `confirm-first`
292-
* @response `default` `Error`
292+
* @response `default` `Error`
293293
*/
294294
keyRevokeNosecret: (
295295
query: {
@@ -318,7 +318,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
318318

319319
/**
320320
* @description Register a new ID `JWT(sub, devtoken)` v5: `JWT(sub, pk, devtoken, ...)` See: https://github.com/skion/authentiq/wiki/JWT-Examples
321-
*
321+
*
322322
* @tags key, post
323323
* @name KeyRegister
324324
* @request POST:/key
@@ -330,7 +330,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
330330
331331
}` Successfully registered
332332
* @response `409` `Error` Key already registered `duplicate-key`
333-
* @response `default` `Error`
333+
* @response `default` `Error`
334334
*/
335335
keyRegister: (body: AuthentiqID, params: RequestParams = {}) =>
336336
this.request<
@@ -351,7 +351,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
351351

352352
/**
353353
* @description Revoke an Identity (Key) with a revocation secret
354-
*
354+
*
355355
* @tags key, delete
356356
* @name KeyRevoke
357357
* @request DELETE:/key/{PK}
@@ -362,7 +362,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
362362
}` Successful response
363363
* @response `401` `Error` Key not found / wrong code `auth-error`
364364
* @response `404` `Error` Unknown key `unknown-key`
365-
* @response `default` `Error`
365+
* @response `default` `Error`
366366
*/
367367
keyRevoke: (
368368
pk: string,
@@ -388,7 +388,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
388388

389389
/**
390390
* @description Get public details of an Authentiq ID.
391-
*
391+
*
392392
* @tags key, get
393393
* @name GetKey
394394
* @request GET:/key/{PK}
@@ -402,7 +402,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
402402
}` Successfully retrieved
403403
* @response `404` `Error` Unknown key `unknown-key`
404404
* @response `410` `Error` Key is revoked (gone). `revoked-key`
405-
* @response `default` `Error`
405+
* @response `default` `Error`
406406
*/
407407
getKey: (pk: string, params: RequestParams = {}) =>
408408
this.request<
@@ -441,7 +441,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
441441

442442
/**
443443
* @description update properties of an Authentiq ID. (not operational in v4; use PUT for now) v5: POST issuer-signed email & phone scopes in a self-signed JWT See: https://github.com/skion/authentiq/wiki/JWT-Examples
444-
*
444+
*
445445
* @tags key, post
446446
* @name KeyUpdate
447447
* @request POST:/key/{PK}
@@ -451,7 +451,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
451451
452452
}` Successfully updated
453453
* @response `404` `Error` Unknown key `unknown-key`
454-
* @response `default` `Error`
454+
* @response `default` `Error`
455455
*/
456456
keyUpdate: (pk: string, body: AuthentiqID, params: RequestParams = {}) =>
457457
this.request<
@@ -470,7 +470,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
470470

471471
/**
472472
* @description Update Authentiq ID by replacing the object. v4: `JWT(sub,email,phone)` to bind email/phone hash; v5: POST issuer-signed email & phone scopes and PUT to update registration `JWT(sub, pk, devtoken, ...)` See: https://github.com/skion/authentiq/wiki/JWT-Examples
473-
*
473+
*
474474
* @tags key, put
475475
* @name KeyBind
476476
* @request PUT:/key/{PK}
@@ -481,7 +481,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
481481
}` Successfully updated
482482
* @response `404` `Error` Unknown key `unknown-key`
483483
* @response `409` `Error` Already bound to another key `duplicate-hash`
484-
* @response `default` `Error`
484+
* @response `default` `Error`
485485
*/
486486
keyBind: (pk: string, body: AuthentiqID, params: RequestParams = {}) =>
487487
this.request<
@@ -501,7 +501,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
501501
login = {
502502
/**
503503
* @description push sign-in request See: https://github.com/skion/authentiq/wiki/JWT-Examples
504-
*
504+
*
505505
* @tags login, post
506506
* @name PushLoginRequest
507507
* @request POST:/login
@@ -511,7 +511,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
511511
512512
}` Successful response
513513
* @response `401` `Error` Unauthorized for this callback audience `aud-error` or JWT should be self-signed `auth-error`
514-
* @response `default` `Error`
514+
* @response `default` `Error`
515515
*/
516516
pushLoginRequest: (
517517
query: {
@@ -539,7 +539,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
539539
scope = {
540540
/**
541541
* @description scope verification request See: https://github.com/skion/authentiq/wiki/JWT-Examples
542-
*
542+
*
543543
* @tags scope, post
544544
* @name SignRequest
545545
* @request POST:/scope
@@ -551,7 +551,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
551551
552552
}` Successful response
553553
* @response `429` `Error` Too Many Requests on same address / number `rate-limit`
554-
* @response `default` `Error`
554+
* @response `default` `Error`
555555
*/
556556
signRequest: (
557557
body: Claims,
@@ -580,7 +580,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
580580

581581
/**
582582
* @description delete a verification job
583-
*
583+
*
584584
* @tags scope, delete
585585
* @name SignDelete
586586
* @request DELETE:/scope/{job}
@@ -590,7 +590,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
590590
591591
}` Successfully deleted
592592
* @response `404` `Error` Job not found `unknown-job`
593-
* @response `default` `Error`
593+
* @response `default` `Error`
594594
*/
595595
signDelete: (job: string, params: RequestParams = {}) =>
596596
this.request<
@@ -608,7 +608,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
608608

609609
/**
610610
* @description get the status / current content of a verification job
611-
*
611+
*
612612
* @tags scope, get
613613
* @name SignRetrieve
614614
* @request GET:/scope/{job}
@@ -621,7 +621,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
621621
}` Successful response (JWT)
622622
* @response `204` `void` Confirmed, waiting for signing
623623
* @response `404` `Error` Job not found `unknown-job`
624-
* @response `default` `Error`
624+
* @response `default` `Error`
625625
*/
626626
signRetrieve: (job: string, params: RequestParams = {}) =>
627627
this.request<
@@ -659,7 +659,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
659659

660660
/**
661661
* @description this is a scope confirmation
662-
*
662+
*
663663
* @tags scope, post
664664
* @name SignConfirm
665665
* @request POST:/scope/{job}
@@ -671,7 +671,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
671671
* @response `401` `Error` Confirmation error `auth-error`
672672
* @response `404` `Error` Job not found `unknown-job`
673673
* @response `405` `Error` JWT POSTed to scope `not-supported`
674-
* @response `default` `Error`
674+
* @response `default` `Error`
675675
*/
676676
signConfirm: (job: string, params: RequestParams = {}) =>
677677
this.request<
@@ -690,7 +690,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
690690

691691
/**
692692
* @description authority updates a JWT with its signature See: https://github.com/skion/authentiq/wiki/JWT-Examples
693-
*
693+
*
694694
* @tags scope, put
695695
* @name SignUpdate
696696
* @request PUT:/scope/{job}
@@ -703,7 +703,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
703703
}` Successfully updated
704704
* @response `404` `Error` Job not found `unknown-job`
705705
* @response `409` `Error` Job not confirmed yet `confirm-first`
706-
* @response `default` `Error`
706+
* @response `default` `Error`
707707
*/
708708
signUpdate: (job: string, params: RequestParams = {}) =>
709709
this.request<

0 commit comments

Comments
 (0)