Class: Skooma::Objects::OpenAPI
- Inherits:
-
Base
- Object
- JSONSkooma::JSONSchema
- Base
- Skooma::Objects::OpenAPI
show all
- Defined in:
- lib/skooma/objects/openapi.rb,
lib/skooma/objects/openapi/keywords/info.rb,
lib/skooma/objects/openapi/keywords/paths.rb,
lib/skooma/objects/openapi/keywords/openapi.rb,
lib/skooma/objects/openapi/keywords/security.rb,
lib/skooma/objects/openapi/keywords/webhooks.rb,
lib/skooma/objects/openapi/keywords/components.rb,
lib/skooma/objects/openapi/keywords/json_schema_dialect.rb
Overview
Defined Under Namespace
Modules: Keywords
Constant Summary
Constants inherited
from Base
Base::DEFAULT_OPTIONS
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize
#resolve_ref
Instance Attribute Details
#json_schema_dialect_uri ⇒ Object
66
67
68
|
# File 'lib/skooma/objects/openapi.rb', line 66
def json_schema_dialect_uri
@json_schema_dialect_uri || parent_schema&.json_schema_dialect_uri
end
|
Instance Method Details
#bootstrap(value) ⇒ Object
24
25
26
27
28
|
# File 'lib/skooma/objects/openapi.rb', line 24
def bootstrap(value)
add_keyword(Keywords::OpenAPI.new(self, value["openapi"]))
end
|
#enforce_access_modes=(value) ⇒ Object
42
43
44
45
46
|
# File 'lib/skooma/objects/openapi.rb', line 42
def enforce_access_modes=(value)
raise ArgumentError, "Enforce access modes must be a boolean" unless [true, false].include?(value)
@enforce_access_modes = value
end
|
#enforce_access_modes? ⇒ Boolean
48
49
50
|
# File 'lib/skooma/objects/openapi.rb', line 48
def enforce_access_modes?
@enforce_access_modes
end
|
#evaluate(instance, result = nil) ⇒ Object
30
31
32
|
# File 'lib/skooma/objects/openapi.rb', line 30
def evaluate(instance, result = nil)
super(Instance.new(instance), result)
end
|
#path_prefix ⇒ Object
62
63
64
|
# File 'lib/skooma/objects/openapi.rb', line 62
def path_prefix
@path_prefix || ""
end
|
#path_prefix=(value) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/skooma/objects/openapi.rb', line 34
def path_prefix=(value)
raise ArgumentError, "Path prefix must be a string" unless value.is_a?(String)
@path_prefix = value
@path_prefix = "/#{@path_prefix}" unless @path_prefix.start_with?("/")
@path_prefix = @path_prefix.delete_suffix("/") if @path_prefix.end_with?("/")
end
|
#use_patterns_for_path_matching=(value) ⇒ Object
52
53
54
55
56
|
# File 'lib/skooma/objects/openapi.rb', line 52
def use_patterns_for_path_matching=(value)
raise ArgumentError, "Use patterns for path matching must be a boolean" unless [true, false].include?(value)
@use_patterns_for_path_matching = value
end
|
#use_patterns_for_path_matching? ⇒ Boolean
58
59
60
|
# File 'lib/skooma/objects/openapi.rb', line 58
def use_patterns_for_path_matching?
@use_patterns_for_path_matching
end
|