Skip to content

Undefined method `=~' for [:ReturnEnvelope, :Boolean]:Array #215

Open
@acimadamore

Description

@acimadamore

I'm receiving the error in the title when sending a Letter. It seems that the problem is with attributes that are mapped to Open API type that is an Ruby Array.

In this error in particular return_envelope is mapped to Array[:ReturnEnvelope, :Boolean]:

:'return_envelope' => Array[:'ReturnEnvelope', :'Boolean'],

The second if in Letter#build_from_hash breaks because a =~ is sent to the array instance:

elsif type =~ /\AArray<(.*)>/i

Maybe the third if should precede the second one and add a check if type responds_to(:=~)? This problem should be present in all the implementations of build_form_hash of other model classes.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions