Scrivio Interview library
ScenarioFoundations5 min read · updated 12 November 2026

Your company has a REST API standard (error format, pagination, versioning), but your team's deadline is tomorrow and following it means extra work. What do you do?

First, find out how much work the standard really adds, because the error format and pagination are often quick with the shared library or Spring's built-in support. If something truly cannot be done by tomorrow, ship with the gap written down, a ticket and a date to fix it, and tell the API's consumers, then give feedback on the standard if it was costly. What we must not do is quietly ship a different pattern, because other clients will build on it and other teams will copy it.

Why this question is asked

Every developer meets this moment: a deadline on one side and a company standard on the other. Interviewers ask it because there is no single right answer, but there is a right way to think about it, and it shows whether we see beyond our own team. In this answer, we will recap why API standards exist, check what following them actually costs in a Spring Boot service, look at what to do if we must defer, and see why feedback and visibility matter more than the shortcut itself.

1Why the Standard Exists

An API standard for error format, pagination and versioning is a promise to every client: whichever team's API you call, errors look the same, pages work the same, and versions change the same way. A mobile app or another service can then use one error handler and one paging helper for the whole company.

So when one API skips the standard, the cost does not disappear; it moves to the consumers. Each client team must write special code for our errors and our paging, and when we fix it later, they must change their code again. Saving half a day for us can cost several days spread across other teams.

2Checking What Is Really Needed

Before deciding anything, we look at the actual gap. Often it is smaller than it seems. Spring Framework 6 and later have built-in support for RFC 9457 problem details, the standard JSON error format that many company standards are based on, and a company shared library may already wrap it. Pagination is similar: Spring Data's Pageable handles page and size parameters for us.

Java
# application.properties: standard error bodies for Spring MVC's own exceptions
spring.mvc.problemdetails.enabled=true
@RestControllerAdvice
class ApiErrors {
@ExceptionHandler(OrderNotFoundException.class)
ProblemDetail notFound(OrderNotFoundException e) {
ProblemDetail pd = ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, e.getMessage());
pd.setTitle("Order not found");
return pd; // {"type":"about:blank","title":"Order not found","status":404,...}
}
}
@GetMapping("/v1/orders")
Page<OrderDto> list(Pageable page) { // ?page=0&size=20 handled by Spring Data
return orders.findAll(page).map(OrderDto::from);
}

Notice how little code this is. The error handler is a few lines, and paging is one parameter. Versioning is usually just the /v1 prefix in the path from the first release. In many cases, an hour or two covers the standard, which changes the decision entirely: we follow it and still meet the deadline.

If the company has a starter library for the standard, adding it may be even quicker. Asking the platform team or a colleague who has done it before is also part of checking.

3If We Truly Must Defer

Sometimes a part of the standard really is expensive, for example a cursor-based pagination scheme that needs a database index we cannot add today. Then we can make a conscious, visible exception rather than a silent one.

We write the gap down in the code and in a ticket with a planned date, ideally the next sprint. We tell the API's consumers, especially if they are other teams, what differs and when it will change, so they do not build their code around the temporary behaviour. If the API is new and has few consumers, we may even mark the endpoint as preview in the API documentation. And we tell our tech lead, because a known exception is a decision the team owns, not a shortcut one person took.

Step throughDeadline versus API standard
  1. List the parts of the standard we misserrors, paging, versioning
  2. Estimate each with shared librariesoften under two hours
  3. Can it be done by the deadline?
    YesFollow the standard and shipNoDefer only the expensive part
  4. Ticket, date, comment in codethe gap is visible
  5. Tell consumers and the tech leadno one builds on the gap
  6. Feedback to the standard ownersif it was costly, say why

6 steps in order. Play them, or step through them one at a time.

4Feeding Back on the Standard

If following the standard was hard, that is useful information for whoever owns it. Maybe the shared library is missing, maybe the documentation lacks an example, or maybe one rule is too strict for a small internal API. Telling them, with the specific case, helps the next team and may change the standard. Standards improve only when people who use them report where they hurt.

5Why Quietly Shipping a Different Pattern Is the Worst Option

The tempting choice is to ship whatever is quickest and say nothing. The trouble is that APIs are copied. The next developer who needs an endpoint looks at existing code, finds ours, and repeats its error format. Within months the company has two or three formats, and the standard has lost its value for everyone.

There is also the consumer problem. Once a client depends on our ad hoc format, changing it is a breaking change that needs a new version and coordination. So a shortcut that saves hours now can cost weeks later. Being open about an exception keeps it temporary; being quiet about it makes it permanent.

6Follow-up questions

What if my manager says just ship it?

We explain the cost briefly, that consumers will build on the non-standard format and we will have to change it later, and propose the smallest compliant version or a documented exception with a date. If the manager still decides to ship, it is their decision to make, and we make sure the ticket and the consumer note exist.

Which parts of a standard are hardest to fix later?

The ones that clients code against: the error format, the paging model and the URL or version scheme. Internal parts, such as logging or how we structure the controller, can change without anyone noticing. So if we must defer, defer the internal things, not the contract.

Is it ever fine to ignore the standard?

For a throwaway prototype that no other team will call, the risk is small, but we label it clearly. As soon as another team or an external client depends on the API, the standard applies.

7Conclusion

In this answer, we saw that an API standard protects consumers, so skipping it shifts work onto other teams. The first step is to measure the real gap, which is often small thanks to Spring's ProblemDetail support, Spring Data's Pageable and shared libraries. If part of it must wait, we document the gap, plan the fix, and tell consumers and our lead. We feed back if the standard was costly, and we never quietly ship a different pattern that others will copy.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd start by checking how much extra work the standard really is, because it's often less than it feels the day before a deadline. In Spring Boot the error format is usually problem details, which Spring supports with ProblemDetail and a small exception handler, paging is a Pageable parameter, and versioning is a /v1 path from the start.

Then, if they want more

If there's a company starter, it may be one dependency. So often I can follow it in an hour or two and still ship.

If one part really is expensive, I'd defer only that part and make it visible: a comment in the code, a ticket with a date, a note to the API's consumers so they don't build on the temporary behaviour, and a word with my tech lead so it's a team decision.

I'd prefer to defer internal things rather than the contract clients code against. If the standard was costly to follow, I'd give the owners concrete feedback so it improves.

The thing I'd avoid is quietly shipping a different pattern, because people copy existing APIs and clients start depending on it, and then a small shortcut turns into a breaking change later.

About this answer

Last updated
12 November 2026
Versions it names
Spring Framework 6
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your company has a REST API standard (error format, pagination, versioning), but your...": https://scrivio-interview-library.netlify.app/architecture/platform-and-governance/2f8ed1d931/