I finally had time to dig deeper into this project and it's awesome. The OpenAPI specification is quite large and having battle tested structs for parsing and serializing the specification will make building OpenAPI compatible tools a lot easier.
We discussed this during the SSWG meeting today and we all agree this should move forward to a proposal.
There are a few points of feedback I collected during my review and I'm interested to see what you think:
-
OpenAPIKit currently pulls in quite a few dependencies. This will make accepting the package more difficult since we want to make sure this package plus everything it pulls in adhere to our standards.
-
Swift generally recommends using standard library types where ever possible. I noticed
OrderedDictionary
is used a lot. Is this necessary to adhere to the OpenAPI spec or could we get away with using a Swift dictionary? This point is kind of related to the previous one, too, since that would mean one less dependency to worry about. -
Finally, I noticed this package attempts to support reflection. I think getting reflection right is less straight forward and people may have different opinions on how to do this. Perhaps that would be better as a separate package? I think this may also be related to the first point since it seems like the AnyCodable package is used for reflection. I'm not certain though.
Note that this feedback doesn't necessarily need to be addressed before proposing. We can continue this conversation on the proposal. I just want to give you an idea of my thoughts after reviewing.
Thanks, @mattpolzin !