roast-ai 0.4.4 → 0.4.6
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/.github/CODEOWNERS +2 -0
- data/.github/workflows/ci.yaml +1 -0
- data/.gitignore +0 -26
- data/.rubocop.yml +13 -0
- data/.rubocop_todo.yml +21 -0
- data/CHANGELOG.md +37 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +43 -1
- data/bin/rubocop +27 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/docs/INSTRUMENTATION.md +3 -3
- data/dsl/simple.rb +10 -0
- data/examples/retry/workflow.yml +23 -0
- data/lib/roast/dsl/executor.rb +26 -0
- data/lib/roast/dsl.rb +7 -0
- data/lib/roast/errors.rb +1 -0
- data/lib/roast/factories/api_provider_factory.rb +1 -0
- data/lib/roast/helpers/function_caching_interceptor.rb +3 -0
- data/lib/roast/helpers/logger.rb +6 -9
- data/lib/roast/helpers/metadata_access.rb +1 -0
- data/lib/roast/helpers/minitest_coverage_runner.rb +1 -0
- data/lib/roast/helpers/path_resolver.rb +8 -18
- data/lib/roast/helpers/prompt_loader.rb +3 -2
- data/lib/roast/helpers/timeout_handler.rb +3 -5
- data/lib/roast/initializers.rb +1 -0
- data/lib/roast/resources/api_resource.rb +4 -3
- data/lib/roast/resources/base_resource.rb +1 -0
- data/lib/roast/resources/directory_resource.rb +1 -0
- data/lib/roast/resources/file_resource.rb +1 -0
- data/lib/roast/resources/none_resource.rb +1 -0
- data/lib/roast/resources/url_resource.rb +2 -1
- data/lib/roast/resources.rb +1 -2
- data/lib/roast/services/context_threshold_checker.rb +1 -0
- data/lib/roast/services/token_counting_service.rb +1 -0
- data/lib/roast/tools/apply_diff.rb +1 -0
- data/lib/roast/tools/ask_user.rb +1 -0
- data/lib/roast/tools/bash.rb +1 -0
- data/lib/roast/tools/cmd.rb +1 -0
- data/lib/roast/tools/coding_agent.rb +1 -0
- data/lib/roast/tools/context_summarizer.rb +1 -0
- data/lib/roast/tools/grep.rb +1 -0
- data/lib/roast/tools/helpers/coding_agent_message_formatter.rb +1 -0
- data/lib/roast/tools/read_file.rb +1 -0
- data/lib/roast/tools/search_file.rb +1 -0
- data/lib/roast/tools/swarm.rb +1 -0
- data/lib/roast/tools/update_files.rb +1 -0
- data/lib/roast/tools/write_file.rb +1 -0
- data/lib/roast/tools.rb +2 -0
- data/lib/roast/value_objects/api_token.rb +1 -0
- data/lib/roast/value_objects/step_name.rb +1 -0
- data/lib/roast/value_objects/uri_base.rb +1 -0
- data/lib/roast/value_objects/workflow_path.rb +1 -0
- data/lib/roast/value_objects.rb +1 -0
- data/lib/roast/version.rb +2 -1
- data/lib/roast/workflow/agent_step.rb +1 -0
- data/lib/roast/workflow/api_configuration.rb +1 -0
- data/lib/roast/workflow/base_iteration_step.rb +1 -0
- data/lib/roast/workflow/base_step.rb +1 -0
- data/lib/roast/workflow/base_workflow.rb +1 -0
- data/lib/roast/workflow/case_executor.rb +1 -0
- data/lib/roast/workflow/case_step.rb +1 -0
- data/lib/roast/workflow/command_executor.rb +1 -0
- data/lib/roast/workflow/conditional_executor.rb +1 -0
- data/lib/roast/workflow/conditional_step.rb +1 -0
- data/lib/roast/workflow/configuration.rb +9 -0
- data/lib/roast/workflow/configuration_loader.rb +4 -1
- data/lib/roast/workflow/context_manager.rb +1 -0
- data/lib/roast/workflow/context_path_resolver.rb +1 -0
- data/lib/roast/workflow/dot_access_hash.rb +1 -0
- data/lib/roast/workflow/each_step.rb +1 -0
- data/lib/roast/workflow/error_handler.rb +39 -3
- data/lib/roast/workflow/expression_evaluator.rb +1 -0
- data/lib/roast/workflow/expression_utils.rb +1 -0
- data/lib/roast/workflow/file_state_repository.rb +2 -1
- data/lib/roast/workflow/input_executor.rb +1 -0
- data/lib/roast/workflow/input_step.rb +1 -0
- data/lib/roast/workflow/interpolator.rb +2 -1
- data/lib/roast/workflow/iteration_executor.rb +1 -0
- data/lib/roast/workflow/llm_boolean_coercer.rb +1 -0
- data/lib/roast/workflow/metadata_manager.rb +1 -0
- data/lib/roast/workflow/output_handler.rb +1 -0
- data/lib/roast/workflow/output_manager.rb +1 -0
- data/lib/roast/workflow/parallel_executor.rb +1 -0
- data/lib/roast/workflow/prompt_step.rb +1 -0
- data/lib/roast/workflow/repeat_step.rb +1 -0
- data/lib/roast/workflow/replay_handler.rb +1 -0
- data/lib/roast/workflow/resource_resolver.rb +2 -6
- data/lib/roast/workflow/session_manager.rb +1 -0
- data/lib/roast/workflow/shell_script_step.rb +1 -0
- data/lib/roast/workflow/sqlite_state_repository.rb +1 -0
- data/lib/roast/workflow/state_manager.rb +1 -0
- data/lib/roast/workflow/state_repository.rb +1 -0
- data/lib/roast/workflow/state_repository_factory.rb +4 -2
- data/lib/roast/workflow/step_completion_reporter.rb +1 -0
- data/lib/roast/workflow/step_executor_coordinator.rb +17 -6
- data/lib/roast/workflow/step_executor_factory.rb +1 -0
- data/lib/roast/workflow/step_executor_registry.rb +2 -3
- data/lib/roast/workflow/step_executor_with_reporting.rb +1 -0
- data/lib/roast/workflow/step_executors/base_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/hash_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/parallel_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/string_step_executor.rb +1 -0
- data/lib/roast/workflow/step_factory.rb +1 -0
- data/lib/roast/workflow/step_finder.rb +1 -0
- data/lib/roast/workflow/step_loader.rb +1 -0
- data/lib/roast/workflow/step_name_extractor.rb +1 -0
- data/lib/roast/workflow/step_runner.rb +1 -0
- data/lib/roast/workflow/step_type_resolver.rb +1 -0
- data/lib/roast/workflow/validation_command.rb +1 -0
- data/lib/roast/workflow/validator.rb +1 -0
- data/lib/roast/workflow/validators/base_validator.rb +1 -0
- data/lib/roast/workflow/validators/dependency_validator.rb +1 -0
- data/lib/roast/workflow/validators/linting_validator.rb +1 -0
- data/lib/roast/workflow/validators/schema_validator.rb +1 -0
- data/lib/roast/workflow/validators/step_collector.rb +1 -0
- data/lib/roast/workflow/validators/validation_orchestrator.rb +1 -0
- data/lib/roast/workflow/workflow_context.rb +1 -0
- data/lib/roast/workflow/workflow_execution_context.rb +1 -0
- data/lib/roast/workflow/workflow_executor.rb +2 -1
- data/lib/roast/workflow/workflow_initializer.rb +16 -1
- data/lib/roast/workflow/workflow_runner.rb +66 -55
- data/lib/roast/workflow.rb +1 -0
- data/lib/roast/workflow_diagram_generator.rb +3 -2
- data/lib/roast.rb +23 -8
- data/sorbet/config +8 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activesupport@8.0.2.rbi +19107 -0
- data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
- data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
- data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
- data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
- data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +62 -0
- data/sorbet/rbi/gems/cgi@0.5.0.rbi +2961 -0
- data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +568 -0
- data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +1991 -0
- data/sorbet/rbi/gems/cli-ui@2.3.0.rbi +3181 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +9 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
- data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
- data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
- data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +972 -0
- data/sorbet/rbi/gems/dotenv@3.1.8.rbi +295 -0
- data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
- data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +672 -0
- data/sorbet/rbi/gems/dry-core@1.1.0.rbi +1894 -0
- data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +659 -0
- data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +781 -0
- data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +1127 -0
- data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +3727 -0
- data/sorbet/rbi/gems/dry-types@1.8.3.rbi +3969 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/event_stream_parser@1.0.0.rbi +49 -0
- data/sorbet/rbi/gems/faraday-multipart@1.1.1.rbi +283 -0
- data/sorbet/rbi/gems/faraday-net_http@3.4.1.rbi +147 -0
- data/sorbet/rbi/gems/faraday-retry@2.3.2.rbi +9 -0
- data/sorbet/rbi/gems/faraday@2.13.1.rbi +2977 -0
- data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +1588 -0
- data/sorbet/rbi/gems/ffi@1.17.2.rbi +9 -0
- data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +102 -0
- data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +402 -0
- data/sorbet/rbi/gems/guard@2.19.1.rbi +2283 -0
- data/sorbet/rbi/gems/hashdiff@1.2.0.rbi +355 -0
- data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
- data/sorbet/rbi/gems/json-schema@5.1.1.rbi +1466 -0
- data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/listen@3.9.0.rbi +1206 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
- data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +1830 -0
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +136 -0
- data/sorbet/rbi/gems/mime-types@3.7.0.rbi +1342 -0
- data/sorbet/rbi/gems/minitest-rg@5.3.0.rbi +160 -0
- data/sorbet/rbi/gems/minitest@5.25.5.rbi +1640 -0
- data/sorbet/rbi/gems/mocha@2.7.1.rbi +12 -0
- data/sorbet/rbi/gems/multipart-post@2.4.1.rbi +244 -0
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +147 -0
- data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +1079 -0
- data/sorbet/rbi/gems/open_router@0.3.3.rbi +230 -0
- data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
- data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
- data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
- data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
- data/sorbet/rbi/gems/pry@0.15.2.rbi +9 -0
- data/sorbet/rbi/gems/public_suffix@6.0.2.rbi +936 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +158 -0
- data/sorbet/rbi/gems/rack@2.2.17.rbi +5659 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +9 -0
- data/sorbet/rbi/gems/raix@1.0.2.rbi +1104 -0
- data/sorbet/rbi/gems/rake@13.3.0.rbi +3036 -0
- data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
- data/sorbet/rbi/gems/rb-inotify@0.11.1.rbi +9 -0
- data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
- data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
- data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +9 -0
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
- data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop@1.77.0.rbi +9 -0
- data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +1333 -0
- data/sorbet/rbi/gems/ruby-openai@8.1.0.rbi +758 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +9 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +102 -0
- data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
- data/sorbet/rbi/gems/sqlite3@2.7.0.rbi +1900 -0
- data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
- data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
- data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +9 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +9 -0
- data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
- data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
- data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18492 -0
- data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1429 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +36 -0
- metadata +114 -2
- data/lib/roast/workflow/configuration_parser.rb +0 -54
@@ -0,0 +1,1466 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `json-schema` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem json-schema`.
|
6
|
+
|
7
|
+
|
8
|
+
# This is a hack that I don't want to ever use anywhere else or repeat EVER, but we need enums to be
|
9
|
+
# an Array to pass schema validation. But we also want fast lookup!
|
10
|
+
#
|
11
|
+
# source://json-schema//lib/json-schema/util/array_set.rb#6
|
12
|
+
class ArraySet < ::Array
|
13
|
+
# @return [Boolean]
|
14
|
+
#
|
15
|
+
# source://json-schema//lib/json-schema/util/array_set.rb#7
|
16
|
+
def include?(obj); end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
# source://json-schema//lib/json-schema/util/array_set.rb#17
|
21
|
+
def convert_to_float_if_numeric(value); end
|
22
|
+
end
|
23
|
+
|
24
|
+
# source://json-schema//lib/json-schema/schema.rb#4
|
25
|
+
class JSON::Schema
|
26
|
+
# @return [Schema] a new instance of Schema
|
27
|
+
#
|
28
|
+
# source://json-schema//lib/json-schema/schema.rb#7
|
29
|
+
def initialize(schema, uri, parent_validator = T.unsafe(nil)); end
|
30
|
+
|
31
|
+
# Returns the value of attribute schema.
|
32
|
+
#
|
33
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
34
|
+
def schema; end
|
35
|
+
|
36
|
+
# Sets the attribute schema
|
37
|
+
#
|
38
|
+
# @param value the value to set the attribute schema to.
|
39
|
+
#
|
40
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
41
|
+
def schema=(_arg0); end
|
42
|
+
|
43
|
+
# @return [JSON::Schema] a new schema matching an array whose items all match this schema.
|
44
|
+
#
|
45
|
+
# source://json-schema//lib/json-schema/schema.rb#51
|
46
|
+
def to_array_schema; end
|
47
|
+
|
48
|
+
# source://json-schema//lib/json-schema/schema.rb#57
|
49
|
+
def to_s; end
|
50
|
+
|
51
|
+
# Returns the value of attribute uri.
|
52
|
+
#
|
53
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
54
|
+
def uri; end
|
55
|
+
|
56
|
+
# Sets the attribute uri
|
57
|
+
#
|
58
|
+
# @param value the value to set the attribute uri to.
|
59
|
+
#
|
60
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
61
|
+
def uri=(_arg0); end
|
62
|
+
|
63
|
+
# source://json-schema//lib/json-schema/schema.rb#31
|
64
|
+
def validate(data, fragments, processor, options = T.unsafe(nil)); end
|
65
|
+
|
66
|
+
# Returns the value of attribute validator.
|
67
|
+
#
|
68
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
69
|
+
def validator; end
|
70
|
+
|
71
|
+
# Sets the attribute validator
|
72
|
+
#
|
73
|
+
# @param value the value to set the attribute validator to.
|
74
|
+
#
|
75
|
+
# source://json-schema//lib/json-schema/schema.rb#5
|
76
|
+
def validator=(_arg0); end
|
77
|
+
|
78
|
+
class << self
|
79
|
+
# source://json-schema//lib/json-schema/schema.rb#35
|
80
|
+
def stringify(schema); end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# source://json-schema//lib/json-schema/attributes/additionalitems.rb#5
|
85
|
+
class JSON::Schema::AdditionalItemsAttribute < ::JSON::Schema::Attribute
|
86
|
+
class << self
|
87
|
+
# source://json-schema//lib/json-schema/attributes/additionalitems.rb#6
|
88
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# source://json-schema//lib/json-schema/attributes/additionalproperties.rb#6
|
93
|
+
class JSON::Schema::AdditionalPropertiesAttribute < ::JSON::Schema::Attribute
|
94
|
+
class << self
|
95
|
+
# source://json-schema//lib/json-schema/attributes/additionalproperties.rb#29
|
96
|
+
def remove_valid_properties(extra_properties, current_schema, validator); end
|
97
|
+
|
98
|
+
# source://json-schema//lib/json-schema/attributes/additionalproperties.rb#7
|
99
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# source://json-schema//lib/json-schema/attributes/allof.rb#5
|
104
|
+
class JSON::Schema::AllOfAttribute < ::JSON::Schema::Attribute
|
105
|
+
class << self
|
106
|
+
# source://json-schema//lib/json-schema/attributes/allof.rb#6
|
107
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# source://json-schema//lib/json-schema/attributes/anyof.rb#5
|
112
|
+
class JSON::Schema::AnyOfAttribute < ::JSON::Schema::Attribute
|
113
|
+
class << self
|
114
|
+
# source://json-schema//lib/json-schema/attributes/anyof.rb#6
|
115
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# source://json-schema//lib/json-schema/attribute.rb#5
|
120
|
+
class JSON::Schema::Attribute
|
121
|
+
class << self
|
122
|
+
# source://json-schema//lib/json-schema/attribute.rb#8
|
123
|
+
def build_fragment(fragments); end
|
124
|
+
|
125
|
+
# @return [Boolean]
|
126
|
+
#
|
127
|
+
# source://json-schema//lib/json-schema/attribute.rb#36
|
128
|
+
def data_valid_for_type?(data, type); end
|
129
|
+
|
130
|
+
# Lookup Schema type of given class instance
|
131
|
+
#
|
132
|
+
# source://json-schema//lib/json-schema/attribute.rb#42
|
133
|
+
def type_of_data(data); end
|
134
|
+
|
135
|
+
# source://json-schema//lib/json-schema/attribute.rb#6
|
136
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
137
|
+
|
138
|
+
# source://json-schema//lib/json-schema/attribute.rb#12
|
139
|
+
def validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors); end
|
140
|
+
|
141
|
+
# source://json-schema//lib/json-schema/attribute.rb#21
|
142
|
+
def validation_errors(validator); end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# source://json-schema//lib/json-schema/attribute.rb#25
|
147
|
+
JSON::Schema::Attribute::TYPE_CLASS_MAPPINGS = T.let(T.unsafe(nil), Hash)
|
148
|
+
|
149
|
+
# source://json-schema//lib/json-schema/attributes/const.rb#5
|
150
|
+
class JSON::Schema::ConstAttribute < ::JSON::Schema::Attribute
|
151
|
+
class << self
|
152
|
+
# source://json-schema//lib/json-schema/attributes/const.rb#6
|
153
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# source://json-schema//lib/json-schema/attributes/formats/custom.rb#6
|
158
|
+
class JSON::Schema::CustomFormat < ::JSON::Schema::FormatAttribute
|
159
|
+
# @return [CustomFormat] a new instance of CustomFormat
|
160
|
+
#
|
161
|
+
# source://json-schema//lib/json-schema/attributes/formats/custom.rb#7
|
162
|
+
def initialize(validation_proc); end
|
163
|
+
|
164
|
+
# source://json-schema//lib/json-schema/attributes/formats/custom.rb#11
|
165
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
166
|
+
end
|
167
|
+
|
168
|
+
# source://json-schema//lib/json-schema/errors/custom_format_error.rb#3
|
169
|
+
class JSON::Schema::CustomFormatError < ::StandardError; end
|
170
|
+
|
171
|
+
# source://json-schema//lib/json-schema/attributes/formats/date.rb#5
|
172
|
+
class JSON::Schema::DateFormat < ::JSON::Schema::FormatAttribute
|
173
|
+
class << self
|
174
|
+
# source://json-schema//lib/json-schema/attributes/formats/date.rb#8
|
175
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# source://json-schema//lib/json-schema/attributes/formats/date.rb#6
|
180
|
+
JSON::Schema::DateFormat::REGEXP = T.let(T.unsafe(nil), Regexp)
|
181
|
+
|
182
|
+
# source://json-schema//lib/json-schema/attributes/formats/date_time.rb#5
|
183
|
+
class JSON::Schema::DateTimeFormat < ::JSON::Schema::FormatAttribute
|
184
|
+
class << self
|
185
|
+
# source://json-schema//lib/json-schema/attributes/formats/date_time.rb#8
|
186
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# source://json-schema//lib/json-schema/attributes/formats/date_time.rb#6
|
191
|
+
JSON::Schema::DateTimeFormat::REGEXP = T.let(T.unsafe(nil), Regexp)
|
192
|
+
|
193
|
+
# source://json-schema//lib/json-schema/attributes/formats/date_time_v4.rb#5
|
194
|
+
class JSON::Schema::DateTimeV4Format < ::JSON::Schema::FormatAttribute
|
195
|
+
class << self
|
196
|
+
# source://json-schema//lib/json-schema/attributes/formats/date_time_v4.rb#6
|
197
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# source://json-schema//lib/json-schema/attributes/dependencies.rb#5
|
202
|
+
class JSON::Schema::DependenciesAttribute < ::JSON::Schema::Attribute
|
203
|
+
class << self
|
204
|
+
# @return [Boolean]
|
205
|
+
#
|
206
|
+
# source://json-schema//lib/json-schema/attributes/dependencies.rb#34
|
207
|
+
def accept_value?(value); end
|
208
|
+
|
209
|
+
# source://json-schema//lib/json-schema/attributes/dependencies.rb#6
|
210
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
211
|
+
|
212
|
+
# source://json-schema//lib/json-schema/attributes/dependencies.rb#27
|
213
|
+
def validate_dependency(schema, data, property, value, fragments, processor, attribute, options); end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# source://json-schema//lib/json-schema/attributes/dependencies_v4.rb#5
|
218
|
+
class JSON::Schema::DependenciesV4Attribute < ::JSON::Schema::DependenciesAttribute
|
219
|
+
class << self
|
220
|
+
# @return [Boolean]
|
221
|
+
#
|
222
|
+
# source://json-schema//lib/json-schema/attributes/dependencies_v4.rb#6
|
223
|
+
def accept_value?(value); end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# source://json-schema//lib/json-schema/attributes/disallow.rb#5
|
228
|
+
class JSON::Schema::DisallowAttribute < ::JSON::Schema::Attribute
|
229
|
+
class << self
|
230
|
+
# source://json-schema//lib/json-schema/attributes/disallow.rb#6
|
231
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# source://json-schema//lib/json-schema/attributes/divisibleby.rb#5
|
236
|
+
class JSON::Schema::DivisibleByAttribute < ::JSON::Schema::Attribute
|
237
|
+
class << self
|
238
|
+
# source://json-schema//lib/json-schema/attributes/divisibleby.rb#6
|
239
|
+
def keyword; end
|
240
|
+
|
241
|
+
# source://json-schema//lib/json-schema/attributes/divisibleby.rb#10
|
242
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# source://json-schema//lib/json-schema/validators/draft1.rb#5
|
247
|
+
class JSON::Schema::Draft1 < ::JSON::Schema::Validator
|
248
|
+
# @return [Draft1] a new instance of Draft1
|
249
|
+
#
|
250
|
+
# source://json-schema//lib/json-schema/validators/draft1.rb#6
|
251
|
+
def initialize; end
|
252
|
+
end
|
253
|
+
|
254
|
+
# source://json-schema//lib/json-schema/validators/draft2.rb#5
|
255
|
+
class JSON::Schema::Draft2 < ::JSON::Schema::Validator
|
256
|
+
# @return [Draft2] a new instance of Draft2
|
257
|
+
#
|
258
|
+
# source://json-schema//lib/json-schema/validators/draft2.rb#6
|
259
|
+
def initialize; end
|
260
|
+
end
|
261
|
+
|
262
|
+
# source://json-schema//lib/json-schema/validators/draft3.rb#5
|
263
|
+
class JSON::Schema::Draft3 < ::JSON::Schema::Validator
|
264
|
+
# @return [Draft3] a new instance of Draft3
|
265
|
+
#
|
266
|
+
# source://json-schema//lib/json-schema/validators/draft3.rb#6
|
267
|
+
def initialize; end
|
268
|
+
end
|
269
|
+
|
270
|
+
# source://json-schema//lib/json-schema/validators/draft4.rb#5
|
271
|
+
class JSON::Schema::Draft4 < ::JSON::Schema::Validator
|
272
|
+
# @return [Draft4] a new instance of Draft4
|
273
|
+
#
|
274
|
+
# source://json-schema//lib/json-schema/validators/draft4.rb#6
|
275
|
+
def initialize; end
|
276
|
+
end
|
277
|
+
|
278
|
+
# source://json-schema//lib/json-schema/validators/draft6.rb#5
|
279
|
+
class JSON::Schema::Draft6 < ::JSON::Schema::Validator
|
280
|
+
# @return [Draft6] a new instance of Draft6
|
281
|
+
#
|
282
|
+
# source://json-schema//lib/json-schema/validators/draft6.rb#6
|
283
|
+
def initialize; end
|
284
|
+
end
|
285
|
+
|
286
|
+
# source://json-schema//lib/json-schema/attributes/enum.rb#5
|
287
|
+
class JSON::Schema::EnumAttribute < ::JSON::Schema::Attribute
|
288
|
+
class << self
|
289
|
+
# source://json-schema//lib/json-schema/attributes/enum.rb#6
|
290
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# source://json-schema//lib/json-schema/attributes/extends.rb#6
|
295
|
+
class JSON::Schema::ExtendsAttribute < ::JSON::Schema::Attribute
|
296
|
+
class << self
|
297
|
+
# source://json-schema//lib/json-schema/attributes/extends.rb#24
|
298
|
+
def get_extended_uri_and_schema(s, current_schema, validator); end
|
299
|
+
|
300
|
+
# source://json-schema//lib/json-schema/attributes/extends.rb#7
|
301
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# source://json-schema//lib/json-schema/attributes/format.rb#5
|
306
|
+
class JSON::Schema::FormatAttribute < ::JSON::Schema::Attribute
|
307
|
+
class << self
|
308
|
+
# source://json-schema//lib/json-schema/attributes/format.rb#6
|
309
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft1.rb#3
|
314
|
+
class JSON::Schema::HyperDraft1 < ::JSON::Schema::Draft1
|
315
|
+
# @return [HyperDraft1] a new instance of HyperDraft1
|
316
|
+
#
|
317
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft1.rb#4
|
318
|
+
def initialize; end
|
319
|
+
end
|
320
|
+
|
321
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft2.rb#3
|
322
|
+
class JSON::Schema::HyperDraft2 < ::JSON::Schema::Draft2
|
323
|
+
# @return [HyperDraft2] a new instance of HyperDraft2
|
324
|
+
#
|
325
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft2.rb#4
|
326
|
+
def initialize; end
|
327
|
+
end
|
328
|
+
|
329
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft3.rb#3
|
330
|
+
class JSON::Schema::HyperDraft3 < ::JSON::Schema::Draft3
|
331
|
+
# @return [HyperDraft3] a new instance of HyperDraft3
|
332
|
+
#
|
333
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft3.rb#4
|
334
|
+
def initialize; end
|
335
|
+
end
|
336
|
+
|
337
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft4.rb#3
|
338
|
+
class JSON::Schema::HyperDraft4 < ::JSON::Schema::Draft4
|
339
|
+
# @return [HyperDraft4] a new instance of HyperDraft4
|
340
|
+
#
|
341
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft4.rb#4
|
342
|
+
def initialize; end
|
343
|
+
end
|
344
|
+
|
345
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft6.rb#3
|
346
|
+
class JSON::Schema::HyperDraft6 < ::JSON::Schema::Draft6
|
347
|
+
# @return [HyperDraft6] a new instance of HyperDraft6
|
348
|
+
#
|
349
|
+
# source://json-schema//lib/json-schema/validators/hyper-draft6.rb#4
|
350
|
+
def initialize; end
|
351
|
+
end
|
352
|
+
|
353
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#29
|
354
|
+
class JSON::Schema::IP4Format < ::JSON::Schema::IPFormat
|
355
|
+
class << self
|
356
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#30
|
357
|
+
def ip_version; end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#35
|
362
|
+
class JSON::Schema::IP6Format < ::JSON::Schema::IPFormat
|
363
|
+
class << self
|
364
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#36
|
365
|
+
def ip_version; end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#7
|
370
|
+
class JSON::Schema::IPFormat < ::JSON::Schema::FormatAttribute
|
371
|
+
class << self
|
372
|
+
# @raise [NotImplementedError]
|
373
|
+
#
|
374
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#24
|
375
|
+
def ip_version; end
|
376
|
+
|
377
|
+
# source://json-schema//lib/json-schema/attributes/formats/ip.rb#8
|
378
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# source://json-schema//lib/json-schema/attributes/items.rb#5
|
383
|
+
class JSON::Schema::ItemsAttribute < ::JSON::Schema::Attribute
|
384
|
+
class << self
|
385
|
+
# source://json-schema//lib/json-schema/attributes/items.rb#6
|
386
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
387
|
+
end
|
388
|
+
end
|
389
|
+
|
390
|
+
# source://json-schema//lib/json-schema/attributes/limits/items.rb#5
|
391
|
+
class JSON::Schema::ItemsLimitAttribute < ::JSON::Schema::LimitAttribute
|
392
|
+
class << self
|
393
|
+
# source://json-schema//lib/json-schema/attributes/limits/items.rb#6
|
394
|
+
def acceptable_type; end
|
395
|
+
|
396
|
+
# source://json-schema//lib/json-schema/attributes/limits/items.rb#10
|
397
|
+
def value(data); end
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
# source://json-schema//lib/json-schema/errors/json_load_error.rb#3
|
402
|
+
class JSON::Schema::JsonLoadError < ::StandardError; end
|
403
|
+
|
404
|
+
# source://json-schema//lib/json-schema/errors/json_parse_error.rb#3
|
405
|
+
class JSON::Schema::JsonParseError < ::StandardError; end
|
406
|
+
|
407
|
+
# source://json-schema//lib/json-schema/attributes/limits/length.rb#5
|
408
|
+
class JSON::Schema::LengthLimitAttribute < ::JSON::Schema::LimitAttribute
|
409
|
+
class << self
|
410
|
+
# source://json-schema//lib/json-schema/attributes/limits/length.rb#6
|
411
|
+
def acceptable_type; end
|
412
|
+
|
413
|
+
# source://json-schema//lib/json-schema/attributes/limits/length.rb#10
|
414
|
+
def value(data); end
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#5
|
419
|
+
class JSON::Schema::LimitAttribute < ::JSON::Schema::Attribute
|
420
|
+
class << self
|
421
|
+
# @raise [NotImplementedError]
|
422
|
+
#
|
423
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#39
|
424
|
+
def acceptable_type; end
|
425
|
+
|
426
|
+
# @raise [NotImplementedError]
|
427
|
+
#
|
428
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#43
|
429
|
+
def error_message(schema); end
|
430
|
+
|
431
|
+
# @return [Boolean]
|
432
|
+
#
|
433
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#31
|
434
|
+
def exclusive?(schema); end
|
435
|
+
|
436
|
+
# @return [Boolean]
|
437
|
+
#
|
438
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#16
|
439
|
+
def invalid?(schema, data); end
|
440
|
+
|
441
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#27
|
442
|
+
def limit(schema); end
|
443
|
+
|
444
|
+
# @raise [NotImplementedError]
|
445
|
+
#
|
446
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#47
|
447
|
+
def limit_name; end
|
448
|
+
|
449
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#6
|
450
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
451
|
+
|
452
|
+
# source://json-schema//lib/json-schema/attributes/limit.rb#35
|
453
|
+
def value(data); end
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
# source://json-schema//lib/json-schema/attributes/maxdecimal.rb#5
|
458
|
+
class JSON::Schema::MaxDecimalAttribute < ::JSON::Schema::Attribute
|
459
|
+
class << self
|
460
|
+
# source://json-schema//lib/json-schema/attributes/maxdecimal.rb#6
|
461
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_items.rb#5
|
466
|
+
class JSON::Schema::MaxItemsAttribute < ::JSON::Schema::ItemsLimitAttribute
|
467
|
+
class << self
|
468
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_items.rb#10
|
469
|
+
def error_message(schema); end
|
470
|
+
|
471
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_items.rb#6
|
472
|
+
def limit_name; end
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_length.rb#5
|
477
|
+
class JSON::Schema::MaxLengthAttribute < ::JSON::Schema::LengthLimitAttribute
|
478
|
+
class << self
|
479
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_length.rb#10
|
480
|
+
def error_message(schema); end
|
481
|
+
|
482
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_length.rb#6
|
483
|
+
def limit_name; end
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_properties.rb#5
|
488
|
+
class JSON::Schema::MaxPropertiesAttribute < ::JSON::Schema::PropertiesLimitAttribute
|
489
|
+
class << self
|
490
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_properties.rb#10
|
491
|
+
def error_message(schema); end
|
492
|
+
|
493
|
+
# source://json-schema//lib/json-schema/attributes/limits/max_properties.rb#6
|
494
|
+
def limit_name; end
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
498
|
+
# source://json-schema//lib/json-schema/attributes/limits/maximum.rb#5
|
499
|
+
class JSON::Schema::MaximumAttribute < ::JSON::Schema::NumericLimitAttribute
|
500
|
+
class << self
|
501
|
+
# @return [Boolean]
|
502
|
+
#
|
503
|
+
# source://json-schema//lib/json-schema/attributes/limits/maximum.rb#10
|
504
|
+
def exclusive?(schema); end
|
505
|
+
|
506
|
+
# source://json-schema//lib/json-schema/attributes/limits/maximum.rb#6
|
507
|
+
def limit_name; end
|
508
|
+
end
|
509
|
+
end
|
510
|
+
|
511
|
+
# source://json-schema//lib/json-schema/attributes/limits/maximum_inclusive.rb#5
|
512
|
+
class JSON::Schema::MaximumInclusiveAttribute < ::JSON::Schema::MaximumAttribute
|
513
|
+
class << self
|
514
|
+
# @return [Boolean]
|
515
|
+
#
|
516
|
+
# source://json-schema//lib/json-schema/attributes/limits/maximum_inclusive.rb#6
|
517
|
+
def exclusive?(schema); end
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_items.rb#5
|
522
|
+
class JSON::Schema::MinItemsAttribute < ::JSON::Schema::ItemsLimitAttribute
|
523
|
+
class << self
|
524
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_items.rb#10
|
525
|
+
def error_message(schema); end
|
526
|
+
|
527
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_items.rb#6
|
528
|
+
def limit_name; end
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
532
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_length.rb#5
|
533
|
+
class JSON::Schema::MinLengthAttribute < ::JSON::Schema::LengthLimitAttribute
|
534
|
+
class << self
|
535
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_length.rb#10
|
536
|
+
def error_message(schema); end
|
537
|
+
|
538
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_length.rb#6
|
539
|
+
def limit_name; end
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
543
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_properties.rb#5
|
544
|
+
class JSON::Schema::MinPropertiesAttribute < ::JSON::Schema::PropertiesLimitAttribute
|
545
|
+
class << self
|
546
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_properties.rb#10
|
547
|
+
def error_message(schema); end
|
548
|
+
|
549
|
+
# source://json-schema//lib/json-schema/attributes/limits/min_properties.rb#6
|
550
|
+
def limit_name; end
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
# source://json-schema//lib/json-schema/attributes/limits/minimum.rb#5
|
555
|
+
class JSON::Schema::MinimumAttribute < ::JSON::Schema::NumericLimitAttribute
|
556
|
+
class << self
|
557
|
+
# @return [Boolean]
|
558
|
+
#
|
559
|
+
# source://json-schema//lib/json-schema/attributes/limits/minimum.rb#10
|
560
|
+
def exclusive?(schema); end
|
561
|
+
|
562
|
+
# source://json-schema//lib/json-schema/attributes/limits/minimum.rb#6
|
563
|
+
def limit_name; end
|
564
|
+
end
|
565
|
+
end
|
566
|
+
|
567
|
+
# source://json-schema//lib/json-schema/attributes/limits/minimum_inclusive.rb#5
|
568
|
+
class JSON::Schema::MinimumInclusiveAttribute < ::JSON::Schema::MinimumAttribute
|
569
|
+
class << self
|
570
|
+
# @return [Boolean]
|
571
|
+
#
|
572
|
+
# source://json-schema//lib/json-schema/attributes/limits/minimum_inclusive.rb#6
|
573
|
+
def exclusive?(schema); end
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
# source://json-schema//lib/json-schema/attributes/multipleof.rb#5
|
578
|
+
class JSON::Schema::MultipleOfAttribute < ::JSON::Schema::DivisibleByAttribute
|
579
|
+
class << self
|
580
|
+
# source://json-schema//lib/json-schema/attributes/multipleof.rb#6
|
581
|
+
def keyword; end
|
582
|
+
end
|
583
|
+
end
|
584
|
+
|
585
|
+
# source://json-schema//lib/json-schema/attributes/not.rb#5
|
586
|
+
class JSON::Schema::NotAttribute < ::JSON::Schema::Attribute
|
587
|
+
class << self
|
588
|
+
# source://json-schema//lib/json-schema/attributes/not.rb#6
|
589
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
# source://json-schema//lib/json-schema/attributes/limits/numeric.rb#5
|
594
|
+
class JSON::Schema::NumericLimitAttribute < ::JSON::Schema::LimitAttribute
|
595
|
+
class << self
|
596
|
+
# source://json-schema//lib/json-schema/attributes/limits/numeric.rb#6
|
597
|
+
def acceptable_type; end
|
598
|
+
|
599
|
+
# source://json-schema//lib/json-schema/attributes/limits/numeric.rb#10
|
600
|
+
def error_message(schema); end
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
604
|
+
# source://json-schema//lib/json-schema/attributes/oneof.rb#5
|
605
|
+
class JSON::Schema::OneOfAttribute < ::JSON::Schema::Attribute
|
606
|
+
class << self
|
607
|
+
# source://json-schema//lib/json-schema/attributes/oneof.rb#6
|
608
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
609
|
+
end
|
610
|
+
end
|
611
|
+
|
612
|
+
# source://json-schema//lib/json-schema/attributes/pattern.rb#5
|
613
|
+
class JSON::Schema::PatternAttribute < ::JSON::Schema::Attribute
|
614
|
+
class << self
|
615
|
+
# source://json-schema//lib/json-schema/attributes/pattern.rb#6
|
616
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
617
|
+
end
|
618
|
+
end
|
619
|
+
|
620
|
+
# source://json-schema//lib/json-schema/attributes/patternproperties.rb#5
|
621
|
+
class JSON::Schema::PatternPropertiesAttribute < ::JSON::Schema::Attribute
|
622
|
+
class << self
|
623
|
+
# source://json-schema//lib/json-schema/attributes/patternproperties.rb#6
|
624
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
625
|
+
end
|
626
|
+
end
|
627
|
+
|
628
|
+
# source://json-schema//lib/json-schema/attributes/properties.rb#5
|
629
|
+
class JSON::Schema::PropertiesAttribute < ::JSON::Schema::Attribute
|
630
|
+
class << self
|
631
|
+
# @return [Boolean]
|
632
|
+
#
|
633
|
+
# source://json-schema//lib/json-schema/attributes/properties.rb#6
|
634
|
+
def required?(schema, options); end
|
635
|
+
|
636
|
+
# source://json-schema//lib/json-schema/attributes/properties.rb#10
|
637
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
641
|
+
# source://json-schema//lib/json-schema/attributes/limits/properties.rb#5
|
642
|
+
class JSON::Schema::PropertiesLimitAttribute < ::JSON::Schema::LimitAttribute
|
643
|
+
class << self
|
644
|
+
# source://json-schema//lib/json-schema/attributes/limits/properties.rb#6
|
645
|
+
def acceptable_type; end
|
646
|
+
|
647
|
+
# source://json-schema//lib/json-schema/attributes/limits/properties.rb#10
|
648
|
+
def value(data); end
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
# source://json-schema//lib/json-schema/attributes/properties_optional.rb#5
|
653
|
+
class JSON::Schema::PropertiesOptionalAttribute < ::JSON::Schema::Attribute
|
654
|
+
class << self
|
655
|
+
# source://json-schema//lib/json-schema/attributes/properties_optional.rb#6
|
656
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
660
|
+
# source://json-schema//lib/json-schema/attributes/properties_v4.rb#5
|
661
|
+
class JSON::Schema::PropertiesV4Attribute < ::JSON::Schema::PropertiesAttribute
|
662
|
+
class << self
|
663
|
+
# draft4 relies on its own RequiredAttribute validation at a higher level, rather than
|
664
|
+
# as an attribute of individual properties.
|
665
|
+
#
|
666
|
+
# @return [Boolean]
|
667
|
+
#
|
668
|
+
# source://json-schema//lib/json-schema/attributes/properties_v4.rb#8
|
669
|
+
def required?(schema, options); end
|
670
|
+
end
|
671
|
+
end
|
672
|
+
|
673
|
+
# source://json-schema//lib/json-schema/attributes/propertynames.rb#5
|
674
|
+
class JSON::Schema::PropertyNames < ::JSON::Schema::Attribute
|
675
|
+
class << self
|
676
|
+
# source://json-schema//lib/json-schema/attributes/propertynames.rb#6
|
677
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
678
|
+
end
|
679
|
+
end
|
680
|
+
|
681
|
+
# Base for any reading exceptions encountered by {JSON::Schema::Reader}
|
682
|
+
#
|
683
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#7
|
684
|
+
class JSON::Schema::ReadError < ::StandardError
|
685
|
+
# @return [ReadError] a new instance of ReadError
|
686
|
+
#
|
687
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#14
|
688
|
+
def initialize(location, type); end
|
689
|
+
|
690
|
+
# @return [String] the requested schema location which was refused
|
691
|
+
#
|
692
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#9
|
693
|
+
def location; end
|
694
|
+
|
695
|
+
# @return [Symbol] either +:uri+ or +:file+
|
696
|
+
#
|
697
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#12
|
698
|
+
def type; end
|
699
|
+
|
700
|
+
private
|
701
|
+
|
702
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#22
|
703
|
+
def type_string; end
|
704
|
+
end
|
705
|
+
|
706
|
+
# Raised by {JSON::Schema::Reader} when an attempt to read a schema fails
|
707
|
+
#
|
708
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#38
|
709
|
+
class JSON::Schema::ReadFailed < ::JSON::Schema::ReadError
|
710
|
+
private
|
711
|
+
|
712
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#41
|
713
|
+
def error_message; end
|
714
|
+
end
|
715
|
+
|
716
|
+
# Raised by {JSON::Schema::Reader} when one of its settings indicate
|
717
|
+
# a schema should not be read.
|
718
|
+
#
|
719
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#29
|
720
|
+
class JSON::Schema::ReadRefused < ::JSON::Schema::ReadError
|
721
|
+
private
|
722
|
+
|
723
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#32
|
724
|
+
def error_message; end
|
725
|
+
end
|
726
|
+
|
727
|
+
# When an unregistered schema is encountered, the {JSON::Schema::Reader} is
|
728
|
+
# used to fetch its contents and register it with the {JSON::Validator}.
|
729
|
+
#
|
730
|
+
# This default reader will read schemas from the filesystem or from a URI.
|
731
|
+
#
|
732
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#50
|
733
|
+
class JSON::Schema::Reader
|
734
|
+
# The behavior of the schema reader can be controlled by providing
|
735
|
+
# callbacks to determine whether to permit reading referenced schemas.
|
736
|
+
# The options +accept_uri+ and +accept_file+ should be procs which
|
737
|
+
# accept a +URI+ or +Pathname+ object, and return a boolean value
|
738
|
+
# indicating whether to read the referenced schema.
|
739
|
+
#
|
740
|
+
# URIs using the +file+ scheme will be normalized into +Pathname+ objects
|
741
|
+
# and passed to the +accept_file+ callback.
|
742
|
+
#
|
743
|
+
# @example Reject all unregistered schemas
|
744
|
+
# JSON::Validator.schema_reader = JSON::Schema::Reader.new(
|
745
|
+
# :accept_uri => false,
|
746
|
+
# :accept_file => false
|
747
|
+
# )
|
748
|
+
# @example Only permit URIs from certain hosts
|
749
|
+
# JSON::Validator.schema_reader = JSON::Schema::Reader.new(
|
750
|
+
# :accept_file => false,
|
751
|
+
# :accept_uri => proc { |uri| ['mycompany.com', 'json-schema.org'].include?(uri.host) }
|
752
|
+
# )
|
753
|
+
# @option options
|
754
|
+
# @option options
|
755
|
+
# @param options [Hash]
|
756
|
+
# @return [Reader] a new instance of Reader
|
757
|
+
#
|
758
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#75
|
759
|
+
def initialize(options = T.unsafe(nil)); end
|
760
|
+
|
761
|
+
# @param pathname [Pathname]
|
762
|
+
# @return [Boolean]
|
763
|
+
#
|
764
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#111
|
765
|
+
def accept_file?(pathname); end
|
766
|
+
|
767
|
+
# @param uri [Addressable::URI]
|
768
|
+
# @return [Boolean]
|
769
|
+
#
|
770
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#101
|
771
|
+
def accept_uri?(uri); end
|
772
|
+
|
773
|
+
# @param location [#to_s] The location from which to read the schema
|
774
|
+
# @raise [JSON::Schema::ReadRefused] if +accept_uri+ or +accept_file+
|
775
|
+
# indicated the schema could not be read
|
776
|
+
# @raise [JSON::Schema::ParseError] if the schema was not a valid JSON object
|
777
|
+
# @raise [JSON::Schema::ReadFailed] if reading the location was acceptable but the
|
778
|
+
# attempt to retrieve it failed
|
779
|
+
# @return [JSON::Schema]
|
780
|
+
#
|
781
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#87
|
782
|
+
def read(location); end
|
783
|
+
|
784
|
+
private
|
785
|
+
|
786
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#131
|
787
|
+
def read_file(pathname); end
|
788
|
+
|
789
|
+
# source://json-schema//lib/json-schema/schema/reader.rb#121
|
790
|
+
def read_uri(uri); end
|
791
|
+
end
|
792
|
+
|
793
|
+
# source://json-schema//lib/json-schema/attributes/ref.rb#7
|
794
|
+
class JSON::Schema::RefAttribute < ::JSON::Schema::Attribute
|
795
|
+
class << self
|
796
|
+
# source://json-schema//lib/json-schema/attributes/ref.rb#22
|
797
|
+
def get_referenced_uri_and_schema(s, current_schema, validator); end
|
798
|
+
|
799
|
+
# source://json-schema//lib/json-schema/attributes/ref.rb#8
|
800
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
# source://json-schema//lib/json-schema/attributes/required.rb#5
|
805
|
+
class JSON::Schema::RequiredAttribute < ::JSON::Schema::Attribute
|
806
|
+
class << self
|
807
|
+
# source://json-schema//lib/json-schema/attributes/required.rb#6
|
808
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
809
|
+
end
|
810
|
+
end
|
811
|
+
|
812
|
+
# source://json-schema//lib/json-schema/errors/schema_error.rb#3
|
813
|
+
class JSON::Schema::SchemaError < ::StandardError; end
|
814
|
+
|
815
|
+
# source://json-schema//lib/json-schema/errors/schema_parse_error.rb#5
|
816
|
+
class JSON::Schema::SchemaParseError < ::JSON::ParserError; end
|
817
|
+
|
818
|
+
# source://json-schema//lib/json-schema/attributes/formats/time.rb#5
|
819
|
+
class JSON::Schema::TimeFormat < ::JSON::Schema::FormatAttribute
|
820
|
+
class << self
|
821
|
+
# source://json-schema//lib/json-schema/attributes/formats/time.rb#8
|
822
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
823
|
+
end
|
824
|
+
end
|
825
|
+
|
826
|
+
# source://json-schema//lib/json-schema/attributes/formats/time.rb#6
|
827
|
+
JSON::Schema::TimeFormat::REGEXP = T.let(T.unsafe(nil), Regexp)
|
828
|
+
|
829
|
+
# source://json-schema//lib/json-schema/attributes/type.rb#5
|
830
|
+
class JSON::Schema::TypeAttribute < ::JSON::Schema::Attribute
|
831
|
+
class << self
|
832
|
+
# source://json-schema//lib/json-schema/attributes/type.rb#69
|
833
|
+
def list_types(types); end
|
834
|
+
|
835
|
+
# source://json-schema//lib/json-schema/attributes/type.rb#6
|
836
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
837
|
+
end
|
838
|
+
end
|
839
|
+
|
840
|
+
# source://json-schema//lib/json-schema/attributes/type_v4.rb#5
|
841
|
+
class JSON::Schema::TypeV4Attribute < ::JSON::Schema::Attribute
|
842
|
+
class << self
|
843
|
+
# source://json-schema//lib/json-schema/attributes/type_v4.rb#6
|
844
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
845
|
+
end
|
846
|
+
end
|
847
|
+
|
848
|
+
# source://json-schema//lib/json-schema/attributes/uniqueitems.rb#5
|
849
|
+
class JSON::Schema::UniqueItemsAttribute < ::JSON::Schema::Attribute
|
850
|
+
class << self
|
851
|
+
# source://json-schema//lib/json-schema/attributes/uniqueitems.rb#6
|
852
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
853
|
+
end
|
854
|
+
end
|
855
|
+
|
856
|
+
# source://json-schema//lib/json-schema/errors/uri_error.rb#3
|
857
|
+
class JSON::Schema::UriError < ::StandardError; end
|
858
|
+
|
859
|
+
# source://json-schema//lib/json-schema/attributes/formats/uri.rb#6
|
860
|
+
class JSON::Schema::UriFormat < ::JSON::Schema::FormatAttribute
|
861
|
+
class << self
|
862
|
+
# source://json-schema//lib/json-schema/attributes/formats/uri.rb#7
|
863
|
+
def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end
|
864
|
+
end
|
865
|
+
end
|
866
|
+
|
867
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#3
|
868
|
+
class JSON::Schema::ValidationError < ::StandardError
|
869
|
+
# @return [ValidationError] a new instance of ValidationError
|
870
|
+
#
|
871
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#7
|
872
|
+
def initialize(message, fragments, failed_attribute, schema); end
|
873
|
+
|
874
|
+
# Returns the value of attribute failed_attribute.
|
875
|
+
#
|
876
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
877
|
+
def failed_attribute; end
|
878
|
+
|
879
|
+
# Sets the attribute failed_attribute
|
880
|
+
#
|
881
|
+
# @param value the value to set the attribute failed_attribute to.
|
882
|
+
#
|
883
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
884
|
+
def failed_attribute=(_arg0); end
|
885
|
+
|
886
|
+
# Returns the value of attribute fragments.
|
887
|
+
#
|
888
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
889
|
+
def fragments; end
|
890
|
+
|
891
|
+
# Sets the attribute fragments
|
892
|
+
#
|
893
|
+
# @param value the value to set the attribute fragments to.
|
894
|
+
#
|
895
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
896
|
+
def fragments=(_arg0); end
|
897
|
+
|
898
|
+
# Returns the value of attribute message.
|
899
|
+
#
|
900
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
901
|
+
def message; end
|
902
|
+
|
903
|
+
# Sets the attribute message
|
904
|
+
#
|
905
|
+
# @param value the value to set the attribute message to.
|
906
|
+
#
|
907
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
908
|
+
def message=(_arg0); end
|
909
|
+
|
910
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#40
|
911
|
+
def message_with_schema; end
|
912
|
+
|
913
|
+
# Returns the value of attribute schema.
|
914
|
+
#
|
915
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
916
|
+
def schema; end
|
917
|
+
|
918
|
+
# Sets the attribute schema
|
919
|
+
#
|
920
|
+
# @param value the value to set the attribute schema to.
|
921
|
+
#
|
922
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
923
|
+
def schema=(_arg0); end
|
924
|
+
|
925
|
+
# Returns the value of attribute sub_errors.
|
926
|
+
#
|
927
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
928
|
+
def sub_errors; end
|
929
|
+
|
930
|
+
# Sets the attribute sub_errors
|
931
|
+
#
|
932
|
+
# @param value the value to set the attribute sub_errors to.
|
933
|
+
#
|
934
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#5
|
935
|
+
def sub_errors=(_arg0); end
|
936
|
+
|
937
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#29
|
938
|
+
def to_hash; end
|
939
|
+
|
940
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#16
|
941
|
+
def to_string(subschema_level = T.unsafe(nil)); end
|
942
|
+
end
|
943
|
+
|
944
|
+
# source://json-schema//lib/json-schema/errors/validation_error.rb#4
|
945
|
+
JSON::Schema::ValidationError::INDENT = T.let(T.unsafe(nil), String)
|
946
|
+
|
947
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#3
|
948
|
+
class JSON::Schema::Validator
|
949
|
+
# @return [Validator] a new instance of Validator
|
950
|
+
#
|
951
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#7
|
952
|
+
def initialize; end
|
953
|
+
|
954
|
+
# Returns the value of attribute attributes.
|
955
|
+
#
|
956
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
957
|
+
def attributes; end
|
958
|
+
|
959
|
+
# Sets the attribute attributes
|
960
|
+
#
|
961
|
+
# @param value the value to set the attribute attributes to.
|
962
|
+
#
|
963
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
964
|
+
def attributes=(_arg0); end
|
965
|
+
|
966
|
+
# Returns the value of attribute default_formats.
|
967
|
+
#
|
968
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#5
|
969
|
+
def default_formats; end
|
970
|
+
|
971
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#16
|
972
|
+
def extend_schema_definition(schema_uri); end
|
973
|
+
|
974
|
+
# Returns the value of attribute formats.
|
975
|
+
#
|
976
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
977
|
+
def formats; end
|
978
|
+
|
979
|
+
# Sets the attribute formats
|
980
|
+
#
|
981
|
+
# @param value the value to set the attribute formats to.
|
982
|
+
#
|
983
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
984
|
+
def formats=(_arg0); end
|
985
|
+
|
986
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#31
|
987
|
+
def metaschema; end
|
988
|
+
|
989
|
+
# Returns the value of attribute names.
|
990
|
+
#
|
991
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
992
|
+
def names; end
|
993
|
+
|
994
|
+
# Sets the attribute names
|
995
|
+
#
|
996
|
+
# @param value the value to set the attribute names to.
|
997
|
+
#
|
998
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
999
|
+
def names=(_arg0); end
|
1000
|
+
|
1001
|
+
# Returns the value of attribute uri.
|
1002
|
+
#
|
1003
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
1004
|
+
def uri; end
|
1005
|
+
|
1006
|
+
# Sets the attribute uri
|
1007
|
+
#
|
1008
|
+
# @param value the value to set the attribute uri to.
|
1009
|
+
#
|
1010
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#4
|
1011
|
+
def uri=(_arg0); end
|
1012
|
+
|
1013
|
+
# source://json-schema//lib/json-schema/schema/validator.rb#22
|
1014
|
+
def validate(current_schema, data, fragments, processor, options = T.unsafe(nil)); end
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# source://json-schema//lib/json-schema/util/uri.rb#6
|
1018
|
+
module JSON::Util; end
|
1019
|
+
|
1020
|
+
# @api private
|
1021
|
+
#
|
1022
|
+
# source://json-schema//lib/json-schema/util/uri.rb#8
|
1023
|
+
class JSON::Util::URI < ::Addressable::URI
|
1024
|
+
# @api private
|
1025
|
+
# @param base [Addressable::URI, String]
|
1026
|
+
# @return [Addressable::URI]
|
1027
|
+
#
|
1028
|
+
# source://json-schema//lib/json-schema/util/uri.rb#123
|
1029
|
+
def absolutize_ref(base); end
|
1030
|
+
|
1031
|
+
# @api private
|
1032
|
+
# @param base [Addressable::URI, String]
|
1033
|
+
# @return [Addressable::URI]
|
1034
|
+
#
|
1035
|
+
# source://json-schema//lib/json-schema/util/uri.rb#96
|
1036
|
+
def normalize_ref(base); end
|
1037
|
+
|
1038
|
+
# Normalizes the URI based on the provided base path.
|
1039
|
+
#
|
1040
|
+
# @api private
|
1041
|
+
# @param base_path [String] the base path to use for relative URIs. Defaults to the current working directory.
|
1042
|
+
# @return [Addressable::URI] the normalized URI or nil
|
1043
|
+
#
|
1044
|
+
# source://json-schema//lib/json-schema/util/uri.rb#82
|
1045
|
+
def normalized_uri(base_path = T.unsafe(nil)); end
|
1046
|
+
|
1047
|
+
# Strips the fragment from the URI.
|
1048
|
+
#
|
1049
|
+
# @api private
|
1050
|
+
# @return [Addressable::URI] a new instance of URI without a fragment
|
1051
|
+
#
|
1052
|
+
# source://json-schema//lib/json-schema/util/uri.rb#70
|
1053
|
+
def strip_fragment; end
|
1054
|
+
|
1055
|
+
# Unencodes any percent encoded characters within a path component.
|
1056
|
+
#
|
1057
|
+
# @api private
|
1058
|
+
# @return [String]
|
1059
|
+
#
|
1060
|
+
# source://json-schema//lib/json-schema/util/uri.rb#64
|
1061
|
+
def unescaped_path; end
|
1062
|
+
|
1063
|
+
class << self
|
1064
|
+
# @api private
|
1065
|
+
#
|
1066
|
+
# source://json-schema//lib/json-schema/util/uri.rb#56
|
1067
|
+
def absolutize_ref(ref, base); end
|
1068
|
+
|
1069
|
+
# @api private
|
1070
|
+
# @param uri [String, Addressable::URI]
|
1071
|
+
# @return [Addressable::URI, nil]
|
1072
|
+
#
|
1073
|
+
# source://json-schema//lib/json-schema/util/uri.rb#24
|
1074
|
+
def file_uri(uri); end
|
1075
|
+
|
1076
|
+
# Normalizes the reference URI based on the provided base URI
|
1077
|
+
#
|
1078
|
+
# @api private
|
1079
|
+
# @param ref [String, Addressable::URI]
|
1080
|
+
# @param base [String, Addressable::URI]
|
1081
|
+
# @return [Addressable::URI]
|
1082
|
+
#
|
1083
|
+
# source://json-schema//lib/json-schema/util/uri.rb#52
|
1084
|
+
def normalize_ref(ref, base); end
|
1085
|
+
|
1086
|
+
# @api private
|
1087
|
+
# @param uri [String, Addressable::URI]
|
1088
|
+
# @return [Addressable::URI]
|
1089
|
+
#
|
1090
|
+
# source://json-schema//lib/json-schema/util/uri.rb#43
|
1091
|
+
def normalized_uri(uri, base_path = T.unsafe(nil)); end
|
1092
|
+
|
1093
|
+
# @api private
|
1094
|
+
# @param uri [String, Addressable::URI]
|
1095
|
+
# @return [Addressable::URI, nil]
|
1096
|
+
#
|
1097
|
+
# source://json-schema//lib/json-schema/util/uri.rb#16
|
1098
|
+
def parse(uri); end
|
1099
|
+
|
1100
|
+
# Strips the fragment from the URI.
|
1101
|
+
#
|
1102
|
+
# @api private
|
1103
|
+
# @param uri [String, Addressable::URI]
|
1104
|
+
# @return [Addressable::URI]
|
1105
|
+
#
|
1106
|
+
# source://json-schema//lib/json-schema/util/uri.rb#37
|
1107
|
+
def strip_fragment(uri); end
|
1108
|
+
|
1109
|
+
# @api private
|
1110
|
+
#
|
1111
|
+
# source://addressable/2.8.7/lib/addressable/uri.rb#472
|
1112
|
+
def unescape_uri(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
|
1113
|
+
|
1114
|
+
# @api private
|
1115
|
+
# @param uri [String, Addressable::URI] ri [String, Addressable::URI
|
1116
|
+
# @return [String]
|
1117
|
+
#
|
1118
|
+
# source://json-schema//lib/json-schema/util/uri.rb#30
|
1119
|
+
def unescaped_path(uri); end
|
1120
|
+
end
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
# @api private
|
1124
|
+
#
|
1125
|
+
# source://json-schema//lib/json-schema/util/uri.rb#9
|
1126
|
+
JSON::Util::URI::SUPPORTED_PROTOCOLS = T.let(T.unsafe(nil), Array)
|
1127
|
+
|
1128
|
+
# Pure ruby UUID generator, which is compatible with RFC4122
|
1129
|
+
#
|
1130
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#33
|
1131
|
+
class JSON::Util::UUID < ::Struct
|
1132
|
+
include ::Comparable
|
1133
|
+
|
1134
|
+
# UUIDs are comparable (don't know what benefits are there, though).
|
1135
|
+
#
|
1136
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#247
|
1137
|
+
def <=>(other); end
|
1138
|
+
|
1139
|
+
# Two UUIDs are said to be equal if and only if their (byte-order
|
1140
|
+
# canonicalized) integer representations are equivalent. Refer RFC4122 for
|
1141
|
+
# details.
|
1142
|
+
#
|
1143
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#241
|
1144
|
+
def ==(other); end
|
1145
|
+
|
1146
|
+
# Generate the string representation (a.k.a GUID) of this UUID
|
1147
|
+
#
|
1148
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#205
|
1149
|
+
def guid; end
|
1150
|
+
|
1151
|
+
# Returns the value of attribute raw_bytes
|
1152
|
+
#
|
1153
|
+
# @return [Object] the current value of raw_bytes
|
1154
|
+
def raw_bytes; end
|
1155
|
+
|
1156
|
+
# Sets the attribute raw_bytes
|
1157
|
+
#
|
1158
|
+
# @param value [Object] the value to set the attribute raw_bytes to.
|
1159
|
+
# @return [Object] the newly set value
|
1160
|
+
def raw_bytes=(_); end
|
1161
|
+
|
1162
|
+
# Convert into 128-bit unsigned integer
|
1163
|
+
#
|
1164
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#220
|
1165
|
+
def to_i; end
|
1166
|
+
|
1167
|
+
# Convert into 128-bit unsigned integer
|
1168
|
+
#
|
1169
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#220
|
1170
|
+
def to_int; end
|
1171
|
+
|
1172
|
+
# Generate the string representation (a.k.a GUID) of this UUID
|
1173
|
+
#
|
1174
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#205
|
1175
|
+
def to_s; end
|
1176
|
+
|
1177
|
+
# Convert into a RFC4122-comforming URN representation
|
1178
|
+
#
|
1179
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#214
|
1180
|
+
def to_uri; end
|
1181
|
+
|
1182
|
+
# The 'primitive deconstructor', or the dual to pack.
|
1183
|
+
# Note UUID.pack(uuid.unpack) == uuid
|
1184
|
+
#
|
1185
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#200
|
1186
|
+
def unpack; end
|
1187
|
+
|
1188
|
+
# Convert into a RFC4122-comforming URN representation
|
1189
|
+
#
|
1190
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#214
|
1191
|
+
def urn; end
|
1192
|
+
|
1193
|
+
# Gets the version of this UUID
|
1194
|
+
# returns nil if bad version
|
1195
|
+
#
|
1196
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#230
|
1197
|
+
def version; end
|
1198
|
+
|
1199
|
+
class << self
|
1200
|
+
def [](*_arg0); end
|
1201
|
+
|
1202
|
+
# create the "version 1" UUID with current system clock, current UTC
|
1203
|
+
# timestamp, and the IEEE 802 address (so-called MAC address).
|
1204
|
+
#
|
1205
|
+
# Speed notice: it's slow. It writes some data into hard drive on every
|
1206
|
+
# invokation. If you want to speed this up, try remounting tmpdir with a
|
1207
|
+
# memory based filesystem (such as tmpfs). STILL slow? then no way but
|
1208
|
+
# rewrite it with c :)
|
1209
|
+
#
|
1210
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#120
|
1211
|
+
def create(clock = T.unsafe(nil), time = T.unsafe(nil), mac_addr = T.unsafe(nil)); end
|
1212
|
+
|
1213
|
+
# UUID generation using MD5 (for backward compat.)
|
1214
|
+
#
|
1215
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#70
|
1216
|
+
def create_md5(str, namespace); end
|
1217
|
+
|
1218
|
+
# UUID generation using random-number generator. From it's random
|
1219
|
+
# nature, there's no warranty that the created ID is really universaly
|
1220
|
+
# unique.
|
1221
|
+
#
|
1222
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#85
|
1223
|
+
def create_random; end
|
1224
|
+
|
1225
|
+
# UUID generation using SHA1. Recommended over create_md5.
|
1226
|
+
# Namespace object is another UUID, some of them are pre-defined below.
|
1227
|
+
#
|
1228
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#57
|
1229
|
+
def create_sha1(str, namespace); end
|
1230
|
+
|
1231
|
+
# create the "version 1" UUID with current system clock, current UTC
|
1232
|
+
# timestamp, and the IEEE 802 address (so-called MAC address).
|
1233
|
+
#
|
1234
|
+
# Speed notice: it's slow. It writes some data into hard drive on every
|
1235
|
+
# invokation. If you want to speed this up, try remounting tmpdir with a
|
1236
|
+
# memory based filesystem (such as tmpfs). STILL slow? then no way but
|
1237
|
+
# rewrite it with c :)
|
1238
|
+
#
|
1239
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#120
|
1240
|
+
def create_v1(clock = T.unsafe(nil), time = T.unsafe(nil), mac_addr = T.unsafe(nil)); end
|
1241
|
+
|
1242
|
+
# UUID generation using MD5 (for backward compat.)
|
1243
|
+
#
|
1244
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#70
|
1245
|
+
def create_v3(str, namespace); end
|
1246
|
+
|
1247
|
+
# UUID generation using random-number generator. From it's random
|
1248
|
+
# nature, there's no warranty that the created ID is really universaly
|
1249
|
+
# unique.
|
1250
|
+
#
|
1251
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#85
|
1252
|
+
def create_v4; end
|
1253
|
+
|
1254
|
+
# UUID generation using SHA1. Recommended over create_md5.
|
1255
|
+
# Namespace object is another UUID, some of them are pre-defined below.
|
1256
|
+
#
|
1257
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#57
|
1258
|
+
def create_v5(str, namespace); end
|
1259
|
+
|
1260
|
+
def inspect; end
|
1261
|
+
def keyword_init?; end
|
1262
|
+
def members; end
|
1263
|
+
|
1264
|
+
# The 'primitive constructor' of this class
|
1265
|
+
# Note UUID.pack(uuid.unpack) == uuid
|
1266
|
+
#
|
1267
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#190
|
1268
|
+
def pack(tl, tm, th, ch, cl, n); end
|
1269
|
+
|
1270
|
+
# A simple GUID parser: just ignores unknown characters and convert
|
1271
|
+
# hexadecimal dump into 16-octet object.
|
1272
|
+
#
|
1273
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#179
|
1274
|
+
def parse(obj); end
|
1275
|
+
|
1276
|
+
private
|
1277
|
+
|
1278
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#39
|
1279
|
+
def mask(v, str); end
|
1280
|
+
|
1281
|
+
def new(*_arg0); end
|
1282
|
+
|
1283
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#99
|
1284
|
+
def read_state(fp); end
|
1285
|
+
|
1286
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#104
|
1287
|
+
def write_state(fp, c, m); end
|
1288
|
+
end
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# Pre-defined UUID Namespaces described in RFC4122 Appendix C.
|
1292
|
+
#
|
1293
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#252
|
1294
|
+
JSON::Util::UUID::NameSpace_DNS = T.let(T.unsafe(nil), JSON::Util::UUID)
|
1295
|
+
|
1296
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#254
|
1297
|
+
JSON::Util::UUID::NameSpace_OID = T.let(T.unsafe(nil), JSON::Util::UUID)
|
1298
|
+
|
1299
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#253
|
1300
|
+
JSON::Util::UUID::NameSpace_URL = T.let(T.unsafe(nil), JSON::Util::UUID)
|
1301
|
+
|
1302
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#255
|
1303
|
+
JSON::Util::UUID::NameSpace_X500 = T.let(T.unsafe(nil), JSON::Util::UUID)
|
1304
|
+
|
1305
|
+
# The Nil UUID in RFC4122 Section 4.1.7
|
1306
|
+
#
|
1307
|
+
# source://json-schema//lib/json-schema/util/uuid.rb#258
|
1308
|
+
JSON::Util::UUID::Nil = T.let(T.unsafe(nil), JSON::Util::UUID)
|
1309
|
+
|
1310
|
+
# source://json-schema//lib/json-schema/validator.rb#19
|
1311
|
+
class JSON::Validator
|
1312
|
+
# @return [Validator] a new instance of Validator
|
1313
|
+
#
|
1314
|
+
# source://json-schema//lib/json-schema/validator.rb#43
|
1315
|
+
def initialize(schema_data, opts = T.unsafe(nil)); end
|
1316
|
+
|
1317
|
+
# Build all schemas with IDs, mapping out the namespace
|
1318
|
+
#
|
1319
|
+
# source://json-schema//lib/json-schema/validator.rb#150
|
1320
|
+
def build_schemas(parent_schema); end
|
1321
|
+
|
1322
|
+
# Either load a reference schema or create a new schema
|
1323
|
+
#
|
1324
|
+
# source://json-schema//lib/json-schema/validator.rb#221
|
1325
|
+
def handle_schema(parent_schema, obj); end
|
1326
|
+
|
1327
|
+
# source://json-schema//lib/json-schema/validator.rb#137
|
1328
|
+
def load_ref_schema(parent_schema, ref); end
|
1329
|
+
|
1330
|
+
# source://json-schema//lib/json-schema/validator.rb#77
|
1331
|
+
def schema_from_fragment(base_schema, fragment); end
|
1332
|
+
|
1333
|
+
# Run a simple true/false validation of data against a schema
|
1334
|
+
#
|
1335
|
+
# source://json-schema//lib/json-schema/validator.rb#112
|
1336
|
+
def validate(data); end
|
1337
|
+
|
1338
|
+
# source://json-schema//lib/json-schema/validator.rb#232
|
1339
|
+
def validation_error(error); end
|
1340
|
+
|
1341
|
+
# source://json-schema//lib/json-schema/validator.rb#236
|
1342
|
+
def validation_errors; end
|
1343
|
+
|
1344
|
+
private
|
1345
|
+
|
1346
|
+
# source://json-schema//lib/json-schema/validator.rb#597
|
1347
|
+
def custom_open(uri); end
|
1348
|
+
|
1349
|
+
# source://json-schema//lib/json-schema/validator.rb#521
|
1350
|
+
def fake_uuid(schema); end
|
1351
|
+
|
1352
|
+
# source://json-schema//lib/json-schema/validator.rb#572
|
1353
|
+
def initialize_data(data); end
|
1354
|
+
|
1355
|
+
# source://json-schema//lib/json-schema/validator.rb#525
|
1356
|
+
def initialize_schema(schema, default_validator); end
|
1357
|
+
|
1358
|
+
# source://json-schema//lib/json-schema/validator.rb#513
|
1359
|
+
def serialize(schema); end
|
1360
|
+
|
1361
|
+
class << self
|
1362
|
+
# source://json-schema//lib/json-schema/validator.rb#309
|
1363
|
+
def add_schema(schema); end
|
1364
|
+
|
1365
|
+
# source://json-schema//lib/json-schema/validator.rb#328
|
1366
|
+
def cache_schemas=(val); end
|
1367
|
+
|
1368
|
+
# source://json-schema//lib/json-schema/validator.rb#301
|
1369
|
+
def clear_cache; end
|
1370
|
+
|
1371
|
+
# source://json-schema//lib/json-schema/validator.rb#337
|
1372
|
+
def default_validator; end
|
1373
|
+
|
1374
|
+
# source://json-schema//lib/json-schema/validator.rb#388
|
1375
|
+
def deregister_format_validator(format, versions = T.unsafe(nil)); end
|
1376
|
+
|
1377
|
+
# source://json-schema//lib/json-schema/validator.rb#275
|
1378
|
+
def fully_validate(schema, data, opts = T.unsafe(nil)); end
|
1379
|
+
|
1380
|
+
# source://json-schema//lib/json-schema/validator.rb#285
|
1381
|
+
def fully_validate_json(schema, data, opts = T.unsafe(nil)); end
|
1382
|
+
|
1383
|
+
# source://json-schema//lib/json-schema/validator.rb#279
|
1384
|
+
def fully_validate_schema(schema, opts = T.unsafe(nil)); end
|
1385
|
+
|
1386
|
+
# source://json-schema//lib/json-schema/validator.rb#289
|
1387
|
+
def fully_validate_uri(schema, data, opts = T.unsafe(nil)); end
|
1388
|
+
|
1389
|
+
# source://json-schema//lib/json-schema/validator.rb#402
|
1390
|
+
def json_backend; end
|
1391
|
+
|
1392
|
+
# source://json-schema//lib/json-schema/validator.rb#410
|
1393
|
+
def json_backend=(backend); end
|
1394
|
+
|
1395
|
+
# source://json-schema//lib/json-schema/validator.rb#453
|
1396
|
+
def merge_missing_values(source, destination); end
|
1397
|
+
|
1398
|
+
# source://json-schema//lib/json-schema/validator.rb#424
|
1399
|
+
def parse(s); end
|
1400
|
+
|
1401
|
+
# source://json-schema//lib/json-schema/validator.rb#376
|
1402
|
+
def register_default_validator(v); end
|
1403
|
+
|
1404
|
+
# source://json-schema//lib/json-schema/validator.rb#380
|
1405
|
+
def register_format_validator(format, validation_proc, versions = T.unsafe(nil)); end
|
1406
|
+
|
1407
|
+
# source://json-schema//lib/json-schema/validator.rb#372
|
1408
|
+
def register_validator(v); end
|
1409
|
+
|
1410
|
+
# source://json-schema//lib/json-schema/validator.rb#395
|
1411
|
+
def restore_default_formats(versions = T.unsafe(nil)); end
|
1412
|
+
|
1413
|
+
# source://json-schema//lib/json-schema/validator.rb#313
|
1414
|
+
def schema_for_uri(uri); end
|
1415
|
+
|
1416
|
+
# source://json-schema//lib/json-schema/validator.rb#323
|
1417
|
+
def schema_key_for(uri); end
|
1418
|
+
|
1419
|
+
# @return [Boolean]
|
1420
|
+
#
|
1421
|
+
# source://json-schema//lib/json-schema/validator.rb#319
|
1422
|
+
def schema_loaded?(schema_uri); end
|
1423
|
+
|
1424
|
+
# source://json-schema//lib/json-schema/validator.rb#293
|
1425
|
+
def schema_reader; end
|
1426
|
+
|
1427
|
+
# source://json-schema//lib/json-schema/validator.rb#297
|
1428
|
+
def schema_reader=(reader); end
|
1429
|
+
|
1430
|
+
# source://json-schema//lib/json-schema/validator.rb#305
|
1431
|
+
def schemas; end
|
1432
|
+
|
1433
|
+
# source://json-schema//lib/json-schema/validator.rb#241
|
1434
|
+
def validate(schema, data, opts = T.unsafe(nil)); end
|
1435
|
+
|
1436
|
+
# source://json-schema//lib/json-schema/validator.rb#257
|
1437
|
+
def validate!(schema, data, opts = T.unsafe(nil)); end
|
1438
|
+
|
1439
|
+
# source://json-schema//lib/json-schema/validator.rb#262
|
1440
|
+
def validate2(schema, data, opts = T.unsafe(nil)); end
|
1441
|
+
|
1442
|
+
# source://json-schema//lib/json-schema/validator.rb#249
|
1443
|
+
def validate_json(schema, data, opts = T.unsafe(nil)); end
|
1444
|
+
|
1445
|
+
# source://json-schema//lib/json-schema/validator.rb#267
|
1446
|
+
def validate_json!(schema, data, opts = T.unsafe(nil)); end
|
1447
|
+
|
1448
|
+
# source://json-schema//lib/json-schema/validator.rb#253
|
1449
|
+
def validate_uri(schema, data, opts = T.unsafe(nil)); end
|
1450
|
+
|
1451
|
+
# source://json-schema//lib/json-schema/validator.rb#271
|
1452
|
+
def validate_uri!(schema, data, opts = T.unsafe(nil)); end
|
1453
|
+
|
1454
|
+
# source://json-schema//lib/json-schema/validator.rb#367
|
1455
|
+
def validator_for(schema_uri); end
|
1456
|
+
|
1457
|
+
# source://json-schema//lib/json-schema/validator.rb#353
|
1458
|
+
def validator_for_name(schema_name, raise_not_found = T.unsafe(nil)); end
|
1459
|
+
|
1460
|
+
# source://json-schema//lib/json-schema/validator.rb#341
|
1461
|
+
def validator_for_uri(schema_uri, raise_not_found = T.unsafe(nil)); end
|
1462
|
+
|
1463
|
+
# source://json-schema//lib/json-schema/validator.rb#333
|
1464
|
+
def validators; end
|
1465
|
+
end
|
1466
|
+
end
|