Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API-Driven Development Refactored

Avatar for Mihaela Mihaljevic Jakic Mihaela Mihaljevic Jakic
September 19, 2025
110

API-Driven Development Refactored

Scaling Server and Client Code in Highly Modular Architectures

Avatar for Mihaela Mihaljevic Jakic

Mihaela Mihaljevic Jakic

September 19, 2025

Transcript

  1. About Me Mihaela Mihaljevic • 10+ years building iOS &

    macOS apps • Fom global product teams to running my own small business • Focused in modular, OpenAPI-driven Swift architectures
  2. Agenda • - **Why**? Why specs fi rst? • -

    **How**? How I make it work in Swift. • - **What**? What it looks like in a demo. • - And fi nally: **So what**? What you can take away and use yourself.
  3. WHY? Most backend engineers generate specs from existing code •

    But it should be the other way around. • Why? Because anything that can be expressed in a formal language isn’t worth human e ff ort — and humans make mistakes. We should let the machine handle it. • When we generate from specs, we establish a contract. A single truth that backend, frontend, and mobile all must follow. • And because that contract is untouched by humans, it’s trustworthy — like a sealed bottle from a pharmacy. Only then can it be used for things like privacy, GDPR, HIPAA, and other certi fi cations.
  4. How? • OpenAPI → Specs are the contract • Extreme

    Packaging → Thin targets, modular design • Generator → swift-openapi-generator turns specs into code
  5. How? OpenAPI • The Contract • Origins • Who Writes

    It? • Anatomy of a Spec • Example Endpoint
  6. How? OpenAPI -> The Contract • OpenAPI is a speci

    fi cation that describes REST APIs in a machine-readable way. • It lets humans and computers understand a service — without source code, without reverse engineering. • It’s not YAML or JSON itself — it’s a formal standard, language-agnostic, like an RFC
  7. How? OpenAPI -> Origins • OpenAPI started life as Swagger

    in 2010, created by Tony Tam. • In 2015 SmartBear donated it to the Linux Foundation, creating the OpenAPI Initiative. • That’s when Swagger Speci fi cation evolved into OpenAPI. OAS 3.0 came in 2017.
  8. How? OpenAPI -> Who Writes It? EVERYONE! • Specs aren’t

    written only by backend engineers. • Product owners, front-end, mobile, backend — all contribute. • It’s a shared contract, not a backend artifact.
  9. How? OpenAPI -> Anatomy of a Spec • Info **

    • Servers ** • Paths ** • Components • Security • Webhooks ** - required
  10. How? ExP -> The Core Idea • Push modularity to

    the extreme • Thin targets • Shared core models • Clear ownership
  11. How? ExP -> Example Structure • A shared package with

    models. • Thin packages for features, server, client, UI. • All glued together in the app workspace.
  12. So What? Specs • Specs come fi rst — they’re

    the single source of truth, the contract everyone follows.
  13. So What? Packaging • Packaging forces discipline — thin targets,

    clear boundaries, projects that stay healthy as they grow.
  14. So What? Automation • Automation makes it real — code

    generation, merge tests, CI/CD. Machines handle the boring parts, humans stay focused on design..