I'm working on an endpoint that should return an array of images. This array will contain URLs for the preview images in sizes specified by a parameter in the request. So far, I have been using something like this:
Our code has worked well so far, but we have now decided to start using Swagger documentation to automatically build the TypeScript types used in our frontend. However, that code is compiled to:
My first attempt was to fix this by moving the URLs into a separate entity with:
I didn't have much hope that this would work, as I realized that even if we had the sizes when the entity was evaluated, it would have been empty when generating the types. Unfortunately, it failed to parse the object because we don't have access to the options at that point. After many attempts, I can't seem to find a solution, and I'm starting to wonder if this is even possible. Does anyone know how I could fix this?
--
You received this message because you are subscribed to the Google Groups "Grape Framework Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-grape+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ruby-grape/2e65f018-400a-4261-a6eb-658e7298712cn%40googlegroups.com.
dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - t:@dblockdotorg - ig:@artdblockdotorg - github/dblock