Skip to content

Commit 71fbb2b

Browse files
committed
fix: make generated metadata a type alias for easier transition
Signed-off-by: Mark Sagi-Kazar <[email protected]>
1 parent 11281c6 commit 71fbb2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

api/spec/src/types.tsp

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import "@typespec/openapi3";
2+
3+
using TypeSpec.OpenAPI;
4+
15
/**
26
* ULID (Universally Unique Lexicographically Sortable Identifier).
37
*/
@@ -29,10 +33,12 @@ scalar Key extends string;
2933
scalar ULIDOrKey extends string;
3034

3135
// NOTE (andras): key format enforcement isn't supported by TypeSpec (patternProperties). See: https://github.com/microsoft/typespec/discussions/1626
36+
// TODO: decide if we want to use the generated Metadata type instead and update code to use it
3237
/**
3338
* Set of key-value pairs.
3439
* Metadata can be used to store additional information about a resource.
3540
*/
41+
@extension("x-go-type", "map[string]string")
3642
@example(#{ externalId: "019142cc-a016-796a-8113-1a942fecd26d" })
3743
model Metadata {
3844
...Record<string>;

0 commit comments

Comments
 (0)