Skip to content

Commit 2420380

Browse files
Merge pull request #12 from RafaelGSS/patch-1
docs: add file extension to examples
2 parents 3fcf3dc + debe8ad commit 2420380

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## How to install?
44

5-
```
5+
```sh
66
npm i -D fastify-schema-to-typescript
77
```
88

@@ -11,7 +11,7 @@ npm i -D fastify-schema-to-typescript
1111
Running `npx fastify-schema-to-typescript` will convert all `schema.json` files in `src` to `schema.ts`.
1212
You can then import `schema.ts` directly
1313

14-
```
14+
```ts
1515
import { Handler, schema } from "./schema";
1616

1717
export const options = {
@@ -27,7 +27,7 @@ export const handler: Handler = async (request, reply) => {}
2727

2828
More options are available
2929

30-
```
30+
```sh
3131
npx fastify-schema-to-typescript -h
3232

3333
Usage: fastify-schema-to-typescript [options]
@@ -62,7 +62,7 @@ Running `npx fastify-schema-to-typescript` will convert `schema.yaml` to `schema
6262
6363
app.ts
6464
65-
```
65+
```ts
6666
import fastify from 'fastify';
6767
import { healthcheck } from './api'
6868
@@ -78,13 +78,13 @@ run();
7878

7979
api/index.ts
8080

81-
```
81+
```ts
8282
export * from './healthcheck';
8383
```
8484

8585
api/healtheck/schema.yaml
8686

87-
```
87+
```yml
8888
headers:
8989
type: object
9090
properties:
@@ -108,7 +108,7 @@ params:
108108
109109
api/healtheck/index.ts
110110
111-
```
111+
```ts
112112
import { FastifyPluginAsync } from 'fastify';
113113
import { RouteGeneric, schema } from './schema';
114114

0 commit comments

Comments
 (0)