---
title: "Full-stack static typing with OpenAPI TypeScript and Microsoft.AspNetCore.OpenApi"
url: https://daily.dev/posts/full-stack-static-typing-with-openapi-typescript-and-microsoft-aspnetcore-openapi-irja8ajaq
source_url: https://johnnyreilly.com/dotnet-openapi-and-openapi-ts
type: article
source: "John Reilly"
published: 2026-01-02T09:49:13.690Z
updated: 2026-01-02T09:49:35.151Z
tags: ["react", "typescript", ".net", "openapi", "aspnetcore"]
reading_time: 8
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.

# Full-stack static typing with OpenAPI TypeScript and Microsoft.AspNetCore.OpenApi

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

## Summary

Learn how to achieve full-stack static typing by generating TypeScript clients from .NET Web APIs using Microsoft.AspNetCore.OpenApi and openapi-ts. The tutorial covers creating a .NET API with OpenAPI 3.1 support, generating TypeScript type definitions and clients, and consuming the API in a React application. Includes solutions for handling number type issues in the generated OpenAPI spec and demonstrates how to maintain type safety from backend C# models through to frontend TypeScript code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://johnnyreilly.com/dotnet-openapi-and-openapi-ts>

## Similar posts on daily.dev

- [Keeping front end and back end in sync with NSwag generated clients](https://daily.dev/posts/keeping-front-end-and-back-end-in-sync-with-nswag-generated-clients-ppjnn03bp) · John Reilly · 3 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/full-stack-static-typing-with-openapi-typescript-and-microsoft-aspnetcore-openapi-irja8ajaq)
