6 votes

How do I make a breaking change to a Nuget package?

Vincent Savard mentioned semantic versioning in a comment on your question. While semantic versioning is not a magical fix, it does provide a means to communicate that a breaking change has been made. ...
user avatar
4 votes

In RESTful APIs, what's the proper way to have different resource properties based on user authorization?

REST does not define behavior for such fine-grained details. Keep the same endpoint, but return different data depending on the client. If the client has authorization to view the customer, return a ...
user avatar
3 votes
Accepted

Should you limit the size of JSON array to avoid abuse? Or is this already covered by size limits?

The size of a posted JSON array is unlikely to be the thing that causes issues by itself, because reading and parsing of json objects, regardless of size, in almost any language is essentially a ...
user avatar
  • 1,187
3 votes

What is the alternative to checked exceptions in API/interface design?

First, a lot of programmers don't realize that being forced to handle specific exceptions is not the bad part of checked exceptions. The main idea is a good one. The problem is that you have to either ...
user avatar
2 votes
Accepted

REST API endpoint to request all available data from a resource

It seems a bit weird to me that sensor ID is a part of resource path yet you mention one or more IDs. I'd like to think of a single resource /sensors/data. Sensor IDs can be considered as optional ...
user avatar
  • 186
2 votes

REST API endpoint to request all available data from a resource

There is no need to insert a unnecessary /all in the route. Keep it simple and short. GET /sensors/data is absolutely fine. /sensors/all/data could also cause trouble if all is a valid id.
user avatar
  • 249
2 votes

REST API endpoint to request all available data from a resource

Since all is not a resource, you shouldn't use it in a resource URL but data, however, is so /sensors/data is the more correct option.
user avatar
2 votes

Should you limit the size of JSON array to avoid abuse? Or is this already covered by size limits?

Don't set limits without it being forced. Check what happens with 10,000 items in the array. If your app crashes, fix the crash and try again. If it becomes slow - just because YOU think there should ...
user avatar
  • 37.4k
2 votes

REST API Design: Should we have separate endpoints for same resource if the system uses both ElasticSearch and MySQL?

REST doesn't care. The fact that you are using databases rather than the file system, and two databases rather than one, is an implementation detail that is hidden behind the web interface. As long ...
user avatar
1 vote

What is the alternative to checked exceptions in API/interface design?

I think you have to look again at what "exceptions are meant to be". If you think of exceptions as "exceptional things which cannot be handled" then the idea of returning them as ...
user avatar
  • 64.1k
1 vote

In RESTful APIs, what's the proper way to have different resource properties based on user authorization?

what's the proper way to have different resource properties based on user authorization? Technically, it doesn't matter very much. This is because caches have different rules for responses to ...
user avatar
1 vote

Plugin architecture vs Interface Segragation Principle (SOLID)

The purpose of a plugin may be specific to your current application, but whatever it is, it is strictly delineated in your domain. The generic codebase has certain expectations of what a plugin is or ...
user avatar
  • 37.3k
1 vote

Standard Error response for Backend API failure

When the api itself is dependent on another backend API, it is a good practice to expose error codes or error information from the backend api call? This is the wrong question (for "good ...
user avatar
  • 9,147

Only top scored, non community-wiki answers of a minimum length are eligible