Skip to content

Commit 9e4294b

Browse files
authored
Add missing docs (#443)
#SkipVersionBump
1 parent ec09e2f commit 9e4294b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"components": {},
3+
"name": "CronValidationService",
4+
"description": "Service for validating 6-field cron expressions with extended features.\n\nThis service handles cron validation logic for extended cron expression formats\nthat support additional features beyond standard Unix cron for more flexible\nscheduling capabilities.\n\nFormat: minutes hours day-of-month month day-of-week year\n\nKey Features:\n- Wildcards: asterisk (any value), question mark (any value for day fields)\n- Ranges: 1-5, MON-FRI, JAN-MAR\n- Steps: asterisk/15, 5/10, 1-5/2\n- Lists: 1,3,5, MON,WED,FRI\n- Special chars: L (last), W (weekday), hash (nth occurrence)",
5+
"methods": {
6+
"description": "Methods used in service.",
7+
"values": [
8+
{
9+
"name": "isValidCron",
10+
"parameters": [
11+
{
12+
"name": "cron",
13+
"type": "string",
14+
"description": "The 6-field cron expression to validate"
15+
},
16+
{
17+
"name": "allowEmpty",
18+
"type": "boolean",
19+
"description": "Whether to allow empty cron expressions",
20+
"defaultValue": "false"
21+
}
22+
],
23+
"returnType": "boolean",
24+
"description": "Validates a complete 6-field cron expression."
25+
}
26+
]
27+
}
28+
}

projects/cps-ui-kit/src/lib/services/cron-validation.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Injectable } from '@angular/core';
1616
* - Lists: 1,3,5, MON,WED,FRI
1717
* - Special chars: L (last), W (weekday), hash (nth occurrence)
1818
* @see {@link https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#cron-based | AWS EventBridge Scheduler - Cron-based schedules}
19+
* @group Services
1920
*/
2021
@Injectable({
2122
providedIn: 'root'
@@ -27,6 +28,7 @@ export class CronValidationService {
2728
* @param cron - The 6-field cron expression to validate
2829
* @param allowEmpty - Whether to allow empty cron expressions
2930
* @returns boolean - True if the cron expression is valid
31+
* @group Method
3032
*/
3133
isValidCron(cron: string, allowEmpty = false): boolean {
3234
if (typeof cron !== 'string') return false;

0 commit comments

Comments
 (0)