Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ How the specification maps onto Go:
in another fails generation, since its name cannot tell them apart. A oneOf of
a date-time and an integer reads either and is written as the others are, or
as a string where they mix.
- **Unix times in milliseconds** — an integer of format `date-time-ms`, such as
`1795464914123`, is a `time.Time` to the millisecond, written and read the same
way, through jsonutil's `TimeMarshalIntUnixMilli` and the like, by member name
where other forms are about. A query parameter of the format is sent and read
the same way.
- **Dates in ISO 8601's basic form** — a string of format `date-basic`, such as
`"20260320"`, is a `civil.Date`, written and read without separators: by one
marshaler where every date is in that form, else by the names of the members
Expand Down
5 changes: 5 additions & 0 deletions README/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ How the specification maps onto Go:
in another fails generation, since its name cannot tell them apart. A oneOf of
a date-time and an integer reads either and is written as the others are, or
as a string where they mix.
- **Unix times in milliseconds** — an integer of format `date-time-ms`, such as
`1795464914123`, is a `time.Time` to the millisecond, written and read the same
way, through jsonutil's `TimeMarshalIntUnixMilli` and the like, by member name
where other forms are about. A query parameter of the format is sent and read
the same way.
- **Dates in ISO 8601's basic form** — a string of format `date-basic`, such as
`"20260320"`, is a `civil.Date`, written and read without separators: by one
marshaler where every date is in that form, else by the names of the members
Expand Down
12 changes: 0 additions & 12 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ is still a single value, with no `label` or `matrix` style and no array or
object, and a header parameter likewise; the server does not read header
parameters at all, so a service sees them empty.

## Unix times in milliseconds

An integer `date-time` is read as Unix seconds. Some APIs write milliseconds:
go-api-libs/finnhub's tick, NBBO and bid-ask timestamps ("List of timestamp in
UNIX ms.") and the websocket's trade times, and go-api-libs/yahoo-finance's
`dateEpochMs` and `firstTradeDateMilliseconds`. They are integers until
recordings show their values, since a spec's types rest on recordings: then a
custom format, `date-time-ms`, like `date-basic`, makes them a `time.Time` in
milliseconds, written and read through jsonutil helpers beside
`TimeMarshalIntUnix`, in a body and a query parameter alike. openapi-enrich
must keep the format when a recording's integer meets it.

## Server routes for a parameter inside a segment

A path parameter can share its segment with fixed text, as go-api-libs/ibkr's
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.27
require (
github.com/MarkRosemaker/cassette v0.0.0-20261125180804-407fe91b7b7d
github.com/MarkRosemaker/errpath v0.0.0-20261118230255-99e20cb3445a
github.com/MarkRosemaker/openapi v0.0.0-20261124050252-52a60c76de04
github.com/MarkRosemaker/openapi v0.0.0-20261125191600-33a241ac282b
github.com/MarkRosemaker/openapi-compress v0.0.0-20261124050556-094155f0b064
github.com/MarkRosemaker/openapi-edit v0.0.0-20261124050336-02af6fa36ba9
github.com/MarkRosemaker/openapi-flatten v0.0.0-20261124050336-684f3610d8d7
Expand All @@ -19,7 +19,7 @@ require (
require (
cloud.google.com/go v0.123.0 // indirect
github.com/MarkRosemaker/json2yaml v0.0.0-20261118230255-853c75cf2bf9 // indirect
github.com/MarkRosemaker/jsonutil v0.0.0-20261118230255-4b04cfc02484 // indirect
github.com/MarkRosemaker/jsonutil v0.0.0-20261125191625-3f67f86ead2a // indirect
github.com/MarkRosemaker/openapi-compare v0.0.0-20261124050336-b439780a57a8 // indirect
github.com/MarkRosemaker/yaml v0.0.0-20261118230544-f88f96ca5149 // indirect
github.com/MarkRosemaker/yaml2json v0.0.0-20261118230255-06c4fe76a5b8 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ github.com/MarkRosemaker/errpath v0.0.0-20261118230255-99e20cb3445a h1:C7Oyg94gP
github.com/MarkRosemaker/errpath v0.0.0-20261118230255-99e20cb3445a/go.mod h1:VnXpUlsS3n1gSToedcQl2FCARGoA16CyitbCanUIv+I=
github.com/MarkRosemaker/json2yaml v0.0.0-20261118230255-853c75cf2bf9 h1:NVTLiOVHTQ/PSq3ihG3kT/P1UqNjJiBHHCGbgNq2rP8=
github.com/MarkRosemaker/json2yaml v0.0.0-20261118230255-853c75cf2bf9/go.mod h1:eUwIjjooIESK1Ymw4bbMdSDF6feAblyZjxyoo5o/W6U=
github.com/MarkRosemaker/jsonutil v0.0.0-20261118230255-4b04cfc02484 h1:mWQovC60M6QVWXpitDiB2bwT+Jr8uQH2eyjOcUE2EcI=
github.com/MarkRosemaker/jsonutil v0.0.0-20261118230255-4b04cfc02484/go.mod h1:SzjJlgYFlzpbFGvUUoQgfEsWlbai63bvhDPK8J0MNYM=
github.com/MarkRosemaker/openapi v0.0.0-20261124050252-52a60c76de04 h1:glGad+2S6xb+6gddFIcTahqzcGW2MO++45wrCtVvCGA=
github.com/MarkRosemaker/openapi v0.0.0-20261124050252-52a60c76de04/go.mod h1:1FPgdpi6Y8EUPTFOLQrf9Qrrs38oWNHFyAlQmSEjMy8=
github.com/MarkRosemaker/jsonutil v0.0.0-20261125191625-3f67f86ead2a h1:7k/JXkxig7+xgT8ENKGf+EiZuT6OAQWnkccQ/k3Rues=
github.com/MarkRosemaker/jsonutil v0.0.0-20261125191625-3f67f86ead2a/go.mod h1:SzjJlgYFlzpbFGvUUoQgfEsWlbai63bvhDPK8J0MNYM=
github.com/MarkRosemaker/openapi v0.0.0-20261125191600-33a241ac282b h1:lHveG/mKG3Wv0cwHysci7eC8gqfFZdzAgCxP8WBwBL4=
github.com/MarkRosemaker/openapi v0.0.0-20261125191600-33a241ac282b/go.mod h1:1FPgdpi6Y8EUPTFOLQrf9Qrrs38oWNHFyAlQmSEjMy8=
github.com/MarkRosemaker/openapi-compare v0.0.0-20261124050336-b439780a57a8 h1:hdfWfYdKhh8lbsUm6QstsJW7Sw2RQGYIRSbCEfCcGAc=
github.com/MarkRosemaker/openapi-compare v0.0.0-20261124050336-b439780a57a8/go.mod h1:wDy5Ifa/rKsnIk0At/LY6A0GhlAgLLqC5hi9VwcFrVU=
github.com/MarkRosemaker/openapi-compress v0.0.0-20261124050556-094155f0b064 h1:g6oVQzTRZd04LFEaPh9EWGrc6dU3wyNwhEsGkmM0+Mo=
Expand Down
26 changes: 26 additions & 0 deletions interactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ func goLiteralForType(p ir.Param, value string) string {
return fmt.Sprintf("time.Unix(%s, 0)", value)
}

if p.IsUnixMilli {
return fmt.Sprintf("time.UnixMilli(%s)", value)
}

if t, err := time.Parse(time.RFC3339Nano, value); err == nil {
return timeLiteral(t)
}
Expand Down Expand Up @@ -634,6 +638,10 @@ func bodyLiteral(doc *ir.Document, goType string, v any) string {
continue // absent optional field: leave it at its zero value
}

if f.IsUnixMilli {
val = milliAsTime(val)
}

fields = append(fields, fmt.Sprintf("%s: %s", f.Name, bodyLiteral(doc, f.Type, val)))
}

Expand Down Expand Up @@ -828,3 +836,21 @@ func fallbackJSON(v any) string {

return fmt.Sprintf("%q", string(data))
}

// milliAsTime is v, an integer of unix milliseconds or an array of them, as the time it holds in RFC 3339, which
// scalarLiteral takes as it is, where it would take an integer as unix seconds; see ir.Field.IsUnixMilli.
func milliAsTime(v any) any {
switch v := v.(type) {
case float64:
return time.UnixMilli(int64(v)).UTC().Format(time.RFC3339Nano)
case []any:
out := make([]any, len(v))
for i, e := range v {
out[i] = milliAsTime(e)
}

return out
default:
return v
}
}
16 changes: 9 additions & 7 deletions ir/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ func FromDocument(doc *openapi.Document, packageName, userAgent string, producti
HasStringOrNumberFields: slices.ContainsFunc(schemas, func(s Schema) bool {
return slices.ContainsFunc(s.Fields, func(f Field) bool { return f.IsStringOrNumber })
}),
HasUnixTimeFields: encodings["time.Time"][encodingUnix].all,
HasUnixDateFields: encodings["civil.Date"][encodingUnix].all,
UnixTimeMembers: encodings["time.Time"][encodingUnix].members,
UnixDateMembers: encodings["civil.Date"][encodingUnix].members,
HasBasicDateFields: encodings["civil.Date"][encodingBasic].all,
BasicDateMembers: encodings["civil.Date"][encodingBasic].members,
HasStringDateFields: hasEncoding(encodings, "civil.Date", ""),
HasUnixTimeFields: encodings["time.Time"][encodingUnix].all,
HasUnixDateFields: encodings["civil.Date"][encodingUnix].all,
UnixTimeMembers: encodings["time.Time"][encodingUnix].members,
UnixDateMembers: encodings["civil.Date"][encodingUnix].members,
HasBasicDateFields: encodings["civil.Date"][encodingBasic].all,
BasicDateMembers: encodings["civil.Date"][encodingBasic].members,
HasUnixMilliTimeFields: encodings["time.Time"][encodingMilli].all,
UnixMilliTimeMembers: encodings["time.Time"][encodingMilli].members,
HasStringDateFields: hasEncoding(encodings, "civil.Date", ""),
// a date-time that may be an integer is read by an unmarshaler of every time.Time, which comes first
HasStringTimeFields: hasEncoding(encodings, "time.Time", "") && !hasDateTimeOrInt,
HasServerOverrides: slices.ContainsFunc(operations, func(op Operation) bool {
Expand Down
10 changes: 10 additions & 0 deletions ir/ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ type Document struct {
// HasBasicDateFields and BasicDateMembers are the same for dates in ISO 8601's basic form, such as "20260320".
HasBasicDateFields bool `json:"hasBasicDateFields,omitzero"`
BasicDateMembers []string `json:"basicDateMembers,omitempty"`
// HasUnixMilliTimeFields and UnixMilliTimeMembers are the same for date-times that are integers of unix milliseconds.
HasUnixMilliTimeFields bool `json:"hasUnixMilliTimeFields,omitzero"`
UnixMilliTimeMembers []string `json:"unixMilliTimeMembers,omitempty"`
// HasStringDateFields and HasStringTimeFields are set when a JSON body holds a civil.Date, or a time.Time, as the
// type writes it, so that an empty string, which an API may send for one it leaves out, reads as the zero value. A zero
// date is written as null, since civil.Date would write it as "0000-00-00", which is no date.
Expand Down Expand Up @@ -406,6 +409,10 @@ type Field struct {
// IsDateBasic is true when Type is civil.Date but the property's schema is a string of format date-basic, such as
// "20260320", see [Document.HasBasicDateFields] and [Document.BasicDateMembers].
IsDateBasic bool `json:"isDateBasic,omitzero"`

// IsUnixMilli is true when Type is time.Time but the property's schema is an integer of format date-time-ms: it is
// written and read as unix milliseconds, see [Document.HasUnixMilliTimeFields] and [Document.UnixMilliTimeMembers].
IsUnixMilli bool `json:"isUnixMilli,omitzero"`
}

// EnumValue is one member of an enum type.
Expand Down Expand Up @@ -469,6 +476,9 @@ type Param struct {
// IsDateBasic is true when Type is "civil.Date" but the schema is a string of format date-basic, such as
// "20260320", which FormatExpr writes and ParseExpr reads.
IsDateBasic bool `json:"isDateBasic,omitzero"`
// IsUnixMilli is true when Type is "time.Time" but the schema is an integer of format date-time-ms, which FormatExpr
// writes and ParseExpr reads as unix milliseconds.
IsUnixMilli bool `json:"isUnixMilli,omitzero"`
// AllowSlashes is set for a path parameter marked x-allow-slashes, a path of its own, as pkg.go.dev's
// /package/{path} takes golang.org/x/time/rate: its slashes stay slashes, where any other path parameter's are
// escaped, as OpenAPI requires.
Expand Down
11 changes: 10 additions & 1 deletion ir/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,18 @@ func (p *Param) setType(s *openapi.Schema) error {

p.IsUnix = isUnix(p.Type, deref(s))
p.IsDateBasic = isDateBasic(p.Type, deref(s))
p.IsUnixMilli = isUnixMilli(p.Type, deref(s))

if p.BaseType == "" {
p.ParseExpr, p.ParseConv, p.ParseErrFree = parseExpr(p.Type, p.IsUnix)
if p.IsDateBasic {
p.ParseExpr, p.ParseConv, p.ParseErrFree = `time.Parse("20060102", %s)`, "civil.DateOf(%s)", false
}

if p.IsUnixMilli {
p.ParseExpr, p.ParseConv, p.ParseErrFree = "strconv.ParseInt(%s, 10, 64)", "time.UnixMilli(%s)", false
}

return nil
}

Expand Down Expand Up @@ -598,6 +603,10 @@ func (p Param) FormatExpr() string {
return "strconv.Itoa(int(" + v + ".Unix()))"
}

if p.IsUnixMilli {
return "strconv.FormatInt(" + v + ".UnixMilli(), 10)"
}

return v + ".Format(time.RFC3339)"
case "civil.Date":
if p.IsUnix {
Expand Down Expand Up @@ -645,7 +654,7 @@ func (p Param) PathExpr() string {
"uuid.UUID", "time.Duration", "civil.Date":
return expr
case "time.Time":
if p.IsUnix {
if p.IsUnix || p.IsUnixMilli {
return expr
}
}
Expand Down
17 changes: 15 additions & 2 deletions ir/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func integerGoType(f openapi.Format) *GoType {
return &GoType{Name: "uint64"}
case openapi.FormatDuration:
return &GoType{Name: "time.Duration"}
case openapi.FormatDateTime:
case openapi.FormatDateTime, openapi.FormatDateTimeMs:
return &GoType{Name: "time.Time"}
case openapi.FormatDate:
return &GoType{Name: "civil.Date"}
Expand Down Expand Up @@ -593,6 +593,7 @@ func getField(jsonName string, propRef *openapi.Schema, requiredSet map[string]b
IsDateTimeOrInt: isDateTimeOrIntegerOneOf(v),
IsStringOrNumber: isStringOrNumberOneOf(v),
IsUnix: isUnix(goType.Name, v),
IsUnixMilli: isUnixMilli(goType.Name, v),
IsDateBasic: isDateBasic(goType.Name, v),
Fixed: fixedJSON(v),
}, nil
Expand Down Expand Up @@ -628,7 +629,18 @@ func isUnix(goType string, s *openapi.Schema) bool {
s = deref(s.Items)
}

return (goType == "time.Time" || goType == "civil.Date") && s != nil && s.Type == openapi.TypeInteger
return (goType == "time.Time" || goType == "civil.Date") && s != nil && s.Type == openapi.TypeInteger &&
s.Format != openapi.FormatDateTimeMs
}

// isUnixMilli reports whether a value of the Go type named, from schema s, is an integer of unix milliseconds: a
// date-time-ms, or an array of them.
func isUnixMilli(goType string, s *openapi.Schema) bool {
for s != nil && s.Type == openapi.TypeArray { // the items of an array
s = deref(s.Items)
}

return goType == "time.Time" && s != nil && s.Type == openapi.TypeInteger && s.Format == openapi.FormatDateTimeMs
}

// isDateBasic reports whether a value of the Go type named, from schema s, is a date in ISO 8601's basic form, such as
Expand Down Expand Up @@ -815,6 +827,7 @@ func fromTupleSchema(name string, s *openapi.Schema) (*Schema, error) {
Type: tp.String(),
Description: cmp.Or(p.Description, deref(p).Description),
IsUnix: isUnix(tp.Name, deref(p)),
IsUnixMilli: isUnixMilli(tp.Name, deref(p)),
IsDateBasic: isDateBasic(tp.Name, deref(p)),
}
}
Expand Down
7 changes: 5 additions & 2 deletions ir/unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
)

// encodings are how a time.Time or civil.Date may be written other than as its type does it: as an integer of unix
// time, or, for a date, in ISO 8601's basic form, such as "20260320".
// time, for a time as one of unix milliseconds, or, for a date, in ISO 8601's basic form, such as "20260320".
const (
encodingUnix = "integer"
encodingBasic = "basic-form"
encodingMilli = "integer-ms"
)

// encodingMode is how a document's values of one Go type in one encoding are written and read.
Expand All @@ -25,6 +26,8 @@ type encodingMode struct {
// fieldEncoding is the encoding of f's time.Time or civil.Date, or "" for the type's own.
func fieldEncoding(f Field) string {
switch {
case f.IsUnixMilli:
return encodingMilli
case f.IsUnix:
return encodingUnix
case f.IsDateBasic:
Expand Down Expand Up @@ -77,7 +80,7 @@ func markEncodings(schemas []Schema) (map[string]map[string]encodingMode, error)

var encs []string

for _, enc := range []string{encodingUnix, encodingBasic} {
for _, enc := range []string{encodingUnix, encodingMilli, encodingBasic} {
if len(names[enc]) > 0 || position[enc] != "" {
encs = append(encs, enc)
}
Expand Down
16 changes: 14 additions & 2 deletions render/templates/types.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ package {{.PackageName}}

var jsonOpts = json.JoinOptions(
json.RejectUnknownMembers(true),
{{- if or .HasURLFields .HasDurationFields .HasUnixTimeFields .HasUnixDateFields .UnixTimeMembers .UnixDateMembers .HasBasicDateFields .BasicDateMembers .HasStringDateFields }}
{{- if or .HasURLFields .HasDurationFields .HasUnixTimeFields .HasUnixDateFields .UnixTimeMembers .UnixDateMembers .HasUnixMilliTimeFields .UnixMilliTimeMembers .HasBasicDateFields .BasicDateMembers .HasStringDateFields }}
json.WithMarshalers(json.JoinMarshalers(
{{- template "marshalers" . }}
)),
{{- end }}
{{- if or .HasURLFields .HasDateTimeOrIntFields .HasStringOrNumberFields .HasDurationFields .HasUnixTimeFields .HasUnixDateFields .UnixTimeMembers .UnixDateMembers .HasBasicDateFields .BasicDateMembers .HasStringDateFields .HasStringTimeFields }}
{{- if or .HasURLFields .HasDateTimeOrIntFields .HasStringOrNumberFields .HasDurationFields .HasUnixTimeFields .HasUnixDateFields .UnixTimeMembers .UnixDateMembers .HasUnixMilliTimeFields .UnixMilliTimeMembers .HasBasicDateFields .BasicDateMembers .HasStringDateFields .HasStringTimeFields }}
json.WithUnmarshalers(json.JoinUnmarshalers(
{{- with .UnixTimeMembers }}
json.UnmarshalFromFunc(jsonutil.TimeUnmarshalIntUnixFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
{{- with .UnixDateMembers }}
json.UnmarshalFromFunc(jsonutil.DateUnmarshalIntUnixFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
{{- with .UnixMilliTimeMembers }}
json.UnmarshalFromFunc(jsonutil.TimeUnmarshalIntUnixMilliFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
{{- with .BasicDateMembers }}
json.UnmarshalFromFunc(jsonutil.DateUnmarshalBasicFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
Expand All @@ -41,6 +44,9 @@ var jsonOpts = json.JoinOptions(
{{- if .HasUnixDateFields }}
json.UnmarshalFromFunc(jsonutil.DateUnmarshalIntUnix),
{{- end }}
{{- if .HasUnixMilliTimeFields }}
json.UnmarshalFromFunc(jsonutil.TimeUnmarshalIntUnixMilli),
{{- end }}
{{- if .HasBasicDateFields }}
json.UnmarshalFromFunc(jsonutil.DateUnmarshalBasic),
{{- end }}
Expand Down Expand Up @@ -752,6 +758,9 @@ func (v *{{.Name}}) unmarshalJSONMember(dec *jsontext.Decoder, name string) (boo
{{- if .HasUnixDateFields }}
json.MarshalToFunc(jsonutil.DateMarshalIntUnix),
{{- end }}
{{- if .HasUnixMilliTimeFields }}
json.MarshalToFunc(jsonutil.TimeMarshalIntUnixMilli),
{{- end }}
{{- if .HasBasicDateFields }}
json.MarshalToFunc(jsonutil.DateMarshalBasic),
{{- end }}
Expand All @@ -761,6 +770,9 @@ func (v *{{.Name}}) unmarshalJSONMember(dec *jsontext.Decoder, name string) (boo
{{- with .UnixDateMembers }}
json.MarshalToFunc(jsonutil.DateMarshalIntUnixFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
{{- with .UnixMilliTimeMembers }}
json.MarshalToFunc(jsonutil.TimeMarshalIntUnixMilliFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
{{- with .BasicDateMembers }}
json.MarshalToFunc(jsonutil.DateMarshalBasicFor({{ range $i, $m := . }}{{ if $i }}, {{ end }}{{ printf "%q" $m }}{{ end }})),
{{- end }}
Expand Down
15 changes: 15 additions & 0 deletions testdata/golden/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,15 @@
"format": "date-time"
}
},
{
"name": "seen",
"in": "query",
"description": "A Unix time in milliseconds.",
"schema": {
"type": "integer",
"format": "date-time-ms"
}
},
{
"name": "on",
"in": "query",
Expand Down Expand Up @@ -2740,6 +2749,12 @@
"type": "string",
"format": "date-basic",
"example": "20260320"
},
"seenAt": {
"description": "A time in Unix milliseconds, among times of other forms.",
"type": "integer",
"format": "date-time-ms",
"example": 1795464914123
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions testdata/golden/pkg/golden/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ window.API = {
if (params.cells?.length) raw.push("cells=" + join(params.cells, ",", escR));
if (params.every != null) q.set("every", String(params.every));
if (params.at != null) q.set("at", String(params.at));
if (params.seen != null) q.set("seen", String(params.seen));
if (params.on != null) q.set("on", String(params.on));
if (params.modules?.length) raw.push("modules=" + join(params.modules, ",", esc));
if (params.since != null) q.set("since", String(params.since));
Expand Down
Loading
Loading