I just fixed a mistake in our code that would have been nice to catch in the library: if you add the same name for a json schema twice in the same swagger document, it's almost certainly a mistake and should trigger an error.
Example (not tested):
instance ToSchema T1 where
declareNamedSchema _ = pure $ NamedSchema (Just "T1") mempty
instance ToSchema T2 where
declareNamedSchema _ = pure $ NamedSchema (Just "T1") mempty
The typo in T2 causes the two generated schemas to be stored under the same name, and one of them being overwritten. I think this should trigger an error.
I just fixed a mistake in our code that would have been nice to catch in the library: if you add the same name for a json schema twice in the same swagger document, it's almost certainly a mistake and should trigger an error.
Example (not tested):
The typo in T2 causes the two generated schemas to be stored under the same name, and one of them being overwritten. I think this should trigger an error.