Skip to content

Commit cc98430

Browse files
ahoseiniansmorimoto
authored andcommitted
Update the regex to be more concise and inclue 1 letter params
#686 (comment)
1 parent f8b8d18 commit cc98430

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

src/schema-routes/schema-routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class SchemaRoutes {
9696
originalRouteName;
9797

9898
const pathParamMatches = (routeName || "").match(
99-
/({(([A-z]){1}([a-zA-Z0-9-_.]-?_?\.?)+)([0-9]+)?})|(:(([A-z]){1}([a-zA-Z0-9-_.]-?_?\.?)+)([0-9]+)?:?)/g,
99+
/({[a-zA-Z]([a-zA-Z0-9-_.])*})|(:[a-zA-Z]([-_.]?[a-zA-Z0-9-_.])*:?)/g,
100100
);
101101

102102
// used in case when path parameters is not declared in requestInfo.parameters ("in": "path")

tests/spec/defaultAsSuccess/__snapshots__/basic.test.ts.snap

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
466466
format: "json",
467467
...params,
468468
}),
469+
470+
/**
471+
* @description Get public details of an Authentiq ID.
472+
*
473+
* @tags key, get
474+
* @name UnderlinesDetail
475+
* @request GET:/i_key/underlines/{i__UK}
476+
*/
477+
underlinesDetail: (iUk: string, params: RequestParams = {}) =>
478+
this.request<
479+
{
480+
/** base64safe encoded public signing key */
481+
sub?: string;
482+
},
483+
Error
484+
>({
485+
path: `/i_key/underlines/${iUk}`,
486+
method: "GET",
487+
format: "json",
488+
...params,
489+
}),
469490
};
470491
login = {
471492
/**

tests/spec/extractRequestParams/__snapshots__/basic.test.ts.snap

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
500500
format: "json",
501501
...params,
502502
}),
503+
504+
/**
505+
* @description Get public details of an Authentiq ID.
506+
*
507+
* @tags key, get
508+
* @name UnderlinesDetail
509+
* @request GET:/i_key/underlines/{i__UK}
510+
*/
511+
underlinesDetail: (iUk: string, params: RequestParams = {}) =>
512+
this.request<
513+
{
514+
/** base64safe encoded public signing key */
515+
sub?: string;
516+
},
517+
Error
518+
>({
519+
path: `/i_key/underlines/${iUk}`,
520+
method: "GET",
521+
format: "json",
522+
...params,
523+
}),
503524
};
504525
login = {
505526
/**

tests/spec/extractRequestParams/schema.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@
5656
"required": true,
5757
"type": "string"
5858
},
59+
"i__UK": {
60+
"description": "Variable with double __ in it.",
61+
"in": "path",
62+
"name": "i__UK",
63+
"required": true,
64+
"type": "string"
65+
},
5966
"i_PK": {
6067
"description": "Public Signing Key - Authentiq ID (43 chars)",
6168
"in": "path",
@@ -480,6 +487,36 @@
480487
"tags": ["key", "get"]
481488
}
482489
},
490+
"/i_key/underlines/{i__UK}": {
491+
"get": {
492+
"description": "Get public details of an Authentiq ID.\n",
493+
"parameters": [
494+
{
495+
"$ref": "#/parameters/i__UK"
496+
}
497+
],
498+
"produces": ["application/json"],
499+
"responses": {
500+
"200": {
501+
"description": "Successfully retrieved",
502+
"schema": {
503+
"properties": {
504+
"sub": {
505+
"description": "base64safe encoded public signing key",
506+
"type": "string"
507+
}
508+
},
509+
"title": "JWT",
510+
"type": "object"
511+
}
512+
},
513+
"default": {
514+
"$ref": "#/responses/ErrorResponse"
515+
}
516+
},
517+
"tags": ["key", "get"]
518+
}
519+
},
483520
"/login": {
484521
"post": {
485522
"consumes": ["application/jwt"],

0 commit comments

Comments
 (0)