[Discovery] Ignore lfietime parameters when checking if a type deriving ToSchema or ToResponse is generic
#50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following up on https://github.com/ProbablyClem/utoipauto/pull/45/files/b7e3d4e670f4620d191549a99116ace7bb7fdac1#r1946540325: This PR reverts the check if a type is generic to exclude lifetimes, while leaving it at the top of the function as an early return (not reverting to individual checks per-attribute and also not reinstating the handling of
aliases).I'm honestly having a bit of a hard time still to determine what
utoipautowants to happen there, but since @DenuxPlays you indicated that it seems correct to you to check for generics excluding lifetimes this PR does that.Note that I've changed the
genericsacceptance test, addingToResponsederives to all the types and differentiatingBorrowedResponseandNestedBorrowedResponseto introduce a struct that is generic only over its lifetime to validate my changes. For some reason the new output follows a different order than the old blessed expectation, but aside from that and the name change the remaining output should have stayed the same.