verquest 0.7.0 → 0.8.0
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 +34 -0
- data/README.md +48 -14
- data/lib/verquest/base/private_class_methods.rb +54 -7
- data/lib/verquest/base/public_class_methods.rb +4 -1
- data/lib/verquest/conditions/branch.rb +1 -2
- data/lib/verquest/conditions/condition.rb +10 -15
- data/lib/verquest/conditions/rule_set.rb +16 -0
- data/lib/verquest/conditions/rules/absent.rb +16 -0
- data/lib/verquest/conditions/rules/any.rb +16 -0
- data/lib/verquest/conditions/rules/names_rule.rb +3 -0
- data/lib/verquest/conditions/rules/none.rb +16 -0
- data/lib/verquest/conditions/rules/present.rb +16 -0
- data/lib/verquest/conditions/rules/property_rule.rb +18 -0
- data/lib/verquest/conditions/variant_shape.rb +39 -0
- data/lib/verquest/configuration.rb +14 -5
- data/lib/verquest/gem_version.rb +1 -1
- data/lib/verquest/helper_methods/required_properties.rb +9 -0
- data/lib/verquest/openapi30.rb +128 -0
- data/lib/verquest/properties/collection.rb +14 -3
- data/lib/verquest/properties/enum.rb +143 -10
- data/lib/verquest/properties/object.rb +2 -2
- data/lib/verquest/properties/one_of.rb +4 -1
- data/lib/verquest/properties/reference.rb +13 -0
- data/lib/verquest/query/coercer.rb +11 -1
- data/lib/verquest/query/parameters.rb +1 -1
- data/lib/verquest/supported_versions.rb +73 -0
- data/lib/verquest/version.rb +27 -9
- data/lib/verquest/versions.rb +7 -0
- data/lib/verquest.rb +2 -1
- metadata +4 -1
data/lib/verquest/versions.rb
CHANGED
|
@@ -56,6 +56,13 @@ module Verquest
|
|
|
56
56
|
versions[resolved_version_name] || raise(Verquest::VersionNotFoundError, "Version '#{version_name}' not found")
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# Returns the declared version names in string order
|
|
60
|
+
#
|
|
61
|
+
# @return [Array<String>] The version names, sorted as strings
|
|
62
|
+
def names
|
|
63
|
+
versions.keys.sort
|
|
64
|
+
end
|
|
65
|
+
|
|
59
66
|
private
|
|
60
67
|
|
|
61
68
|
# @!attribute [r] versions
|
data/lib/verquest.rb
CHANGED
|
@@ -68,7 +68,8 @@ module Verquest
|
|
|
68
68
|
# @api public
|
|
69
69
|
MappingError = Class.new(Verquest::Error)
|
|
70
70
|
|
|
71
|
-
# Error raised when a request definition
|
|
71
|
+
# Error raised when a request definition is invalid, such as a shape its location can't
|
|
72
|
+
# express or a supported_versions max before the first declared version
|
|
72
73
|
# @api public
|
|
73
74
|
DefinitionError = Class.new(Verquest::Error)
|
|
74
75
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: verquest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Petr Hlavicka
|
|
@@ -79,11 +79,13 @@ files:
|
|
|
79
79
|
- lib/verquest/conditions/rules/property_rule.rb
|
|
80
80
|
- lib/verquest/conditions/rules/satisfies.rb
|
|
81
81
|
- lib/verquest/conditions/rules/value_in.rb
|
|
82
|
+
- lib/verquest/conditions/variant_shape.rb
|
|
82
83
|
- lib/verquest/configuration.rb
|
|
83
84
|
- lib/verquest/gem_version.rb
|
|
84
85
|
- lib/verquest/helper_methods/conditional_properties.rb
|
|
85
86
|
- lib/verquest/helper_methods/required_properties.rb
|
|
86
87
|
- lib/verquest/helper_methods/unnamed_one_of.rb
|
|
88
|
+
- lib/verquest/openapi30.rb
|
|
87
89
|
- lib/verquest/properties.rb
|
|
88
90
|
- lib/verquest/properties/array.rb
|
|
89
91
|
- lib/verquest/properties/base.rb
|
|
@@ -100,6 +102,7 @@ files:
|
|
|
100
102
|
- lib/verquest/query/definition_check.rb
|
|
101
103
|
- lib/verquest/query/parameters.rb
|
|
102
104
|
- lib/verquest/result.rb
|
|
105
|
+
- lib/verquest/supported_versions.rb
|
|
103
106
|
- lib/verquest/transformer.rb
|
|
104
107
|
- lib/verquest/transformer/collection.rb
|
|
105
108
|
- lib/verquest/transformer/const_as_enum.rb
|