M9 1a8 8 0 1 0 0 16A8 8 0 0 0 9 1zm. Join Stack Overflow to learn, share knowledge, and build your career. M9 1a8 8 0 1 0 0 16A8 8 0 0 bitcoin java doc enum 9 1zM8 15.
Should we use enum constants in REST API’s path-params, query-params or JSON requests? The question is regarding best practices with respect to REST APIs. Example: I have a get API with a path-param as status. So, should I accept “status” as a string or as Enum type?
Also, I would like to know the best-practices with respect to query-params and JSON requests as well. Yes, that seems to be the right way. But then, when we give out API contracts, we explicitly mention what values we are expecting. I’m using Swagger for automatically creating the API documentation. It can easily detect the whitelisted values from the code and prepare the document accordingly if I use Enum type in the request. Enum types are a better way to document acceptable values. If you’re maintaining good API documentation that describes acceptable values, String isn’t terrible, but are other developers on your team as meticulous about such documentation?
VGR Actually, I’m the only one working on these REST services as I work in a very small team. But still, I need to handout the API contracts to other teams. So, I have to be meticulous about the documentation. REST API: Request body as JSON or plain POST data? When do I use path params vs.
What is the best way to deal with cranks? Can someone help me with a basic LED set up? Is it possible to get this ‘nicer’ solution for an integral from Mathematica? Why do some chemical reactions require many steps? Is there any tool to highlight TODOs in a . Should I take out a loan to pay off a relative’s credit card debt? What does it mean to “burn a zero-day”?