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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6327b02b6a01126e085de598704c28f6187903ba
4
- data.tar.gz: 909c4b63a36d9631d70b2ec7bb98b387f5d11870
3
+ metadata.gz: ca57f4ae2145fcfb22c30c61250c4774ecce8582
4
+ data.tar.gz: e1c9d7cc2a86c392a8e9b42ed5c9132e683105e4
5
5
  SHA512:
6
- metadata.gz: 3d8b8189400dbc6bea3986cc7f507ce588ca8eeb3cb6d34272275905332c10688f9f6f2a7e5a5e084fdfddfa333b1be1128378eebc5fdbaaa211dc67b247a775
7
- data.tar.gz: 8fdf1d2c6790eccb6f500b8de15483640510a024904b6a8b7c4248ed7b0b3fa6619a4eb3aebbc711f219c237f082a16cef2668a63c99e485de57f873f41043d1
6
+ metadata.gz: 38cddcb58000bb3d6556f0b030913492ed52fe78c9774dc1fdd376f69fae2c6c3e6ff6b7c54d4eaa434c9f6c3823f2977950d509a01d659113d13c47a13c12a5
7
+ data.tar.gz: 1764003b401d7c1f64d4b2ad82f74a8feb12ee2a8d542130c23a3ffe036aa2b5f8e710a588e870dd693b0272f17850f976debf37e2cb49d79caf968a718eceed
@@ -1,3 +1,6 @@
1
+ ## 0.1.8
2
+ * Support property that is an array of primitive values
3
+
1
4
  ## 0.1.7
2
5
  * Support query string example in GET request
3
6
  * Improve the description property visibility
@@ -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"
@@ -185,7 +185,11 @@ module Jdoc
185
185
  when value.type.include?("null")
186
186
  nil
187
187
  when value.type.include?("array")
188
- [call(value.items.properties)]
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
@@ -1,3 +1,3 @@
1
1
  module Jdoc
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -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:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura