jdoc 0.1.7 → 0.1.8
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/example-api-documentation.md +17 -0
- data/lib/jdoc/link.rb +5 -1
- data/lib/jdoc/version.rb +1 -1
- data/spec/fixtures/schema.yml +7 -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: ca57f4ae2145fcfb22c30c61250c4774ecce8582
|
4
|
+
data.tar.gz: e1c9d7cc2a86c392a8e9b42ed5c9132e683105e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38cddcb58000bb3d6556f0b030913492ed52fe78c9774dc1fdd376f69fae2c6c3e6ff6b7c54d4eaa434c9f6c3823f2977950d509a01d659113d13c47a13c12a5
|
7
|
+
data.tar.gz: 1764003b401d7c1f64d4b2ad82f74a8feb12ee2a8d542130c23a3ffe036aa2b5f8e710a588e870dd693b0272f17850f976debf37e2cb49d79caf968a718eceed
|
data/CHANGELOG.md
CHANGED
@@ -32,6 +32,8 @@ An app is a program to be deployed.
|
|
32
32
|
* When this resource was deleted at
|
33
33
|
* Example: `nil`
|
34
34
|
* Type: null
|
35
|
+
* user_ids
|
36
|
+
* Type: array
|
35
37
|
* users
|
36
38
|
* Type: array
|
37
39
|
|
@@ -57,6 +59,9 @@ Content-Type: application/json
|
|
57
59
|
"name": "example",
|
58
60
|
"private": false,
|
59
61
|
"deleted_at": null,
|
62
|
+
"user_ids": [
|
63
|
+
1
|
64
|
+
],
|
60
65
|
"users": [
|
61
66
|
{
|
62
67
|
"name": "alice"
|
@@ -82,6 +87,9 @@ Content-Type: application/json
|
|
82
87
|
"name": "example",
|
83
88
|
"private": false,
|
84
89
|
"deleted_at": null,
|
90
|
+
"user_ids": [
|
91
|
+
1
|
92
|
+
],
|
85
93
|
"users": [
|
86
94
|
{
|
87
95
|
"name": "alice"
|
@@ -107,6 +115,9 @@ Content-Type: application/json
|
|
107
115
|
"name": "example",
|
108
116
|
"private": false,
|
109
117
|
"deleted_at": null,
|
118
|
+
"user_ids": [
|
119
|
+
1
|
120
|
+
],
|
110
121
|
"users": [
|
111
122
|
{
|
112
123
|
"name": "alice"
|
@@ -133,6 +144,9 @@ Content-Type: application/json
|
|
133
144
|
"name": "example",
|
134
145
|
"private": false,
|
135
146
|
"deleted_at": null,
|
147
|
+
"user_ids": [
|
148
|
+
1
|
149
|
+
],
|
136
150
|
"users": [
|
137
151
|
{
|
138
152
|
"name": "alice"
|
@@ -164,6 +178,9 @@ Content-Type: application/json
|
|
164
178
|
"name": "example",
|
165
179
|
"private": false,
|
166
180
|
"deleted_at": null,
|
181
|
+
"user_ids": [
|
182
|
+
1
|
183
|
+
],
|
167
184
|
"users": [
|
168
185
|
{
|
169
186
|
"name": "alice"
|
data/lib/jdoc/link.rb
CHANGED
@@ -185,7 +185,11 @@ module Jdoc
|
|
185
185
|
when value.type.include?("null")
|
186
186
|
nil
|
187
187
|
when value.type.include?("array")
|
188
|
-
|
188
|
+
if example = value.items.data["example"]
|
189
|
+
[example]
|
190
|
+
else
|
191
|
+
[call(value.items.properties)]
|
192
|
+
end
|
189
193
|
else
|
190
194
|
raise ExampleNotFound, "No example found for #{value.pointer}"
|
191
195
|
end
|
data/lib/jdoc/version.rb
CHANGED
data/spec/fixtures/schema.yml
CHANGED
@@ -35,6 +35,11 @@ definitions:
|
|
35
35
|
example: null
|
36
36
|
type:
|
37
37
|
- "null"
|
38
|
+
user_ids:
|
39
|
+
type: array
|
40
|
+
items:
|
41
|
+
type: integer
|
42
|
+
example: 1
|
38
43
|
links:
|
39
44
|
- description: Create a new app.
|
40
45
|
href: "/apps"
|
@@ -82,6 +87,8 @@ definitions:
|
|
82
87
|
"$ref": "#/definitions/app/definitions/private"
|
83
88
|
deleted_at:
|
84
89
|
"$ref": "#/definitions/app/definitions/deleted_at"
|
90
|
+
user_ids:
|
91
|
+
"$ref": "#/definitions/app/definitions/user_ids"
|
85
92
|
users:
|
86
93
|
type: array
|
87
94
|
items:
|