Closed jonthegeek closed 1 year ago
In the as_*() constructors, if none of the fields are defined, still try to create the (empty) object. If that thing is optional, we don't want to crash just because the object is slightly malformed.
as_*()
Example: https://api.apis.guru/v2/specs/fec.gov/1.0/openapi.yaml
It only has x-twitter, so currently as_contact() dies.
In the
as_*()
constructors, if none of the fields are defined, still try to create the (empty) object. If that thing is optional, we don't want to crash just because the object is slightly malformed.Example: https://api.apis.guru/v2/specs/fec.gov/1.0/openapi.yaml
It only has x-twitter, so currently as_contact() dies.