Skip to content

Commit 584dd02

Browse files
vismaya-kalyanvismaya
andauthored
fix wrong markdowntype javascript for json (#1389)
Co-authored-by: vismaya <[email protected]>
1 parent 619337e commit 584dd02

File tree

4 files changed

+42
-43
lines changed

4 files changed

+42
-43
lines changed

doc/tutorial/Docs.lhs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ That lets us see what our API docs look like in markdown, by looking at `markdow
132132
133133
- When a value is provided for 'name' (`application/json;charset=utf-8`, `application/json`):
134134
135-
```javascript
135+
```json
136136
{"msg":"Hello, Alp"}
137137
```
138138
139139
- When 'name' is not specified (`application/json;charset=utf-8`, `application/json`):
140140
141-
```javascript
141+
```json
142142
{"msg":"Hello, anonymous coward"}
143143
```
144144
@@ -153,7 +153,7 @@ That lets us see what our API docs look like in markdown, by looking at `markdow
153153
154154
- Example (`application/json;charset=utf-8`, `application/json`):
155155
156-
```javascript
156+
```json
157157
{"clientAge":26,"clientEmail":"[email protected]","clientName":"Alp","clientInterestedIn":["haskell","mathematics"]}
158158
```
159159
@@ -169,7 +169,7 @@ That lets us see what our API docs look like in markdown, by looking at `markdow
169169
170170
- Example (`application/json;charset=utf-8`, `application/json`):
171171
172-
```javascript
172+
```json
173173
{"subject":"Hey Alp, we miss you!","body":"Hi Alp,\n\nSince you've recently turned 26, have you checked out our latest haskell, mathematics products? Give us a visit!","to":"[email protected]","from":"[email protected]"}
174174
```
175175
@@ -192,7 +192,7 @@ That lets us see what our API docs look like in markdown, by looking at `markdow
192192
193193
- Example (`application/json;charset=utf-8`, `application/json`):
194194
195-
```javascript
195+
```json
196196
{"yCoord":14,"xCoord":3}
197197
````
198198
@@ -242,7 +242,7 @@ The relevant output of `markdown api2Docs` is now:
242242
243243
- Example (`application/json;charset=utf-8`, `application/json`):
244244
245-
```javascript
245+
```json
246246
{"clientAge":26,"clientEmail":"[email protected]","clientName":"Alp","clientInterestedIn":["haskell","mathematics"]}
247247
```
248248

servant-docs/example/greet.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ You'll also note that multiple intros are possible.
1919

2020
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
2121

22-
```javascript
22+
```json
2323
"HELLO, HASKELLER"
2424
```
2525

2626
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
2727

28-
```javascript
28+
```json
2929
"Hello, haskeller"
3030
```
3131

@@ -41,13 +41,13 @@ You'll also note that multiple intros are possible.
4141

4242
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`):
4343

44-
```javascript
44+
```json
4545
"HELLO, HASKELLER"
4646
```
4747

4848
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
4949

50-
```javascript
50+
```json
5151
"Hello, haskeller"
5252
```
5353

@@ -90,7 +90,7 @@ And some more
9090

9191
- Example (`application/json;charset=utf-8`, `application/json`):
9292

93-
```javascript
93+
```json
9494

9595
```
9696

@@ -132,13 +132,13 @@ curl -XDELETE \
132132

133133
- If you use ?capital=true (`application/json;charset=utf-8`, `application/json`, `text/plain;charset=utf-8`):
134134

135-
```javascript
135+
```json
136136
"HELLO, HASKELLER"
137137
```
138138

139139
- If you use ?capital=false (`application/json;charset=utf-8`, `application/json`):
140140

141-
```javascript
141+
```json
142142
"Hello, haskeller"
143143
```
144144

servant-docs/golden/comprehensive.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
- Example (`application/json;charset=utf-8`, `application/json`):
1414

15-
```javascript
15+
```json
1616

1717
```
1818

@@ -30,7 +30,7 @@
3030

3131
- Example (`application/json;charset=utf-8`, `application/json`):
3232

33-
```javascript
33+
```json
3434

3535
```
3636

@@ -48,7 +48,7 @@
4848

4949
- Example (`application/json;charset=utf-8`, `application/json`):
5050

51-
```javascript
51+
```json
5252

5353
```
5454

@@ -70,7 +70,7 @@
7070

7171
- Example (`application/json;charset=utf-8`, `application/json`):
7272

73-
```javascript
73+
```json
7474

7575
```
7676

@@ -92,7 +92,7 @@
9292

9393
- Example (`application/json;charset=utf-8`, `application/json`):
9494

95-
```javascript
95+
```json
9696

9797
```
9898

@@ -114,7 +114,7 @@
114114

