Skip to content

Commit 4cb8d79

Browse files
committed
Update README
1 parent d08248e commit 4cb8d79

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- [Overview](#overview)
88
- [Use Case](#use-case)
9+
- [Do I Really Need This?](#do-i-really-need-this)
910
- [Examples](#examples)
1011
- [Usage](#usage)
1112
- [Full Code](#full-code)
@@ -26,6 +27,12 @@ As a result, you end up with an API that has
2627
1. strict type checking, and
2728
2. can give the client helpful error messages when the request is invalid
2829

30+
## Do I Really Need This?
31+
32+
For something like an API, it's worth asking who is going to be the client that is using the API. Is this an API for your single page app, or are you providing a service and it will be used by other developers?
33+
34+
If the API is "internal" and only used within the context of your site, I don't think it's necessary. But if someone is trying to use your API, I think it's worth having. API documentation is rarely perfect, and giving the client a readable error can help them debug when a request throws a 400 Bad Request.
35+
2936
# Examples
3037

3138
Read below for a quick look at how you can use `go-map-schema`.

0 commit comments

Comments
 (0)