KeysOf & OAS emitter #7078
-
Am trying to use Rest.Resource.KeysOf to get all property keys of a model and then use those to validate the provided values in my Pseudo code:
This results in the following (trimmed down) OAS content:
Am I doing something wrong? Is this just not supported or a known issue? Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Note that what I expected components > schema > OrderKeyItem to be is:
|
Beta Was this translation helpful? Give feedback.
-
Were you expecting this I think we don't have a direct equivalent to typescript |
Beta Was this translation helpful? Give feedback.
with the current types it is not possible, you could make your own type+decorator if you want.
and define the
applyKeyOf
decorator to add each variant to the union from the keys