You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d63939
Browse filesBrowse the repository at this point in the historyBrowse files
stlc-bot
committed
fix(api): derive OpenAPI request docs from runtime Zod schemas (#1421)
Copy file name to clipboardExpand all lines: pkg/cmd/batch.go
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ var batchList = cli.Command{
43
43
&requestflag.Flag[int64]{
44
44
Name: "limit",
45
45
Usage: "Batches per page. Defaults to 25.",
46
+
Default: 25,
46
47
QueryPath: "limit",
47
48
},
48
49
&requestflag.Flag[string]{
@@ -60,9 +61,9 @@ var batchList = cli.Command{
60
61
Usage: "Filter by status.",
61
62
QueryPath: "status",
62
63
},
63
-
&requestflag.Flag[string]{
64
+
&requestflag.Flag[any]{
64
65
Name: "tags",
65
-
Usage: "Comma-separated list of tags to filter by (matches batches having any of them).",
66
+
Usage: "Tags to filter by (matches batches having any of them). Pass repeated `tags` params or one comma-separated list, e.g. `tags=docs,competitor`.",
66
67
QueryPath: "tags",
67
68
},
68
69
},
@@ -121,6 +122,7 @@ var batchGetResults = cli.Command{
121
122
&requestflag.Flag[int64]{
122
123
Name: "limit",
123
124
Usage: "Records per page. Defaults to 25. A page can close early so its payload stays under ~8 MB; rely on next_cursor rather than counting records.",
Copy file name to clipboardExpand all lines: pkg/cmd/web.go
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -405,14 +405,14 @@ var webSearch = requestflag.WithInnerFlags(cli.Command{
405
405
Usage: "Keep hyperlinks in the Markdown.",
406
406
InnerField: "includeLinks",
407
407
},
408
-
&requestflag.InnerFlag[int64]{
408
+
&requestflag.InnerFlag[*int64]{
409
409
Name: "markdown-options.max-age-ms",
410
410
Usage: "Maximum cache age in milliseconds for result page content. Defaults to 180 days (15552000000 ms) when Markdown is requested, or 365 days (31536000000 ms) when only highlights are requested. Explicit values override either default. Maximum: 365 days. Set to 0 to force a fresh scrape.",
411
411
InnerField: "maxAgeMs",
412
412
},
413
413
&requestflag.InnerFlag[map[string]any]{
414
414
Name: "markdown-options.pdf",
415
-
Usage: "PDF handling. Use start/end to bound text extraction and OCR to a page range.",
415
+
Usage: "PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.",
416
416
InnerField: "pdf",
417
417
},
418
418
&requestflag.InnerFlag[bool]{
@@ -430,7 +430,7 @@ var webSearch = requestflag.WithInnerFlags(cli.Command{
430
430
Usage: "Strip nav, header, footer, and sidebar — keep only the primary article content.",
431
431
InnerField: "useMainContentOnly",
432
432
},
433
-
&requestflag.InnerFlag[int64]{
433
+
&requestflag.InnerFlag[*int64]{
434
434
Name: "markdown-options.wait-for-ms",
435
435
Usage: "Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heavy pages.",
436
436
InnerField: "waitForMs",
@@ -466,7 +466,7 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
466
466
Usage: "Fetch from this country (ISO 3166-1 alpha-2).",
467
467
BodyPath: "country",
468
468
},
469
-
&requestflag.Flag[[]string]{
469
+
&requestflag.Flag[any]{
470
470
Name: "exclude-selector",
471
471
Usage: "Remove matching elements after inclusions. Exclusions take precedence.",
472
472
BodyPath: "excludeSelectors",
@@ -495,15 +495,15 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
495
495
Default: true,
496
496
BodyPath: "includeLinks",
497
497
},
498
-
&requestflag.Flag[[]string]{
498
+
&requestflag.Flag[any]{
499
499
Name: "include-selector",
500
500
Usage: "Keep matching HTML subtrees before converting each page to Markdown.",
501
501
BodyPath: "includeSelectors",
502
502
},
503
-
&requestflag.Flag[int64]{
503
+
&requestflag.Flag[*int64]{
504
504
Name: "max-age-ms",
505
505
Usage: "Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.",
506
-
Default: 86400000,
506
+
Default: requestflag.Ptr[int64](86400000),
507
507
BodyPath: "maxAgeMs",
508
508
},
509
509
&requestflag.Flag[int64]{
@@ -562,10 +562,10 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
562
562
Default: false,
563
563
BodyPath: "useMainContentOnly",
564
564
},
565
-
&requestflag.Flag[int64]{
565
+
&requestflag.Flag[*int64]{
566
566
Name: "wait-for-ms",
567
567
Usage: "Browser wait time in milliseconds after initial page load for each crawled page. Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).",
568
-
Default: 3500,
568
+
Default: requestflag.Ptr[int64](3500),
569
569
BodyPath: "waitForMs",
570
570
},
571
571
&requestflag.Flag[string]{
@@ -581,12 +581,12 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
581
581
"pdf": {
582
582
&requestflag.InnerFlag[int64]{
583
583
Name: "pdf.end",
584
-
Usage: "Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Must be greater than or equal to start when both are provided.",
584
+
Usage: "Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be >= start.",
585
585
InnerField: "end",
586
586
},
587
587
&requestflag.InnerFlag[bool]{
588
588
Name: "pdf.ocr",
589
-
Usage: "Read scanned PDF pages with OCR; preserve pages that already contain text.",
589
+
Usage: "Read scanned PDF pages with OCR; preserve pages that already have text.",
590
590
InnerField: "ocr",
591
591
},
592
592
&requestflag.InnerFlag[bool]{
@@ -596,7 +596,7 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
596
596
},
597
597
&requestflag.InnerFlag[int64]{
598
598
Name: "pdf.start",
599
-
Usage: "First 1-based PDF page to parse. When omitted, parsing starts at the first page.",
0 commit comments