Dave Merrill
12/08/2023, 5:37 PMtyrsblade
12/08/2023, 5:43 PMDave Merrill
12/08/2023, 5:49 PMneokoenig
12/08/2023, 5:51 PMsknowlton
12/08/2023, 5:59 PMseancorfield
/docs/) -- more below
• The frontend folks will use mocks for API calls, and will generate test data based on what the API docs say the APIs accept and return
• The backend folks will write tests (first!) against those API docs, using HTTP calls in the tests -- we write tests for all the error conditions outlined in the API docs first and get those to pass (parameter validation etc), then we start writing tests for the various "happy path" combinations and then get those to pass
• We push an initial version of the new APIs to the repo, the CI system runs all the tests and if they pass, a new build is deployed to the staging system
• At this point, the frontend folks can also test directly against the staging backend (they have both mock tests and some real tests)
Docs as part of the API:
We write our docs in Markdown and generate the completed docs using Daux which is a PHP application. That generated HTML is not checked into version control (the source .md files are). The Daux process can be run locally (via docker run) if necessary to preview the docs but it is normally run as part of the CI process so that a snapshot of the docs are captured in the package that is deployed to staging (and then later deployed to production), so that the API always serves up the matching version of the docs -- and staging API may be ahead of production API so this keeps the docs in sync.
If you're curious: https://api.worldsingles.com/docs/Dave Merrill
12/08/2023, 6:56 PMsknowlton
12/08/2023, 6:56 PMsknowlton
12/08/2023, 6:56 PMsknowlton
12/08/2023, 6:56 PMseancorfield
probably because your API initiatives predate themWell, we switched from ACF to Railo around CF9 (it was in prerelease at the time) but I wouldn't have used Adobe's API Manager even if we'd stayed with the commercial version -- I just don't want to be locked into a single vendor for that sort of stuff... And Adobe's REST and GraphQL stuff is... not something I'd want to use either...
Dave Merrill
12/08/2023, 7:50 PMsknowlton
12/08/2023, 8:05 PMsknowlton
12/08/2023, 8:05 PMsknowlton
12/08/2023, 8:06 PMseancorfield
.cfm code with modern ColdBox / CFC based code), we deliberately wrote portable code so it would run on both CF9 (prerelease) and Railo... I've always been a fan of portable code (from writing / contributing to OSS stuff, including FW/1).sknowlton
12/08/2023, 9:00 PMgavinbaumanis
12/10/2023, 5:54 AMbkbk
12/10/2023, 11:55 AMDave Merrill
12/10/2023, 12:47 PMbkbk
12/17/2023, 9:52 AM