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. ...
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 ...
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 ...
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 ...
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 ...
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.
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
api-design × 1035rest × 366
api × 342
web-api × 110
design × 108
java × 76
design-patterns × 76
architecture × 71
c# × 56
microservices × 43
http × 41
json × 37
web-services × 35
c++ × 29
python × 29
object-oriented-design × 26
c × 25
web-applications × 23
javascript × 22
security × 20
programming-practices × 18
libraries × 17
interfaces × 16
web-development × 15
.net × 15