-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EPIC] From relation definition to REST API with auto-generated repository/controller classes #2483
Comments
This story may need a spike to figure out how to map the relational paths to REST endpoints. Reference story: /Users/{id}/orders
Proposal: |
@jannyHou will create a spike. |
@jannyHou, could you please create a spike? (I thought I've created one but might've mixed it up with something else). Thanks. |
Spike created in #2855 🙂 |
We should be using the same approach we already have in place for relations, where a new controller class is created for every relation. E.g. |
Per the discussion during the estimation meeting yesterday, @raymondfeng suggested to make this task as an epic and start off with one relation first. cc @agnes512 |
+1 to convert this task into an epic. Let's start with a spike tasks first. Based on the work done so far, I am not sure at all about the final design, I am anticipating several obstacles that we will have to research a solution for. |
@agnes512, could you please take care of that? ^^ Thanks! |
Added one spike task #3896 Once we figure out what needs to be done with the |
👍 💯 |
Ping back from https://stackoverflow.com/a/64859564/69868, cross-posting my answer: Essentially, there are two parts of the problem:
|
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
In LoopBack 3, it is very easy to get a fully-featured relational REST API with very little code: a model definition describing model relations + a model configuration specifying which datasource to use.
Let's enhance the solution provided by #2036 to include support for relations too.
@loopback/boot
processes this configuration and registers appropriate repositories & controllers with the app.Acceptance criteria
Enhance the solution implemented in From model definition to REST API with no custom repository/controller classes #2036 to support all relations implemented in LB4 at the time of implementation. For example:
When an unknown relation is encountered while processing model definition, we should print a descriptive warning or throw an error to abort the application.
For each relation not supported yet, update the existing GH issue or create a new GH issue to ensure that when we implement a new relation type, then we also implement support for declarative flavor of building the REST API.
Documentation
Blog post
The text was updated successfully, but these errors were encountered: