All Questions
18 questions
2
votes
0
answers
123
views
When Should We Separate DTOs from REST API Serialization Classes? [closed]
We know that combining a domain entity, a DTO, and a REST API serialization class into one won't pass code review:
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Builder
@Entity
@Table(name = "...
-1
votes
1
answer
592
views
Designing around potentially multiple RESTful API calls to a downstream service
To set up the problem, let's imagine we have a downstream service that we need to call for some information. We set up an API endpoint and call another method which will hold our business logic and ...
1
vote
1
answer
1k
views
What are the advantages of sending timestamp in the response?
I am working on REST API and it calls another service and fetch the data and return to the UI. So It does not have any direct DB interactions. Recently we added exception handling feature which uses ...
0
votes
2
answers
1k
views
A desktop app which incorporates a REST API?
I am planning to build an adapter between a PC and devices which have the same function but which have different interfaces. The adapter will probably be based on a Raspberry Pi and will have a touch ...
1
vote
1
answer
201
views
REST : Static API design
Lets say, I have a scenario where I have to expose an api to fetch supported shirt sizes(small , medium and large)
My initial thought was /v1/shirts/sizes - But this clashes with the existing fetch ...
2
votes
1
answer
163
views
Handling OAuth 2.0 access token
I am creating a rest template to consume REST API secured by OAuth 2.0.
The provider has implemented an expiry for the access token for 5 mins. So Using the rest template, I will be calling the ...
1
vote
1
answer
396
views
Designing low fault software rest API calls to achieve data synchronization between two different systems
I have been looking for a better design approach and will be providing my problem statement here with a similar example. As I don't have logic already in place but have the solution in mind which I ...
2
votes
1
answer
848
views
Microservices loose coupling using distributed business logic or centralized?
How do we achieve loose coupling in the below scenario:
N microservices (let's call them Callers) needs a logic or business( let's call it Worker) to be executed with different contracts. Although ...
0
votes
0
answers
484
views
Testing REST API with nested object creation and endpoint transactionality
I'm building a location based REST API using Spring Boot, and I have run into a bit of a testing philosophy question. I have an object called Location that, among other things, requires a Google ...
-1
votes
1
answer
259
views
Java MVC or Rest based approach with security [closed]
I am working in designing Java-based web applications. Although, I have worked with Java core still a novice in designing web-apps and do not have enough confidence in what I am thinking is correct or ...
11
votes
1
answer
433
views
REST service as an application server for 2000+ client machines. Is it a good idea?
We will be building a system with the UI in javaFx that will be deployed to 2000+ machines (minimum is 2000, but it will be more - can reach 5000 machines).
For other reasons/limitations it must be ...
3
votes
2
answers
5k
views
RESTful service and DAO: deciding on responses
I am developing a RESTful API and I am using DAOs to serve data to the service.
I am having trouble deciding where certain responsibilities should fall, whether in the service or in the DAO contract. ...
0
votes
1
answer
44k
views
Best way to represent multiple JSON response in a REST service? [closed]
I am working on a REST service in which I am trying to come up with a JSON response that I am supposed to return back. Below is the design I am able to come up with in which each line is a response ...
1
vote
1
answer
1k
views
How to avoid LazyInitializationException using Hibernate and Jersey
I am working with Spring Boot + Jersey + JPA/Hibernate to build a RESTful API. The issue I am encountering right now is when I have a relationship in my JPA Entity that is lazy loaded I get a lazy ...
-1
votes
2
answers
4k
views
In a REST service project, where should we put code that calls a third party REST API?
My project is organized in layers like
Configuration
Controller
Service
Repository
Domain
Our REST Controller is in the Controller layer. We need to connect to another API via REST calls and I'm not ...