Y
Y
yanushev2021-04-15 10:38:44
RESTful API
yanushev, 2021-04-15 10:38:44

What approach is used in the passed entities?

What approach is used in the case when instead of an entity object, Id is passed and why not companyId is written, but company, although id is passed

{
    entities: [
        {
            id: 101,
            name: "something1",
            company: 201,
        },
        {
            id: 102,
            name: "something2",
            company: 201,
        }
    ],
    companies: [
        {
            id: 201,
            name: "someCompany"
            owner: 301,
        }
    ],
    owners: [
        {
            id: 301,
            firstName: "Bart",
            lastName: "Simpson"
            email: "[email protected]",
        }
    ],
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-04-15
@vabka

It's just that the author of this API decided to call it that. There doesn't seem to be a special name for it.
Although you can call it "The author is an eccentric"

L
liquiddeath13, 2021-04-15
@liquiddeath13

It is unlikely that the approach has any name
There is no need to burden the response from the server with an unnecessary entity, if this entity is needed, then you can request it by identifier

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question