jdoc 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/jdoc/link.rb +1 -1
- data/lib/jdoc/version.rb +1 -1
- data/spec/fixtures/schema.yml +20 -0
- data/spec/jdoc/generator_spec.rb +33 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cba6d88f3a7501c3c240ed691dee7f1f68a3b73
|
4
|
+
data.tar.gz: 08d484a97ce19deac8f5a50f32dc5103e925144a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b78a21dc60b11f898b74aa700bf0cb0b90feebc8f9cbeeb2bc7604b16c2ff0fd2d08812d235bff86f5aa1869b02430fa16e7b5615d05f92a5389fb235304bc84
|
7
|
+
data.tar.gz: eae3dc35b17b5c6a1cf4836e4cb6eed22ca1f10a63735ace67d9cd055d42c7fd3c6758eeb25885e55bebf23bff94f9022a53c7d75f7044f213eb00d1bd2eb5ae
|
data/CHANGELOG.md
CHANGED
data/lib/jdoc/link.rb
CHANGED
data/lib/jdoc/version.rb
CHANGED
data/spec/fixtures/schema.yml
CHANGED
@@ -86,6 +86,24 @@ definitions:
|
|
86
86
|
type: array
|
87
87
|
items:
|
88
88
|
"$ref": "#/definitions/user"
|
89
|
+
recipe:
|
90
|
+
title: Recipe
|
91
|
+
type: object
|
92
|
+
definitions:
|
93
|
+
name:
|
94
|
+
type: string
|
95
|
+
example: "Sushi"
|
96
|
+
properties:
|
97
|
+
name:
|
98
|
+
"$ref": "#/definitions/recipe/definitions/name"
|
99
|
+
user:
|
100
|
+
"$ref": "#/definitions/user"
|
101
|
+
links:
|
102
|
+
- title: List
|
103
|
+
description: List recipes
|
104
|
+
method: GET
|
105
|
+
href: "/recipes"
|
106
|
+
rel: instances
|
89
107
|
user:
|
90
108
|
title: User
|
91
109
|
type: object
|
@@ -99,6 +117,8 @@ definitions:
|
|
99
117
|
properties:
|
100
118
|
app:
|
101
119
|
"$ref": "#/definitions/app"
|
120
|
+
recipe:
|
121
|
+
"$ref": "#/definitions/recipe"
|
102
122
|
user:
|
103
123
|
"$ref": "#/definitions/user"
|
104
124
|
type:
|
data/spec/jdoc/generator_spec.rb
CHANGED
@@ -25,6 +25,8 @@ describe Jdoc::Generator do
|
|
25
25
|
* [GET /apps/:id](#get-appsid)
|
26
26
|
* [GET /apps](#get-apps)
|
27
27
|
* [PATCH /apps/:id](#patch-appsid)
|
28
|
+
* [Recipe](#recipe)
|
29
|
+
* [GET /recipes](#get-recipes)
|
28
30
|
* [User](#user)
|
29
31
|
|
30
32
|
## App
|
@@ -187,6 +189,37 @@ describe Jdoc::Generator do
|
|
187
189
|
}
|
188
190
|
```
|
189
191
|
|
192
|
+
## Recipe
|
193
|
+
|
194
|
+
|
195
|
+
### Properties
|
196
|
+
* name -
|
197
|
+
* Example: `"Sushi"`
|
198
|
+
* Type: string
|
199
|
+
* user -
|
200
|
+
* Type: object
|
201
|
+
|
202
|
+
### GET /recipes
|
203
|
+
List recipes
|
204
|
+
|
205
|
+
```
|
206
|
+
GET /recipes HTTP/1.1
|
207
|
+
Content-Type: application/json
|
208
|
+
Host: api.example.com
|
209
|
+
```
|
210
|
+
|
211
|
+
```
|
212
|
+
HTTP/1.1 200
|
213
|
+
Content-Type: application/json
|
214
|
+
|
215
|
+
{
|
216
|
+
"name": "Sushi",
|
217
|
+
"user": {
|
218
|
+
"name": "alice"
|
219
|
+
}
|
220
|
+
}
|
221
|
+
```
|
222
|
+
|
190
223
|
## User
|
191
224
|
|
192
225
|
|