Skip to content

Commit

Permalink
📝 Document TypeSpec reduction
Browse files Browse the repository at this point in the history
Documents TypeSpec reduction in lines of code compared to Open API.
  • Loading branch information
connorjs committed Sep 10, 2023
1 parent 5fa8c25 commit b297e87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@

I created this project to learn about TypeSpec through first-hand usage.

The generated Open API 3 specification has 878 lines (with no blank lines) in a
single file. The TypeSpec source has 493 lines (about ⅓ are blank lines for
readability) split across 8 files for logical organization, which is a ~45%
reduction in lines of code.

If we ignore the imports, using statements, and blank lines within models, then
the TypeSpec only has 353 lines. That means a 60% reduction in code to maintain.

## Getting started

Follow these steps to consume the generated Open API specification for SWAPI.
Expand Down

0 comments on commit b297e87

Please sign in to comment.