| ||Ask HN: Why is there no standard for API documentation?|
9 points by quambene 1 day ago | hide | past | favorite | 15 comments |
|I'm currently integrating purchase api for google and apple in my app. And it's quite painful because api documentation is often slightly inaccurate, which is leading to a ton of extra debugging.|
Take this apple purchase api documentation for example: https://developer.apple.com/documentation/appstorereceipts/responsebody.
Attribute "is-retryable" is documented as boolean, but in fact it is an integer (0 or 1), which is only explained in the description text.
Also, you almost never get the information if an attribute is nullable (or optional). Why not just document nullable like e.g.
1.) Type (nullable), or
2.) Option<Type> like in Rust
I guess, a strict api documentation standard would help tremendously to save quite some debugging time.
| Apply to YC