| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks great! As mentioned in Slack, I think that we should look into submitting this change as a PR into the upstream library. It would potentially benefit others who are using this library and could reduce the long term maintenance costs that we are taking on by forking it.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
The api client generated from our openapi.json spec file (generated by the backend) had incomplete return types for some methods.
This was due to a bug in the getModel method, whereby if a schema definition passed in had no type property, but was in fact an object (had properties which implies an object), then it would "fall through" all the conditions and return an "empty" model. There was no condition to capture this edge case.
As far as I can tell, the type property is optional, according to the OpenAPI spec, and the properties attribute is used to describe only objects, so its presence allows you to safely assume an object type. This logic was added to the existing object predicate, and a unit test was added to assert it.
Test Plan