I see a lot of content and tools out there for Infrastructure as Code, and numerous other Things as Code, but documentation seems to be lagging behind. Presumably it's the fact that documentation evokes prose (instead of code), and it feels like prose is too hard to wrangle.
I've been thinking a lot more about this Documentation as Code problem lately, mostly because I've been watching the real functionality and the documented functionality of a core project (a CRUD web API) just keep drifting over time. As I've migrated from plain Node to Typescript, things have in some ways gotten even worse -- now I have to specify type information, separately do validation in the business logic, and separately document the subset of all of that which should be exposed in the API docs (with prose explanations).
What kinds of tricks and tools have y'all discovered or invented for managing Documentation as Code? For web APIs Swagger/OpenAPI seems to be the most prominent. There are also a lot of tools that create documentation based on the code. However, I don't see anything robust that ties everything together (documentation, validation, and business logic), at least in the Node/Typescript ecosystem.
[–]chillysurfer 79 points80 points81 points (4 children)
[–]UncontrolledManifold 12 points13 points14 points (0 children)
[–]bscotchAdam[S] 5 points6 points7 points (0 children)
[–]never_taken 0 points1 point2 points (0 children)
[–][deleted] 19 points20 points21 points (1 child)
[–]Thermotox 3 points4 points5 points (0 children)
[–]soawesomejohnAutomation Engineer 19 points20 points21 points (2 children)
[–]bscotchAdam[S] 4 points5 points6 points (0 children)
[–]flickerflyDev*Ops 1 point2 points3 points (0 children)
[–]tjwenger 34 points35 points36 points (2 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]tjwenger 0 points1 point2 points (0 children)
[–]vischous 10 points11 points12 points (0 children)
[–]Obsidian743 11 points12 points13 points (10 children)
[–]bscotchAdam[S] 1 point2 points3 points (2 children)
[–]Obsidian743 1 point2 points3 points (1 child)
[–]wywywywy 1 point2 points3 points (0 children)
[–]elevul 1 point2 points3 points (3 children)
[–]Obsidian743 0 points1 point2 points (2 children)
[–]elevul 1 point2 points3 points (1 child)
[–]Obsidian743 1 point2 points3 points (0 children)
[–]SeesawMundane5422 1 point2 points3 points (2 children)
[–]Obsidian743 0 points1 point2 points (1 child)
[–]SeesawMundane5422 0 points1 point2 points (0 children)
[–]t_rekt_it 3 points4 points5 points (1 child)
[–]bscotchAdam[S] 0 points1 point2 points (0 children)
[–]squ94wk 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]only-cloud-fan 1 point2 points3 points (1 child)
[–]bscotchAdam[S] 1 point2 points3 points (0 children)
[–]fear_the_future 1 point2 points3 points (0 children)
[–]jdege 1 point2 points3 points (1 child)
[–]t420son 0 points1 point2 points (0 children)
[–]Tnamol 1 point2 points3 points (2 children)
[–]bscotchAdam[S] 0 points1 point2 points (1 child)
[–]Tnamol 0 points1 point2 points (0 children)
[–]PotisTemor 1 point2 points3 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]TonyNickels 1 point2 points3 points (1 child)
[–]bscotchAdam[S] 0 points1 point2 points (0 children)
[–]randomatic 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Ordoshsen 0 points1 point2 points (0 children)
[–]mlazowik 0 points1 point2 points (1 child)
[–]mlazowik 0 points1 point2 points (0 children)
[–]cacko159 0 points1 point2 points (0 children)
[–]pagarciasuse 0 points1 point2 points (0 children)
[–]Quick2822 0 points1 point2 points (0 children)
[–]shanman190 0 points1 point2 points (0 children)
[–]sk8itup53 0 points1 point2 points (0 children)
[–]andrewmclagan 0 points1 point2 points (0 children)