Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
1 replies
40 views

I’m working on a .NET 9 Clean Architecture solution with the following structure: API – ASP.NET Core Web API (.NET 9) Application – Application services and business logic Domain – Core domain ...
Solo Dev's user avatar
3 votes
1 answer
80 views

I’m refactoring my Laravel application to follow a clean architecture approach with clear separation of concerns: Controller → Service → Repository The Controller handles the HTTP layer,the Service ...
Lana Hanna's user avatar
0 votes
0 answers
50 views

I'm researching that can I use i18n for the messages of validation exceptions. For example: create-user.dto.ts export default class createUserDto { @MinLength(5) @IsString() name: string; }...
Mehmet KÖSMEN's user avatar
1 vote
1 answer
25 views

FastifyAdapter bypasses global ValidationPipe for tz, resulting in 400 whitelistValidation error in production builds Description I’m experiencing an issue where my global ValidationPipe is correctly ...
user30901179's user avatar
-1 votes
2 answers
57 views

I have this DTO: import { Expose, Type } from 'class-transformer'; import { UserDto } from '../../../admin/users/dtos/user.dto'; export class CompanyDto { constructor(partial: Partial<CompanyDto&...
derstauner's user avatar
  • 1,958
0 votes
1 answer
64 views

I'm building an accounting application using NestJS. I have a DTO called CreateTransactionDto, and I want certain fields to be required or forbidden based on the value of transactionType. For example: ...
muratmutlu's user avatar
1 vote
1 answer
68 views

I´m trying to validate the body of a route on NestJS and i´m using the class-validator package, my route is receiving the data as multipat because this route also accepts a file upload. Here is the ...
DMinatto's user avatar
0 votes
1 answer
257 views

I am recently working on hexagonal architecture test with java and spring boot, and i am trying to implement DTOs, i have a service class and this class inherits from four interfaces, ICreateProduct, ...
Frank2497's user avatar
0 votes
1 answer
246 views

I have a nestjs dto classes. Use it for response dto. class A { response: '1', prop1: string } class B { response: '2', prop2: string } Everything works function foo ():A|B { const result:...
Dmo's user avatar
  • 49
0 votes
2 answers
47 views

I have 3 tables: main account, activities & trades. What I want is to return a bool, based on wither or not a main account has any trades associated with it (connect via an account id column in ...
Sean's user avatar
  • 907
0 votes
1 answer
201 views

I have a problem with the structure of my API. My API includes the study domain class, which has an educationLevelId attribute; This attribute belongs to the academicLevel domain class. Study Domain - ...
JUAN PABLO SOLARTE HOYOS's user avatar
0 votes
1 answer
151 views

I'm working with a nested structure in TypeScript where each CategoryDTO can contain child entities (childEntities), which can be either CategoryDTO (categories) or ProductDTO (products). However the ...
mohit singla's user avatar
0 votes
0 answers
49 views

To reduce the amount of code, I thought of creating an abstract service like that (it is just a "sketch"): public abstract class CrudService<E extends EntityWithId<ID>,ID,R extends ...
Pavlo Shevchyk's user avatar
-1 votes
2 answers
250 views

In my .NET Core application, assume I have 10 API endpoints and each endpoint has a DTO. Now I need to consolidate this 10 endpoints into 1 endpoint with http GET method. How to merge all 10 DTOs into ...
prasidh's user avatar
  • 19
0 votes
1 answer
80 views

I use: @UsePipes(new ValidationPipe({ transform: true })) to transform query param criteria to specific types, but it doesn't work for numbers, can you explain me why? Version of @bx/nestjs-commons - ...
Paweł Grabowski's user avatar
0 votes
0 answers
176 views

I have two JPA entities: Person and Address and three DTOs called: PersonDto, AddressDto and BasicAddressDto. The class AddressDto extends BasicAddressDto. PersonDto has a property called address (...
CodeGrinder's user avatar
0 votes
1 answer
88 views

I'm working on a NestJS application where I need to create different types of entities (like Users, Products, Orders, etc.) and apply some transformations before saving them to the database. ...
The beep's user avatar
0 votes
0 answers
519 views

While doing R&D about DTO, I am unclear about the difference between the model class and a DTO. I searched for some information about that. Model - has the data handle and business logic DTO - ...
Dhanush S's user avatar
0 votes
1 answer
336 views

I have a very simple custom API endpoint with an input and output DTO and a Symfony Controller, build like the examples in the documentation page: https://api-platform.com/docs/v2.3/core/dto/ #[...
nnikolay's user avatar
  • 1,771
0 votes
0 answers
266 views

Below is my Data Transfer Object using Spatie\LaravelData\Data using Laravel Framework 9.52.16. In this definition $user_id is defined as optional property but yet when it is missing it throws an ...
Khan's user avatar
  • 5,294
1 vote
1 answer
1k views

I've a spring application (webservice that connect to a database and retrieve data) using a hexagonal architecture and DDD (Domain-Driven Design). The basic struture is Application Controller to ...
JMarques's user avatar
  • 3,064
0 votes
1 answer
124 views

I want to use this following DTO-Class to project the Entity-Object in my project in the purpose to retrieve the corresponding information related to my profile depending on id's value given as ...
IRahi's user avatar
  • 17
0 votes
0 answers
46 views

Here is my code, where the !!name && !!familyRole && !!gender part is computing isOnboarded value. Is it good practice to do such calculations inside DTO class ? import { UserDocument }...
Намик Гусейнов's user avatar
1 vote
1 answer
102 views

I hope you are all doing well. I am currently working on a multi-layered application and have encountered a few challenges that I would appreciate your input on. Here's the situation: I have an ...
João Paulo Rodrigues Santos's user avatar
0 votes
1 answer
412 views

i'm using Spring Boot and need to access multiple values from the request headers, the problem is that @RequestHeader it only accepts a single property at a time. Instead of declaring individual ...
Teodoro's user avatar

1
2 3 4 5
44