---
title: "Keeping front end and back end in sync with NSwag generated clients"
url: https://daily.dev/posts/keeping-front-end-and-back-end-in-sync-with-nswag-generated-clients-ppjnn03bp
source_url: https://johnnyreilly.com/keeping-front-end-and-back-end-in-sync-with-nswag-generated-clients
type: article
source: "John Reilly"
published: 2025-10-12T09:12:20.068Z
updated: 2025-10-12T09:12:38.985Z
tags: ["typescript", "c#", "openapi"]
reading_time: 5
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Keeping front end and back end in sync with NSwag generated clients

**[John Reilly](https://daily.dev/sources/johnnyreilly)** · 5 min read · 3 upvotes · 0 comments

## Summary

Generate TypeScript clients from OpenAPI specs using NSwag to maintain type safety between polyglot front end and back end systems. Create integration tests that compare generated client code against committed versions to catch API contract changes during CI. When back end changes affect the OpenAPI spec, tests fail and prompt developers to regenerate clients, while TypeScript compilation catches breaking changes in front end code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://johnnyreilly.com/keeping-front-end-and-back-end-in-sync-with-nswag-generated-clients>

## Similar posts on daily.dev

- [Swagger In A Box: NPM, APIs, and Swagger Codegen](https://daily.dev/posts/swagger-in-a-box-npm-apis-and-swagger-codegen-ks4ldkveh) · Atomic Spin · 6 upvotes · 0 comments
- [Full-stack static typing with OpenAPI TypeScript and Microsoft.AspNetCore.OpenApi](https://daily.dev/posts/full-stack-static-typing-with-openapi-typescript-and-microsoft-aspnetcore-openapi-irja8ajaq) · John Reilly · 3 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#c#](https://daily.dev/tags/c#), [#openapi](https://daily.dev/tags/openapi)

[View this post on daily.dev](https://daily.dev/posts/keeping-front-end-and-back-end-in-sync-with-nswag-generated-clients-ppjnn03bp)
