Skip to content

Commit 035255a

Browse files
chore: fix heading to use title casing
1 parent 38b5681 commit 035255a

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

website/docs/reference/openapi-generator/cli.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
sidebar_position: 2
33
---
44

5-
# Command-line interface
5+
# Command-line Interface
66

77
## Overview
88

99
The `openapi-generator` CLI tool converts your `@api-ts/io-ts-http` `apiSpec` definition
1010
into an OpenAPI 3.0 specification. When you run this tool, it reads a TypeScript file
1111
containing your API definition and outputs the OpenAPI specification to stdout.
1212

13-
## Usage syntax
13+
## Usage Syntax
1414

1515
```shell
1616
openapi-generator [OPTIONS] [FLAGS] <file>

website/docs/reference/openapi-generator/configuration.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You need to configure the generator to:
1212
- Define OpenAPI schemas for custom `io-ts` codecs that can't be automatically derived
1313
from the Abstract Syntax Tree (AST).
1414

15-
## Preparing external types packages
15+
## Preparing External Types Packages
1616

1717
To process `io-ts` types imported from other npm packages, ensure the following in the
1818
external package's `package.json`:
@@ -39,21 +39,21 @@ external package's `package.json`:
3939
2. Specify the source entry point using the `source` field (for example,
4040
`"source": "src/index.ts"`)
4141

42-
## Defining custom codec schemas
42+
## Defining Custom Codec Schemas
4343

4444
For custom `io-ts` codecs (such as those using `new t.Type(...)` or complex types not
4545
directly supported), you must define schemas manually using one of these methods:
4646

47-
### Method 1: Via openapi-gen.config.js (recommended for type authors)
47+
### Method 1: Via `openapi-gen.config.js` (Recommended For Type Authors)
4848

4949
You can define schemas directly within the package that declares the custom codecs:
5050

5151
1. Create a file named `openapi-gen.config.js` in the root of the types package
5252

5353
2. Update the package's `package.json` to include:
5454

55-
- The `customCodecFile` field pointing to this file
56-
- The config file in the `files` array
55+
- The `customCodecFile` field pointing to this file.
56+
- The config file in the `files` array.
5757

5858
```json
5959
// package.json of the types package defining custom codecs
@@ -98,10 +98,10 @@ You can define schemas directly within the package that declares the custom code
9898
The exported function receives the `fp-ts/Either` namespace (`E`) as an argument. You
9999
should return an object where:
100100

101-
- Keys are the exported names of your custom codecs
102-
- Values are functions that return `E.right()` with an OpenAPI schema object
101+
- Keys are the exported names of your custom codecs.
102+
- Values are functions that return `E.right()` with an OpenAPI schema object.
103103

104-
### Method 2: Via --codec-file option (for consumers)
104+
### Method 2: Via `--codec-file` Option (For Consumers)
105105

106106
You can define schemas in a configuration file within your project and pass the file
107107
path via the `--codec-file` option:
@@ -132,8 +132,8 @@ path via the `--codec-file` option:
132132

133133
In this structure:
134134

135-
- Keys of the top-level object are package names
136-
- Values are objects that map codec names to their schema definitions
135+
- Keys of the top-level object are package names.
136+
- Values are objects that map codec names to their schema definitions.
137137

138138
3. Run the generator with the `--codec-file` option:
139139

website/docs/reference/openapi-generator/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
sidebar_position: 1
33
---
44

5-
# OpenAPI generator
5+
# OpenAPI Generator
66

77
This section provides technical reference for the `@api-ts/openapi-generator`
88
command-line utility. The documentation covers:
99

10-
- CLI usage and options
11-
- Configuration settings
12-
- Supported `io-ts` primitives
13-
- JSDoc annotation system
10+
- CLI usage and options.
11+
- Configuration settings.
12+
- Supported `io-ts` primitives.
13+
- JSDoc annotation system.
1414

1515
You can use this reference to generate OpenAPI specifications from your
1616
`@api-ts/io-ts-http` API definitions.

website/docs/reference/openapi-generator/jsdoc.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JSDoc annotations
1+
# JSDoc Annotations
22

33
You can use JSDoc comments to enrich the generated OpenAPI specification. This reference
44
describes the supported annotations for both endpoint definitions and schema
@@ -113,7 +113,7 @@ const GetUserRoute = h.httpRoute({
113113
});
114114
```
115115

116-
### Unknown tags
116+
### Unknown Tags
117117

118118
The generator treats any JSDoc tag not listed above as an "unknown tag". It collects
119119
these tags into the `x-unknown-tags` object:
@@ -131,7 +131,7 @@ const GetUserRoute = h.httpRoute({
131131
In this example, `@version 2` becomes `{ "version": "2" }` and `@department Billing`
132132
becomes `{ "department": "Billing" }` in the `x-unknown-tags` object.
133133

134-
## Schema annotations
134+
## Schema Annotations
135135

136136
When you add JSDoc comments to `io-ts` type definitions or fields within `t.type`,
137137
`t.partial`, etc., they add detail to the corresponding OpenAPI schema object or
@@ -192,7 +192,7 @@ keywords:
192192
| `@private` | `x-internal: true` | Marks schema/field as internal |
193193
| `@deprecated` | `deprecated: true` | Marks schema/field as deprecated |
194194

195-
## Example schema with annotations
195+
## Example Schema With Annotations
196196

197197
```typescript
198198
import * as t from 'io-ts';

website/docs/reference/openapi-generator/support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Supported io-ts primitives
1+
# Supported `io-ts` Primitives
22

33
When you use the OpenAPI generator, it automatically derives schemas from the following
44
`io-ts` primitives and combinators:

0 commit comments

Comments
 (0)