Hi there,
So I recently found out about https://typespec.io/ and was interested in giving it ago, and so far has been pretty interesting as well as a nice difference to writing it in yaml.
However I just found my first problem since using it, and that is that they don't allow you a way to generate additionalProperties with a yes meaning I am currently unable to use my APIError object as I previously was, and that is due to the EmptyObject that is applied, which essentially forces me to do as any every time I wish to output any metadata.
export type t_APIError = {
error: string
message?: string
metadata?: {
[key: string]: EmptyObject
}
suggested?: string
}
Is there a way to nicely work around this or will I need to wait for some update/change for it? For now I will just override the type checking with as any until a better solution is found.
Hi there,
So I recently found out about https://typespec.io/ and was interested in giving it ago, and so far has been pretty interesting as well as a nice difference to writing it in yaml.
However I just found my first problem since using it, and that is that they don't allow you a way to generate
additionalPropertieswith ayesmeaning I am currently unable to use my APIError object as I previously was, and that is due to theEmptyObjectthat is applied, which essentially forces me to doas anyevery time I wish to output any metadata.Is there a way to nicely work around this or will I need to wait for some update/change for it? For now I will just override the type checking with
as anyuntil a better solution is found.