jsapi 0.9.1 → 0.9.2
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/lib/jsapi/dsl/definitions.rb +1 -1
- data/lib/jsapi/dsl/operation.rb +20 -0
- data/lib/jsapi/dsl/schema.rb +12 -2
- data/lib/jsapi/meta/callback/reference.rb +1 -0
- data/lib/jsapi/meta/definitions.rb +6 -2
- data/lib/jsapi/meta/example/reference.rb +1 -0
- data/lib/jsapi/meta/header/reference.rb +1 -0
- data/lib/jsapi/meta/link/reference.rb +1 -0
- data/lib/jsapi/meta/operation.rb +1 -1
- data/lib/jsapi/meta/parameter/model.rb +2 -2
- data/lib/jsapi/meta/parameter/reference.rb +5 -3
- data/lib/jsapi/meta/parameter/to_openapi.rb +1 -0
- data/lib/jsapi/meta/property.rb +1 -0
- data/lib/jsapi/meta/request_body/model.rb +1 -1
- data/lib/jsapi/meta/request_body/reference.rb +1 -0
- data/lib/jsapi/meta/response/model.rb +1 -1
- data/lib/jsapi/meta/response/reference.rb +1 -0
- data/lib/jsapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59c9ddcd1965cd62ee1b1bbb0e7f066061eaef6a5f8217c69b6d86ee92230b4a
|
4
|
+
data.tar.gz: f02a5ff2b0d13ca4c238356b8d11473432ec71b12b40218639335f9f2f45f1da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f8f331323ab4d88ba89133f37b0eee8fc6bdb1ab5159f3ce5885b7139d4376e74f6df42ed8232c6ea5c4cb7b373d8ea5a8c866c6833d23f5f1412f6a004ea14
|
7
|
+
data.tar.gz: f7061a754b6bbde17046b4cc4cb29eca42daede67f3978f474574c9389d555815e5e11f8f2af021f93985458511790699a64d8cd5fc95b03f421792dcd0dd4a5
|
data/lib/jsapi/dsl/operation.rb
CHANGED
@@ -38,6 +38,15 @@ module Jsapi
|
|
38
38
|
#
|
39
39
|
# deprecated true
|
40
40
|
|
41
|
+
##
|
42
|
+
# :method: external_docs
|
43
|
+
# :args: **keywords, &block
|
44
|
+
# Specifies the external documentation.
|
45
|
+
#
|
46
|
+
# external_docs url: 'https://foo.bar/docs'
|
47
|
+
#
|
48
|
+
# See Meta::Operation#external_docs for further information.
|
49
|
+
|
41
50
|
##
|
42
51
|
# :method: description
|
43
52
|
# :args: arg
|
@@ -162,6 +171,17 @@ module Jsapi
|
|
162
171
|
end
|
163
172
|
end
|
164
173
|
|
174
|
+
##
|
175
|
+
# :method: security_requirement
|
176
|
+
# :args: **keywords, &block
|
177
|
+
# Specifies a security requirement.
|
178
|
+
#
|
179
|
+
# security_requirement do
|
180
|
+
# scheme 'basic_auth'
|
181
|
+
# end
|
182
|
+
#
|
183
|
+
# See Meta::Operation#security_requirements for further information.
|
184
|
+
|
165
185
|
##
|
166
186
|
# :method: summary
|
167
187
|
# :args: arg
|
data/lib/jsapi/dsl/schema.rb
CHANGED
@@ -5,6 +5,15 @@ module Jsapi
|
|
5
5
|
# Used to define a schema.
|
6
6
|
class Schema < Base
|
7
7
|
|
8
|
+
##
|
9
|
+
# :method: additional_properties
|
10
|
+
# :args: **keywords, &block
|
11
|
+
# Specifies the schema of properties that are not explicity specified.
|
12
|
+
#
|
13
|
+
# additional_properties type: 'string'
|
14
|
+
#
|
15
|
+
# See Meta::Schema::Object#additional_properties for further information.
|
16
|
+
|
8
17
|
# Includes all of the properties from +schemas+. Each argument must be the name of
|
9
18
|
# a schema defined by ClassMethods#api_schema or Definitions#schema.
|
10
19
|
def all_of(*schemas)
|
@@ -47,8 +56,9 @@ module Jsapi
|
|
47
56
|
#
|
48
57
|
# enum %w[foo bar]
|
49
58
|
|
50
|
-
##
|
51
|
-
|
59
|
+
##
|
60
|
+
# :method: external_docs
|
61
|
+
# :args: **keywords, &block
|
52
62
|
# Specifies the external documentation.
|
53
63
|
#
|
54
64
|
# See Meta::Schema::Base#external_docs for further information.
|
@@ -382,10 +382,14 @@ module Jsapi
|
|
382
382
|
@objects ||= ancestors.each_with_object({}) do |ancestor, objects|
|
383
383
|
self.class.attribute_names.each do |key|
|
384
384
|
case value = ancestor.send(key)
|
385
|
-
when Hash
|
386
|
-
(objects[key] ||= {}).reverse_merge!(value)
|
387
385
|
when Array
|
388
386
|
(objects[key] ||= []).push(*value)
|
387
|
+
when Hash
|
388
|
+
if (hash = objects[key])
|
389
|
+
value.each { |k, v| hash[k] = v unless hash.key?(k) }
|
390
|
+
else
|
391
|
+
objects[key] = value.dup
|
392
|
+
end
|
389
393
|
else
|
390
394
|
objects[key] ||= value
|
391
395
|
end
|
data/lib/jsapi/meta/operation.rb
CHANGED
@@ -3,12 +3,14 @@
|
|
3
3
|
module Jsapi
|
4
4
|
module Meta
|
5
5
|
module Parameter
|
6
|
+
# Specifies a parameter reference.
|
6
7
|
class Reference < Base::Reference
|
7
8
|
include ToOpenAPI
|
8
9
|
|
9
|
-
# Returns an array of hashes.
|
10
|
-
#
|
11
|
-
# array contains a single hash representing the \OpenAPI
|
10
|
+
# Returns an array of hashes. If the type of the referred parameter is
|
11
|
+
# <code>"object"</code>, each hash represents an \OpenAPI parameter object.
|
12
|
+
# Otherwise the array contains a single hash representing the \OpenAPI
|
13
|
+
# reference object.
|
12
14
|
#
|
13
15
|
# Raises a ReferenceError when the reference could not be resolved.
|
14
16
|
def to_openapi_parameters(version, definitions)
|
data/lib/jsapi/meta/property.rb
CHANGED
data/lib/jsapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Göller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: denis@dmgoeller.de
|