Skip to content

vue generator, invalid link to child objects #240

@sergerdn

Description

@sergerdn

API Platform version(s) affected: 0.5.1

Description

Url to child objects is broken due to invalid router-link usage.

How to reproduce

npx @api-platform/client-generator https://demo.api-platform.com src/ --generator vue 

Possible Solution

We should always using:

<router-link
                 v-for="link in item['reviews']"
                 :key="link['@id']"
                 :to="{ name: 'ReviewShow', params: { id: link['@id'] } }"
>

Instead of:

<router-link
                 v-for="link in item['reviews']"
                 :key="link['@id']"
                 :to="`/reviews/show/${link['@id']}`"
>

Additional Context

Screenshot 2020-11-12 at 08 02 52

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