Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cog to generate Go and TS types #485

Merged
merged 7 commits into from
Nov 23, 2024
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
16 changes: 8 additions & 8 deletions codegen/cuekind/testing/customkind.cue
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,33 @@ customKind: {
innerField1: string
innerField2: [...string]
innerField3: [...#InnerObject2]
} @cuetsy(kind="interface")
}
#InnerObject2: {
name: string
details: {
[string]: _
}
} @cuetsy(kind="interface")
}
#Type1: {
group: string
options?: [...string]
} @cuetsy(kind="interface")
}
#Type2: {
group: string
details: {
[string]: _
}
} @cuetsy(kind="interface")
#UnionType: #Type1 | #Type2 @cuetsy(kind="type")
}
#UnionType: #Type1 | #Type2
spec: {
field1: string
inner: #InnerObject1
union: #UnionType
map: {
[string]: #Type2
}
timestamp: string & time.Time @cuetsy(kind="string")
enum: "val1" | "val2" | "val3" | "val4" | *"default" @cuetsy(kind="enum")
timestamp: string & time.Time
enum: "val1" | "val2" | "val3" | "val4" | *"default"
i32: int32 & <= 123456
i64: int64 & >= 123456
boolField: bool | *false
Expand All @@ -64,4 +64,4 @@ customKind: {
}
}
}
}
}
16 changes: 8 additions & 8 deletions codegen/cuekind/testing/customkind2.cue
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ customKind2: {
innerField1: string
innerField2: [...string]
innerField3: [...#InnerObject2]
} @cuetsy(kind="interface")
}
#InnerObject2: {
name: string
details: {
[string]: _
}
} @cuetsy(kind="interface")
}
#Type1: {
group: string
options?: [...string]
} @cuetsy(kind="interface")
}
#Type2: {
group: string
details: {
[string]: _
}
} @cuetsy(kind="interface")
#UnionType: #Type1 | #Type2 @cuetsy(kind="type")
}
#UnionType: #Type1 | #Type2
field1: string
inner: #InnerObject1
union: #UnionType
map: {
[string]: #Type2
}
timestamp: string & time.Time @cuetsy(kind="string")
enum: "val1" | "val2" | "val3" | "val4" | *"default" @cuetsy(kind="enum")
timestamp: string & time.Time
enum: "val1" | "val2" | "val3" | "val4" | *"default"
i32: int32 & <= 123456
i64: int64 & >= 123456
boolField: bool | *false
floatField: float64
}
}
}
}
}
293 changes: 0 additions & 293 deletions codegen/jennies/dstutil.go

This file was deleted.

Loading
Loading