Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

[FEATURE] Allow passing related objects as id for creating objects #28

Closed
bmikaili opened this issue Apr 22, 2020 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@bmikaili
Copy link
Contributor

Currently, json has to be written like this to create objects:

{
  "name": "Account",
  "user": {
    "id": "26132E11-6D13-4983-9FAE-71B705439BD8"
  }
}

It would be nice to only have to do this:

{
  "name": "Account",
  "user": "26132E11-6D13-4983-9FAE-71B705439BD8"
}

This should be possible with DTOs.

@bmikaili bmikaili added the enhancement New feature or request label Apr 22, 2020
@bmikaili bmikaili added this to To Do in Corvus Development Apr 22, 2020
@bmikaili
Copy link
Contributor Author

bmikaili commented May 6, 2020

@PSchmiedmayer is the use case for this only when doing manual JSON requests? As far as I know, when sending requests through a client, everything goes through Codable, so the user is not really exposed to this syntax.

@bmikaili bmikaili moved this from To Do to On Hold in Corvus Development May 7, 2020
@bmikaili
Copy link
Contributor Author

This is currently a limitation of Fluent, because it expects an actual object as part of a Model, not just an id reference.

Corvus Development automation moved this from On Hold to Done May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

1 participant