-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue I am having with 'additionalProperties' and TypeSpec #125
Comments
Should help with #125 and #44 - Makes schema generation aware of `additionalProperties` - Fixes interpretation of `additionalProperties` Namely: ``` type: object additionalProperties: true ``` is equivalent to: ``` type: object additionalProperties: {} ``` and ``` type: object ``` Based on the guidance about free-form objects here https://swagger.io/docs/specification/data-models/data-types/#object
https://typespec.io looks pretty cool - I'll have to look at that more closely. Yeah I've put a bit more work into it in #126 which I think should largely solve your problems, you should expect to get something like:
Once that is released, and the One thing I'm unsure about is forcing the use of |
Fair enough, will be waiting for that release then. What about making use of the I think making the default fallback value be |
I've gone ahead and published the changes from #126 in The |
Alright, I'll give that a try then. As for the I'll list a few of the ones I know/found that makes use of them.
here are just a few that make use of the I also just wanted to link this (https://tsoa-community.github.io/docs) which I found which you might find useful. |
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 ayes
meaning I am currently unable to use my APIError object as I previously was, and that is due to theEmptyObject
that is applied, which essentially forces me to doas any
every 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 any
until a better solution is found.The text was updated successfully, but these errors were encountered: