Skip to content

Commit ceea4bf

Browse files
author
Ifeora Okechukwu
committed
fixing regex checks for scalar input types
Signed-off-by: Ifeora Okechukwu <ifeora@deimos.co.za>
1 parent 4d517b3 commit ceea4bf

File tree

7 files changed

+271
-44
lines changed

7 files changed

+271
-44
lines changed

packages/openapi-to-graphql/lib/schema_builder.js

Lines changed: 82 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/schema_builder.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/utils.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,25 @@ export declare const mitigations: {
3333
LIMIT_ARGUMENT_NAME_COLLISION: string;
3434
OAUTH_SECURITY_SCHEME: string;
3535
};
36+
/**
37+
* verify that a variable contains a safe int (2^31)
38+
*/
3639
export declare function isSafeInteger(n: unknown): n is number;
40+
/**
41+
* verify that a variable contains a safe long (2^53)
42+
*/
3743
export declare function isSafeLong(n: unknown): n is number;
44+
/**
45+
* verify that a vriable contains a valid UUID string
46+
*/
47+
export declare function isUUID(s: any): boolean;
48+
/**
49+
* verify
50+
*/
51+
export declare function isURL(s: any): boolean;
52+
/**
53+
* verify that a vriable contains a safe date/date-time string
54+
*/
3855
export declare function isSafeDate(n: string): boolean;
3956
/**
4057
* get the correct type of a variable

packages/openapi-to-graphql/lib/utils.js

Lines changed: 39 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)