Parse array with uniqueItems: true
as a Set
#674
dawsonbooth
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a few endpoints that return a list of available actions to the user as an array. I know these actions to be unique within the array and have noted the return type as such in the
swagger.json
by settinguniqueItems: true
, so I would like to use that information to parse the array as aSet
upon receiving the data.I know that I can just convert the array ad hoc for each specific query that I want, but it would be nice to be able to do this automatically for any items marked with
uniqueItems: true
and have the generated types from running orval useSet
as well.I figure this could be done either automatically by way of a flag in the orval config file, or it can be handled on the response parsing side similar to the
Date
parsing example in the docs.Beta Was this translation helpful? Give feedback.
All reactions