Knowledgebase

Documenting APIs and Interfaces Print

  • softwareengineering, software, permissions, guide, howto, solution, zillionkinghost, hosting
  • 0

What others depend on.

WHAT TO DOCUMENT FOR EVERY ENDPOINT OR FUNCTION

What it does What it requires What it returns What errors it can produce

Any constraints: limits, permissions, side effects

WHY ERRORS SPECIFICALLY

Callers must handle them, and undocumented errors are handled badly or not at all.

WHAT TO GENERATE

Reference documentation from the code or a specification.

WHY

Manually maintained references diverge immediately.

WHAT A SPECIFICATION PROVIDES

A machine-readable contract, usable for generating documentation, clients and tests.

WHAT TO INCLUDE BEYOND REFERENCE

Examples of actual use An explanation of authentication Versioning and deprecation policy

WHY EXAMPLES MATTER MOST

They are what people actually use.

WHAT TO DOCUMENT ABOUT CHANGES

What changed, when, and what consumers must do.

WHAT TO NEVER DO

Change a published interface without notice Deprecate without a timeline and an alternative

WHAT TO KEEP

Documentation for versions still in use.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot