You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: claude.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,6 +329,21 @@ Always write "frontend" and "backend" as single words.
329
329
330
330
Don't give "internet" an initial capital unless it appears at the start of a sentence.
331
331
332
+
#### OpenAPI description document vs OpenAPI specification
333
+
334
+
"The OpenAPI Specification" (capitalized, often abbreviated OAS) refers to the
335
+
standard itself, published by the OpenAPI Initiative.
336
+
337
+
A YAML or JSON document that describes an API and conforms to the standard is
338
+
an "OpenAPI description" or "OpenAPI description document", not a "spec" or
339
+
"specification".
340
+
341
+
- ❌ Upload your OpenAPI spec.
342
+
- ❌ Generate an SDK from your OpenAPI specification.
343
+
- ✅ Upload your OpenAPI description document.
344
+
- ✅ Generate an SDK from your OpenAPI description.
345
+
- ✅ This guide assumes familiarity with the OpenAPI Specification.
346
+
332
347
#### npm
333
348
334
349
Always write "npm" in lowercase. Never capitalize as "NPM" or treat it as an acronym. See [npm branding guidelines](https://docs.npmjs.com/policies/logos-and-usage).
Copy file name to clipboardExpand all lines: openapi/frameworks/trpc.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
-
title: How To Generate an OpenAPI Spec With tRPC
2
+
title: How To Generate an OpenAPI With tRPC
3
3
description: "How to use tRPC to create an OpenAPI spec and create an SDK for it with Speakeasy."
4
4
---
5
5
6
6
import { Callout } from"@/mdx/components";
7
7
8
-
# How to generate an OpenAPI/Swagger spec with tRPC
8
+
# How to generate an OpenAPI/Swagger with tRPC
9
9
10
10
In this tutorial, we'll explore how to generate an OpenAPI document for our [tRPC](https://trpc.io/) API, and then we'll use this document to create an SDK using Speakeasy.
11
11
12
12
Here's what we'll cover:
13
13
14
14
1. Adding `trpc-openapi` to a tRPC project.
15
-
2. Generating an OpenAPI specification using `trpc-openapi`.
16
-
3. Improving the generated OpenAPI specification for better downstream SDK generation.
15
+
2. Generating an OpenAPI document using `trpc-openapi`.
16
+
3. Improving the generated OpenAPI document for better downstream SDK generation.
17
17
4. Using the Speakeasy CLI to create an SDK based on the generated OpenAPI specification.
18
18
5. Using the Speakeasy OpenAPI extensions to improve created SDKs.
19
19
6. Automating this process as part of a CI/CD pipeline.
@@ -27,7 +27,7 @@ Here's what we'll cover:
27
27
28
28
tRPC does not natively export OpenAPI documents, but the [`trpc-openapi`](https://github.com/jlalmes/trpc-openapi/) package adds this functionality. We'll start this tutorial by adding `trpc-openapi` to a project, and then we'll add a script to generate an OpenAPI schema and save it as a file.
29
29
30
-
The quality of your OpenAPI specification will ultimately determine the quality of created SDKs and documentation, so we'll dive into ways you can improve the generated specification.
30
+
The quality of the OpenAPI specification will ultimately determine the quality of created SDKs and documentation, so we'll dive into ways you can improve the generated specification.
31
31
32
32
With our new and improved OpenAPI specification in hand, we'll take a look at how to create SDKs using Speakeasy.
0 commit comments