115115
- Example (`application/json;charset=utf-8`, `application/json`):
116116

117-
```javascript
117+
```json
118118

119119
```
120120

@@ -135,7 +135,7 @@
135135

136136
- Example (`application/json;charset=utf-8`, `application/json`):
137137

138-
```javascript
138+
```json
139139

140140
```
141141

@@ -160,7 +160,7 @@
160160

161161
- Example (`application/json;charset=utf-8`, `application/json`):
162162

163-
```javascript
163+
```json
164164

165165
```
166166

@@ -178,7 +178,7 @@
178178

179179
- Example (`application/json;charset=utf-8`, `application/json`):
180180

181-
```javascript
181+
```json
182182

183183
```
184184

@@ -200,7 +200,7 @@
200200

201201
- Example (`application/json;charset=utf-8`, `application/json`):
202202

203-
```javascript
203+
```json
204204

205205
```
206206

@@ -218,7 +218,7 @@
218218

219219
- Example (`application/json;charset=utf-8`, `application/json`):
220220

221-
```javascript
221+
```json
222222
17
223223
```
224224

@@ -240,7 +240,7 @@
240240

241241
- Example (`application/json;charset=utf-8`, `application/json`):
242242

243-
```javascript
243+
```json
244244

245245
```
246246

@@ -262,7 +262,7 @@
262262

263263
- Example (`application/json;charset=utf-8`, `application/json`):
264264

265-
```javascript
265+
```json
266266

267267
```
268268

@@ -280,7 +280,7 @@
280280

281281
- Example (`application/json;charset=utf-8`, `application/json`):
282282

283-
```javascript
283+
```json
284284

285285
```
286286

@@ -298,7 +298,7 @@
298298

299299
- Example (`application/json;charset=utf-8`, `application/json`):
300300

301-
```javascript
301+
```json
302302

303303
```
304304

@@ -316,7 +316,7 @@
316316

317317
- Example (`application/json;charset=utf-8`, `application/json`):
318318

319-
```javascript
319+
```json
320320

321321
```
322322

@@ -341,7 +341,7 @@
341341

342342
- Example (`application/json;charset=utf-8`, `application/json`):
343343

344-
```javascript
344+
```json
345345

346346
```
347347

@@ -366,7 +366,7 @@
366366

367367
- Example (`application/json;charset=utf-8`, `application/json`):
368368

369-
```javascript
369+
```json
370370

371371
```
372372

@@ -392,7 +392,7 @@
392392

393393
- Example (`application/json;charset=utf-8`, `application/json`):
394394

395-
```javascript
395+
```json
396396

397397
```
398398

@@ -410,7 +410,7 @@
410410

411411
- Example (`application/json;charset=utf-8`, `application/json`):
412412

413-
```javascript
413+
```json
414414
17
415415
```
416416

@@ -446,7 +446,7 @@
446446

447447
- Example (`application/json;charset=utf-8`, `application/json`):
448448

449-
```javascript
449+
```json
450450

451451
```
452452

@@ -461,7 +461,7 @@
461461

462462
- Example (`application/json;charset=utf-8`, `application/json`):
463463

464-
```javascript
464+
```json
465465
17
466466
```
467467

@@ -477,7 +477,7 @@
477477

478478
- Example (`application/json;charset=utf-8`, `application/json`):
479479

480-
```javascript
480+
```json
481481

482482
```
483483

@@ -492,7 +492,7 @@
492492

493493
- Example (`application/json;charset=utf-8`, `application/json`):
494494

495-
```javascript
495+
```json
496496
17
497497
```
498498

@@ -508,7 +508,7 @@
508508

509509
- Example (`application/json;charset=utf-8`, `application/json`):
510510

511-
```javascript
511+
```json
512512

513513
```
514514

@@ -526,7 +526,7 @@
526526

527527
- Example (`application/json;charset=utf-8`, `application/json`):
528528

529-
```javascript
529+
```json
530530

531531
```
532532

@@ -586,7 +586,7 @@
586586

587587
- Example (`application/json;charset=utf-8`, `application/json`):
588588

589-
```javascript
589+
```json
590590

591591
```
592592

@@ -604,7 +604,6 @@
604604

605605
- Example (`application/json;charset=utf-8`, `application/json`):
606606

607-
```javascript
607+
```json
608608

609609
```
610-

servant-docs/src/Servant/Docs/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ markdownWith RenderingOptions{..} api = unlines $
814814
("text", "html") -> "html"
815815
("application", "xml") -> "xml"
816816
("text", "xml") -> "xml"
817-
("application", "json") -> "javascript"
817+
("application", "json") -> "json"
818818
("application", "javascript") -> "javascript"
819819
("text", "css") -> "css"
820820
(_, _) -> ""

0 commit comments

Comments
 (0)