Skip to content

Conditional Relationship throws UnexpectedValueException('Unexpected resource relationship value.') when encoding #25

@Wizofgoz

Description

@Wizofgoz

Example in Resource file's relationships method:

return [
    $this->when($this->showAddress, $this->relation('address')),
];

Thrown in file laravel-json-api/encoder-neomerx/src/Schema/Relationships.php Line 103 as of v1.0.0-alpha.3 because the ConditionalList iterator returns it as a ConditionalField instead of JsonApiRelation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions