You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to how Monoid instances for hashmaps work, the final API description contains exact same schemas for different types with the same name.
This is a bug unless it is required that type names are globally unique. However, it should be possible to lift this requirement by disambiguating hashmap keys, i. e. by adding route name as a prefix to each key.
Alternatively, I'd like there to be a warning or even an error, because otherwise I simply end up with wrong documentation.
Example:
-- in Module1.hsdataResponseBody=ResponseBody{rbField1::()}derivingGeneric-- in Module2.hsdataResponseBody=ResponseBody{rbField2::()}derivingGeneric-- in Main.hstypeMyApi="Route1":>Get '[JSON] Module1.ResponseBody:<|>"Route2":>Get '[JSON] Module2.ResponseBody
main =let swagger = toOpenApi (Proxy::ProxyMyApi) inB.putStrLn$ encodePretty swagger
Due to how Monoid instances for hashmaps work, the final API description contains exact same schemas for different types with the same name.
This is a bug unless it is required that type names are globally unique. However, it should be possible to lift this requirement by disambiguating hashmap keys, i. e. by adding route name as a prefix to each key.
Alternatively, I'd like there to be a warning or even an error, because otherwise I simply end up with wrong documentation.
Example:
The text was updated successfully, but these errors were encountered: