How Do You Handle Missing or Incorrect REST API JSON Response Data Keys in Your Applications?

14 Replies, 2087 Views

Hey! I’ve been using a tool called Stoplight to validate rest api json response data keys. It’s great for testing and documenting APIs. You can set up mock servers and validate responses against a schema.

For fallbacks, I usually use default values in my code. Like, if the key is missing, I’ll just set it to null or some default value. Not perfect, but it works.

Messages In This Thread



Users browsing this thread: 1 Guest(s)