Skip to content

Commit 2a81bcf

Browse files
committed
doc: Improve syntax highlighting by using json instead of js
1 parent 34c0acd commit 2a81bcf

File tree

3 files changed

+78
-78
lines changed

3 files changed

+78
-78
lines changed

versions/1.2.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ If the [`type`](#dataTypeType) field is included it MUST NOT have the value `arr
136136
##### 4.3.4.1 Object Examples
137137

138138
For a primitive type:
139-
```js
139+
```json
140140
{
141141
"type": "string"
142142
}
143143
```
144144

145145
For a complex type (model):
146146

147-
```js
147+
```json
148148
{
149149
"$ref": "Pet"
150150
}
@@ -174,7 +174,7 @@ Field Name | Type | Description
174174

175175
#### 5.1.1 Object Example
176176

177-
```js
177+
```json
178178
{
179179
"apiVersion": "1.0.0",
180180
"swaggerVersion": "1.2",
@@ -247,7 +247,7 @@ Field Name | Type | Description
247247

248248
##### 5.1.2.1 Object Example:
249249

250-
```js
250+
```json
251251
{
252252
"path": "/pets",
253253
"description": "Operations about pets."
@@ -268,7 +268,7 @@ Field Name | Type | Description
268268

269269
##### 5.1.3.1 Object Example:
270270

271-
```js
271+
```json
272272
{
273273
"title": "Swagger Sample App",
274274
"description": "This is a sample server Petstore server.",
@@ -300,7 +300,7 @@ Field Name | Type | Description
300300
<a name="authorizationsAuthorizationName"/>{Authorization Name} | [Authorization Object](#515-authorization-object) | A new authorization definition. The name given to the {Authorization Name} is a friendly name that should be used when referring to the authorization scheme. In many cases, the {Authorization Name} used is the same as its type, but it can be anything.
301301

302302
##### 5.1.4.1 Object Example:
303-
```js
303+
```json
304304
{
305305
"oauth2": {
306306
"type": "oauth2",
@@ -397,7 +397,7 @@ Field Name | Type | Description
397397
<a name="scope"/>description | `string` | *Recommended.* A short description of the scope.
398398

399399
##### 5.1.6.1 Object Example:
400-
```js
400+
```json
401401
{
402402
"scope": "email",
403403
"description": "Access to your email address"
@@ -415,7 +415,7 @@ Field Name | Type | Description
415415
<a name="grantTypesAuthorizationCode"/>authorization_code | [Authorization Code Object](#519-authorization-code-object) | The Authorization Code Grant flow definition.
416416

417417
##### 5.1.7.1 Object Example:
418-
```js
418+
```json
419419
{
420420
"implicit": {
421421
"loginEndpoint": {
@@ -446,7 +446,7 @@ Field Name | Type | Description
446446
<a name="implicitTokenName"/>tokenName | `string` | An optional alternative name to standard "access_token" OAuth2 parameter.
447447

448448
##### 5.1.8.1 Object Example:
449-
```js
449+
```json
450450
{
451451
"loginEndpoint": {
452452
"url": "http://petstore.swagger.wordnik.com/oauth/dialog"
@@ -464,7 +464,7 @@ Field Name | Type | Description
464464
<a name="acTokenEndpoint"/>tokenEndpoint | [Token Endpoint Object](#5112-token-endpoint-object) | **Required.** The token endpoint definition.
465465

466466
##### 5.1.9.1 Object Example:
467-
```js
467+
```json
468468
{
469469
"tokenRequestEndpoint": {
470470
"url": "http://petstore.swagger.wordnik.com/oauth/requestToken",
@@ -486,7 +486,7 @@ Field Name | Type | Description
486486
<a name="leUrl"/>url | `string` | **Required.** The URL of the authorization endpoint for the implicit grant flow. The value SHOULD be in a URL format.
487487

488488
##### 5.1.10.1 Object Example:
489-
```js
489+
```json
490490
{
491491
"url": "http://petstore.swagger.wordnik.com/oauth/dialog"
492492
}
@@ -502,7 +502,7 @@ Field Name | Type | Description
502502
<a name="treCliendSecretName"/>clientSecretName | `string` | An optional alternative name to the standard "client_secret" OAuth2 parameter.
503503

504504
##### 5.1.11.1 Object Example:
505-
```js
505+
```json
506506
{
507507
"url": "http://petstore.swagger.wordnik.com/oauth/requestToken",
508508
"clientIdName": "client_id",
@@ -519,7 +519,7 @@ Field Name | Type | Description
519519
<a name="treTokenName"/>tokenName | `string` | An optional alternative name to standard "access_token" OAuth2 parameter.
520520

521521
##### 5.1.12.1 Object Example:
522-
```js
522+
```json
523523
{
524524
"url": "http://petstore.swagger.wordnik.com/oauth/token",
525525
"tokenName": "access_code"
@@ -543,7 +543,7 @@ Field Name | Type | Description
543543
<a name="adAuthorizations"/>authorizations | [Authorizations Object](#5210-authorizations-object) | A list of authorizations schemes *required* for the operations listed in this API declaration. Individual operations may override this setting. If there are multiple authorization schemes described here, it means they're **all** applied.
544544

545545
#### 5.2.1 Object Example
546-
```js
546+
```json
547547
{
548548
"apiVersion": "1.0.0",
549549
"swaggerVersion": "1.2",
@@ -702,7 +702,7 @@ Field Name | Type | Description
702702

703703
##### 5.2.2.1 Object Example:
704704

705-
```js
705+
```json
706706
{
707707
"path": "/pet",
708708
"operations": [
@@ -799,7 +799,7 @@ Field Name | Type | Description
799799

800800
##### 5.2.3.1 Object Example
801801

802-
````js
802+
````json
803803
{
804804
"method": "GET",
805805
"summary": "Find pet by ID",
@@ -869,7 +869,7 @@ Field Name | Type | Description
869869
870870
##### 5.2.4.2 Object Example
871871
872-
```js
872+
```json
873873
{
874874
"name": "body",
875875
"description": "Pet object that needs to be updated in the store",
@@ -891,7 +891,7 @@ Field Name | Type | Description |
891891
892892
##### 5.2.5.1 Object Example
893893
894-
```js
894+
```json
895895
{
896896
"code": 404,
897897
"message": "no project found",
@@ -919,7 +919,7 @@ Field Name | Type | Description
919919

920920
##### 5.2.6.1 Object Example
921921

922-
```js
922+
```json
923923
{
924924
"Category": {
925925
"id": "Category",
@@ -953,7 +953,7 @@ Field Name | Type | Description
953953

954954
##### 5.2.7.1 Object Example
955955

956-
```js
956+
```json
957957
{
958958
"id": "Order",
959959
"properties": {
@@ -1040,7 +1040,7 @@ Field Name | Type | Description
10401040
<a name="propertiesPropertyName"/>{Property Name} | [Property Object](#529-property-object) | A new model property definition. Note the actual name of the field is the name you're giving your property. For example, "id", "name", "age".
10411041
10421042
##### 5.2.8.1 Object Example
1043-
```js
1043+
```json
10441044
{
10451045
"id": {
10461046
"type": "integer",
@@ -1116,7 +1116,7 @@ Field Name | Type | Description
11161116
<a name="adAuthorizationsAuthorizationName"/>{Authorization Name} | * | The authorization scheme to be used. The name given to the {Authorization Name} MUST be a friendly name that was given to an authorization scheme in the Resource Listing's [authorizations](#rlAuthorizations). If the friendly name describes an OAuth2 security scheme, the value should be of type \[[Scope Object](#5211-scope-object)\] (but may be an empty array to denote 'no scopes'). For all other authorization scheme types, the value MUST be an empty array.
11171117

11181118
##### 5.2.10 Object Example:
1119-
```js
1119+
```json
11201120
{
11211121
"oauth2": [
11221122
{
@@ -1140,7 +1140,7 @@ Field Name | Type | Description
11401140
<a name="scope"/>description | `string` | *Recommended.* A short description of the scope.
11411141
11421142
##### 5.2.11.1 Object Example:
1143-
```js
1143+
```json
11441144
{
11451145
"scope": "email",
11461146
"description": "Access to your email address"

0 commit comments

Comments
 (0)