Questions tagged [loopback4]

Questions about LoopBack version 4. Use this tag for LoopBack questions which are specific to only version 4. General LoopBack questions should be tagged with loopbackjs.

Create powerful APIs easily with a new creation experience for defining REST APIs and handling API requests/responses.

A new, improved programming model with dependency injection and new concepts such as components, mixins, repositories, etc. make this the most extensible version yet.

See also

483 questions
2
votes
3 answers

Custom error message for loopback 4 model schema validation

In my model, I have defined a model schema. One of the property is the name which is a required field and minimum character should be of length 5. @property({ type: 'string', required: true, jsonSchema: { title: 'name', …
prisoner_of_azkaban
  • 700
  • 1
  • 8
  • 26
2
votes
1 answer

Loopback4 Error in dependency injection: is not bound to any value in context application

i have this error Unhandled error in POST /client: 500 Error: The key 'controllers.pointController' is not bound to any value in context application My class constructor( @repository(ClientRepository) public clientRepository:…
h40s4m4
  • 170
  • 1
  • 14
2
votes
2 answers

What does this mean? 500 Error: schema is invalid: data.$ref should match format "uri-reference"

Used the lb4 generators to create models, repositories, and controllers. When adding a new field to the model, my POST will start to fail with this error: 500 Error: schema is invalid: data.$ref should match format "uri-reference" The error is too…
Stoyvo
  • 75
  • 6
2
votes
1 answer

How to implement self referencing model on loopback 4 without getting a Circular dependency

I create a new model named Lot on my loopback 4 project. A lot can have sublots (that are instances of Lot). I added a relation with the cli, but when I create a new sublot with the POST method of LotLotController I get this error: Unhandled error…
2
votes
1 answer

Loopback4: Can't query Postgres array value using inq

Working with LB4 framework and Postgres for DB, using "loopback-connector-postgresql": "^3.7.0" for DB connectivity and facing issue while using find query with where operator to fetch list of data by matching value in an array and the query used is…
sunilsmith
  • 111
  • 2
  • 15
2
votes
1 answer

Advanced MongoDB operators in LoopBack 4

Is it possible to use advanced MongoDB operators such as Array Update Operators within a Loopback 4 application?
nflaig
  • 673
  • 1
  • 8
  • 15
2
votes
1 answer

Implement API key in loopback 4

I have an API in Loopback 4 that already has authentication implemented by JWT but I want to go one step further by implementing an API key so that only apps that request this API key can use the API. Can someone help me a little with this? I'm a…
2
votes
1 answer

Create a webhook between my front end and back end

So from what I understand about webhooks, I keep looking up "How to create a webhook from my API" but the results keep giving me how to add a webhook (From say GitHub) from different sites. I'm not sure if this is possible but currently, my react…
Vikram Khemlani
  • 555
  • 6
  • 17
2
votes
3 answers

Updating Loopback 4

I am using Loopback 4 to create a REST-ful API. I'm a mobile developer by trade so typescript et al is all pretty new to me, so please be kind ;) I created the app using CLI v1.21.4, and saw a message to say that an update is available. I therefore…
Ian L
  • 5,553
  • 1
  • 22
  • 37
2
votes
1 answer

How to Make Relation in LoopBack v4 With Include Key

https://loopback.io/doc/en/lb4/HasMany-relation.html I followed this steps and then tried to get data with include but I get 500. 500 Error: Invalid "filter.include" entries: {"relation":"ranks"} What I want is to get games object with its related…
canmustu
  • 2,304
  • 4
  • 21
  • 34
2
votes
2 answers

Loopback 4 and constraints in MySQL relations

I am getting into Loopback 4, coming from Sequelize and with a bit of experience with TypeORM. My question is why in Loopback 4 the relations doesn't get constraints. I have seen…
EmileC
  • 39
  • 4
2
votes
2 answers

How to implement search and filter operations in loopback 4?

I want to implement search, filter and pagination capabilities for a model I created in Loopback 4. I have the default 7 CRUD apis for the model I created, all thoughs work fine. Now I want to add the list capabilities(search, filter pagination…
Yash Rahurikar
  • 186
  • 1
  • 10
2
votes
2 answers

How can I specificy Date without time in LoopBack 4 models?

I'm building an API with LoopBack 4, and in a model there is a property called "day" which is a Date type (the MySQL column is also type Date). But I can't post values like "2019-09-09" to it, because it wants something like…
2
votes
2 answers

Loopback 4 POST method is giving 422 error

I am connecting loopback4 to mongodb using loopback mongodb connector. I created model with only two fields id and name,both required. Repository and controller are also created. But when I make a POST request it is giving 422 error This is my…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
2
votes
1 answer

Route decorator for dynamic routing allowing a slash as part of the varible string

I have a loopback4 controller to fetch and create some files on the server. All files are stored in a directory structure with deeper directories. It might look like this: ├── WA2114 │   ├── 300dpi │   │   ├── WA2114_Frontal.jpg │   │   └──…
MIB
  • 337
  • 2
  • 15