biocad / openapi3

OpenAPI 3.0 data model
BSD 3-Clause "New" or "Revised" License
39 stars 53 forks source link

_OpenApiItemsArray and _OpenApiItemsObject should be Prisms, not Reviews #72

Open gelisam opened 1 year ago

gelisam commented 1 year ago

The OpenApiItems prisms section defines Reviews, not Prisms. I assume that's a mistake? A Prism is a Review but not the other way around, so this is needlessly limiting.

In the history of the file, I see that Prisms used to be generated using makePrisms, but in cd3dc81eaf271d0625dbf67831a913ac2bee2768 the makePrisms was replaced with a manual prism definition... with a Review type signature. The commit message says "fix build by manually writing out SwaggerItems prisms", so it does not seem like the restriction to Review was intentional.

Later on, in 68e95a65ea8612a44cc516717e5af27370b738fa, the prism implementation was changed to an unto, which does produce a Review, but the second direction of the prism implementation was kept in a comment. The commit message says "Make compile cleanly with stack --pedantic", so it again does not seem like the restriction to Review was intentional.