Re:Beating the tradeoff between developer velocity and scala...
by Zigurd on Friday January 07, 2022 @10:18AM
(#29840078)
OpenAPI is hugely useful in the way you describe, as well as making system capabilities understandable to non-coder project participants. Mocking responses enables non-coders, using tools like swagger.io, to see API documentation and easily interact with an API specs. This is vastly better than other attempts, like UML, to make system architecture visible outside the group of coders on a project.
It is never too early to start making an OpenAPI spec. Technical product managers can even deliver parts of specs in this form. The tools are easy enough.
Re:Beating the tradeoff between developer velocity and scala...
by Scalestein on Friday January 07, 2022 @10:22AM
(#29840130)
This looks quite promising for some challenges I'm facing. Do you do anything towards having a central source of truth for API contracts? Like a single repo with the specs so that when a change is made everyone can develop against it?
Re:Beating the tradeoff between developer velocity and scala...
by Raidion on Friday January 07, 2022 @03:26PM
(#29844304)
Yep, that's exactly how it goes. Repo contains contracts. Tests pull the latest version from that repo, though you're able to locally override that version to pull in a "unofficial" version.
Spec is created before any dev work begins. It might need changes when the work continues, no worries, the specs are versions and your team can decide on what stable versions are/aren't.
Similarly, because the OpenApi spec gives examples, frontend devs can use the proxy to mock requests and responses with literally 0 code written. This parallelizes development really well because you know everyone is building to the same spec.
Running a bunch of debugs locally with the proxy does slow things up, but it's a trivial add to a containerized workflow.
Highly recommended! Parallelized development, prevents breaking changes, and provides a canonical API model that's always up to date and enforced!