fast_json-schema 0.1.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 +7 -0
- data/.rspec +3 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Dockerfile +17 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +68 -0
- data/LICENSE.txt +21 -0
- data/README.md +156 -0
- data/Rakefile +60 -0
- data/build-deps +3 -0
- data/data/invalid.json +31 -0
- data/data/schema.json +150 -0
- data/data/valid.json +49 -0
- data/ext/fast_json/schema/all_of.c +23 -0
- data/ext/fast_json/schema/all_of.h +4 -0
- data/ext/fast_json/schema/any_of.c +22 -0
- data/ext/fast_json/schema/any_of.h +4 -0
- data/ext/fast_json/schema/compiled_schema.c +503 -0
- data/ext/fast_json/schema/compiled_schema.h +10 -0
- data/ext/fast_json/schema/context.c +78 -0
- data/ext/fast_json/schema/error.c +26 -0
- data/ext/fast_json/schema/error.h +5 -0
- data/ext/fast_json/schema/extconf.rb +7 -0
- data/ext/fast_json/schema/formats/custom_format.c +63 -0
- data/ext/fast_json/schema/formats/custom_format.h +4 -0
- data/ext/fast_json/schema/formats/date.c +48 -0
- data/ext/fast_json/schema/formats/date.h +5 -0
- data/ext/fast_json/schema/formats/date_time.c +22 -0
- data/ext/fast_json/schema/formats/date_time.h +4 -0
- data/ext/fast_json/schema/formats/email.c +8 -0
- data/ext/fast_json/schema/formats/email.h +4 -0
- data/ext/fast_json/schema/formats/format.c +68 -0
- data/ext/fast_json/schema/formats/format.h +4 -0
- data/ext/fast_json/schema/formats/hostname.c +8 -0
- data/ext/fast_json/schema/formats/hostname.h +4 -0
- data/ext/fast_json/schema/formats/idn_email.c +8 -0
- data/ext/fast_json/schema/formats/idn_email.h +4 -0
- data/ext/fast_json/schema/formats/idn_hostname.c +8 -0
- data/ext/fast_json/schema/formats/idn_hostname.h +4 -0
- data/ext/fast_json/schema/formats/ipv4.c +8 -0
- data/ext/fast_json/schema/formats/ipv4.h +4 -0
- data/ext/fast_json/schema/formats/ipv6.c +8 -0
- data/ext/fast_json/schema/formats/ipv6.h +4 -0
- data/ext/fast_json/schema/formats/iri.c +8 -0
- data/ext/fast_json/schema/formats/iri.h +4 -0
- data/ext/fast_json/schema/formats/iri_reference.c +8 -0
- data/ext/fast_json/schema/formats/iri_reference.h +4 -0
- data/ext/fast_json/schema/formats/json_pointer.c +8 -0
- data/ext/fast_json/schema/formats/json_pointer.h +4 -0
- data/ext/fast_json/schema/formats/regex.c +27 -0
- data/ext/fast_json/schema/formats/regex.h +4 -0
- data/ext/fast_json/schema/formats/relative_json_pointer.c +57 -0
- data/ext/fast_json/schema/formats/relative_json_pointer.h +4 -0
- data/ext/fast_json/schema/formats/time.c +65 -0
- data/ext/fast_json/schema/formats/time.h +5 -0
- data/ext/fast_json/schema/formats/uri.c +8 -0
- data/ext/fast_json/schema/formats/uri.h +4 -0
- data/ext/fast_json/schema/formats/uri_reference.c +8 -0
- data/ext/fast_json/schema/formats/uri_reference.h +4 -0
- data/ext/fast_json/schema/formats/uri_template.c +8 -0
- data/ext/fast_json/schema/formats/uri_template.h +4 -0
- data/ext/fast_json/schema/formats/utils/addr_spec_parser.c +342 -0
- data/ext/fast_json/schema/formats/utils/addr_spec_parser.h +16 -0
- data/ext/fast_json/schema/formats/utils/hostname_parser.c +113 -0
- data/ext/fast_json/schema/formats/utils/hostname_parser.h +17 -0
- data/ext/fast_json/schema/formats/utils/ip_parser.c +126 -0
- data/ext/fast_json/schema/formats/utils/ip_parser.h +25 -0
- data/ext/fast_json/schema/formats/utils/json_pointer_parser.c +45 -0
- data/ext/fast_json/schema/formats/utils/json_pointer_parser.h +20 -0
- data/ext/fast_json/schema/formats/utils/uri_parser.c +605 -0
- data/ext/fast_json/schema/formats/utils/uri_parser.h +20 -0
- data/ext/fast_json/schema/formats/utils/uri_template_parser.c +235 -0
- data/ext/fast_json/schema/formats/utils/uri_template_parser.h +18 -0
- data/ext/fast_json/schema/formats/utils/utf8.c +73 -0
- data/ext/fast_json/schema/formats/utils/utf8.h +17 -0
- data/ext/fast_json/schema/if.c +31 -0
- data/ext/fast_json/schema/if.h +4 -0
- data/ext/fast_json/schema/is_valid.c +124 -0
- data/ext/fast_json/schema/is_valid.h +6 -0
- data/ext/fast_json/schema/keywords.c +220 -0
- data/ext/fast_json/schema/keywords.h +60 -0
- data/ext/fast_json/schema/nested_schemas.c +68 -0
- data/ext/fast_json/schema/nested_schemas.h +4 -0
- data/ext/fast_json/schema/not.c +11 -0
- data/ext/fast_json/schema/not.h +4 -0
- data/ext/fast_json/schema/one_of.c +23 -0
- data/ext/fast_json/schema/one_of.h +4 -0
- data/ext/fast_json/schema/path.c +44 -0
- data/ext/fast_json/schema/path.h +5 -0
- data/ext/fast_json/schema/properties_val.c +103 -0
- data/ext/fast_json/schema/properties_val.h +6 -0
- data/ext/fast_json/schema/ref.c +7 -0
- data/ext/fast_json/schema/ref.h +4 -0
- data/ext/fast_json/schema/ref_resolver.c +85 -0
- data/ext/fast_json/schema/ref_resolver.h +5 -0
- data/ext/fast_json/schema/schema.c +68 -0
- data/ext/fast_json/schema/schema_collection.c +29 -0
- data/ext/fast_json/schema/schema_collection.h +3 -0
- data/ext/fast_json/schema/types/compiled_schema.h +96 -0
- data/ext/fast_json/schema/types/context.h +27 -0
- data/ext/fast_json/schema/validate.c +63 -0
- data/ext/fast_json/schema/validate.h +19 -0
- data/ext/fast_json/schema/validate_array.c +130 -0
- data/ext/fast_json/schema/validate_array.h +4 -0
- data/ext/fast_json/schema/validate_bool.c +7 -0
- data/ext/fast_json/schema/validate_bool.h +4 -0
- data/ext/fast_json/schema/validate_integer.c +52 -0
- data/ext/fast_json/schema/validate_integer.h +4 -0
- data/ext/fast_json/schema/validate_null.c +7 -0
- data/ext/fast_json/schema/validate_null.h +4 -0
- data/ext/fast_json/schema/validate_number.c +62 -0
- data/ext/fast_json/schema/validate_number.h +4 -0
- data/ext/fast_json/schema/validate_object.c +159 -0
- data/ext/fast_json/schema/validate_object.h +4 -0
- data/ext/fast_json/schema/validate_string.c +32 -0
- data/ext/fast_json/schema/validate_string.h +4 -0
- data/ext/fast_json/schema/value_pointer_caster.h +9 -0
- data/fast_json-schema.gemspec +31 -0
- data/lib/fast_json/schema/error.rb +16 -0
- data/lib/fast_json/schema/version.rb +7 -0
- data/lib/fast_json/schema.rb +50 -0
- data/makefile +10 -0
- metadata +164 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
#include "validate_object.h"
|
|
2
|
+
#include "error.h"
|
|
3
|
+
|
|
4
|
+
struct properties_memo_S {
|
|
5
|
+
VALUE schema;
|
|
6
|
+
CompiledSchema *compiled_schema;
|
|
7
|
+
Context *context;
|
|
8
|
+
bool validated;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
struct pattern_properties_memo_S {
|
|
12
|
+
VALUE schema;
|
|
13
|
+
Context *context;
|
|
14
|
+
VALUE key;
|
|
15
|
+
VALUE value;
|
|
16
|
+
bool validated;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
struct dependencies_memo_S {
|
|
20
|
+
VALUE schema;
|
|
21
|
+
VALUE data;
|
|
22
|
+
Context *context;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
static int validate_property_by_pattern(VALUE regexp, VALUE compiled_schema_obj, VALUE data) {
|
|
26
|
+
struct pattern_properties_memo_S *memo = (struct pattern_properties_memo_S *)data;
|
|
27
|
+
|
|
28
|
+
VALUE match = rb_reg_match(regexp, memo->key);
|
|
29
|
+
|
|
30
|
+
if(NIL_P(match)) return ST_CONTINUE;
|
|
31
|
+
|
|
32
|
+
CompiledSchema *compiled_schema;
|
|
33
|
+
GetCompiledSchema(compiled_schema_obj, compiled_schema);
|
|
34
|
+
|
|
35
|
+
compiled_schema->validation_function(memo->schema, compiled_schema, memo->value, memo->context);
|
|
36
|
+
|
|
37
|
+
memo->validated = true;
|
|
38
|
+
|
|
39
|
+
return ST_STOP;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static void validate_by_pattern_properties_keyword(struct properties_memo_S *memo, VALUE key, VALUE value) {
|
|
43
|
+
VALUE patternProperties_val = memo->compiled_schema->patternProperties_val;
|
|
44
|
+
struct pattern_properties_memo_S pattern_memo = { memo->schema, memo->context, key, value, false };
|
|
45
|
+
|
|
46
|
+
rb_hash_foreach(patternProperties_val, validate_property_by_pattern, (VALUE)&pattern_memo);
|
|
47
|
+
|
|
48
|
+
memo->validated |= pattern_memo.validated;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static void validate_by_properties_keyword(struct properties_memo_S *memo, VALUE key, VALUE value) {
|
|
52
|
+
VALUE properties_val = memo->compiled_schema->properties_val;
|
|
53
|
+
VALUE compiled_schema_obj = rb_hash_aref(properties_val, key);
|
|
54
|
+
|
|
55
|
+
if(NIL_P(compiled_schema_obj)) return;
|
|
56
|
+
|
|
57
|
+
CompiledSchema *compiled_schema;
|
|
58
|
+
GetCompiledSchema(compiled_schema_obj, compiled_schema);
|
|
59
|
+
|
|
60
|
+
compiled_schema->validation_function(memo->schema, compiled_schema, value, memo->context);
|
|
61
|
+
|
|
62
|
+
memo->validated = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static int validate_object_property(VALUE key, VALUE value, VALUE data) {
|
|
66
|
+
if(!RB_TYPE_P(key, T_STRING)) return ST_CONTINUE;
|
|
67
|
+
|
|
68
|
+
struct properties_memo_S *memo = (struct properties_memo_S*)data;
|
|
69
|
+
|
|
70
|
+
VALUE properties_val = memo->compiled_schema->properties_val;
|
|
71
|
+
VALUE patternProperties_val = memo->compiled_schema->patternProperties_val;
|
|
72
|
+
CompiledSchema *propertyNames_schema = memo->compiled_schema->propertyNames_schema;
|
|
73
|
+
CompiledSchema *additionalProperties_schema = memo->compiled_schema->additionalProperties_schema;
|
|
74
|
+
|
|
75
|
+
ADD_TO_CONTEXT(memo->context, key);
|
|
76
|
+
|
|
77
|
+
memo->validated = false;
|
|
78
|
+
|
|
79
|
+
if(propertyNames_schema != NULL)
|
|
80
|
+
propertyNames_schema->validation_function(memo->schema, propertyNames_schema, key, memo->context);
|
|
81
|
+
|
|
82
|
+
if(properties_val != Qundef)
|
|
83
|
+
validate_by_properties_keyword(memo, key, value);
|
|
84
|
+
|
|
85
|
+
if(patternProperties_val != Qundef)
|
|
86
|
+
validate_by_pattern_properties_keyword(memo, key, value);
|
|
87
|
+
|
|
88
|
+
if(additionalProperties_schema != NULL && !memo->validated)
|
|
89
|
+
additionalProperties_schema->validation_function(memo->schema, additionalProperties_schema, value, memo->context);
|
|
90
|
+
|
|
91
|
+
return ST_CONTINUE;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static void validate_properties(VALUE schema, CompiledSchema *compiled_schema, VALUE data, Context *context) {
|
|
95
|
+
struct properties_memo_S memo = { schema, compiled_schema, context };
|
|
96
|
+
|
|
97
|
+
INCR_CONTEXT(context);
|
|
98
|
+
|
|
99
|
+
rb_hash_foreach(data, validate_object_property, (VALUE)&memo);
|
|
100
|
+
|
|
101
|
+
DECR_CONTEXT(context);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static void validate_required(VALUE schema, CompiledSchema *compiled_schema, VALUE data, Context *context) {
|
|
105
|
+
long i;
|
|
106
|
+
VALUE required_val = compiled_schema->required_val;
|
|
107
|
+
|
|
108
|
+
for(i = 0; i < RARRAY_LEN(required_val); i++) {
|
|
109
|
+
VALUE entry = rb_ary_entry(required_val, i);
|
|
110
|
+
|
|
111
|
+
if(rb_hash_lookup2(data, entry, Qundef) == Qundef)
|
|
112
|
+
yield_error(compiled_schema, data, context, "required");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static int validate_dependency(VALUE key, VALUE value, VALUE data) {
|
|
117
|
+
struct dependencies_memo_S *memo = (struct dependencies_memo_S *)data;
|
|
118
|
+
|
|
119
|
+
VALUE hash_value = rb_hash_lookup2(memo->data, key, Qundef);
|
|
120
|
+
|
|
121
|
+
if(hash_value != Qundef) {
|
|
122
|
+
CompiledSchema *dependency_schema;
|
|
123
|
+
GetCompiledSchema(value, dependency_schema);
|
|
124
|
+
|
|
125
|
+
dependency_schema->validation_function(memo->schema, dependency_schema, memo->data, memo->context);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return ST_CONTINUE;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static void validate_dependencies(VALUE schema, CompiledSchema *compiled_schema, VALUE data, Context *context) {
|
|
132
|
+
struct dependencies_memo_S memo = { schema, data, context };
|
|
133
|
+
|
|
134
|
+
rb_hash_foreach(compiled_schema->dependencies_val, validate_dependency, (VALUE)&memo);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
void validate_object(VALUE schema, CompiledSchema *compiled_schema, VALUE data, Context *context) {
|
|
138
|
+
if(!RB_TYPE_P(data, T_HASH))
|
|
139
|
+
return yield_error(compiled_schema, data, context, "type_object");
|
|
140
|
+
|
|
141
|
+
if(compiled_schema->maxProperties_val != Qundef) {
|
|
142
|
+
if(RHASH_SIZE(data) > NUM2ULONG(compiled_schema->maxProperties_val))
|
|
143
|
+
yield_error(compiled_schema, data, context, "maxProperties");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if(compiled_schema->minProperties_val != Qundef) {
|
|
147
|
+
if(RHASH_SIZE(data) < NUM2ULONG(compiled_schema->minProperties_val))
|
|
148
|
+
yield_error(compiled_schema, data, context, "minProperties");
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if(compiled_schema->required_val != Qundef)
|
|
152
|
+
validate_required(schema, compiled_schema, data, context);
|
|
153
|
+
|
|
154
|
+
if(compiled_schema->dependencies_val != Qundef)
|
|
155
|
+
validate_dependencies(schema, compiled_schema, data, context);
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
validate_properties(schema, compiled_schema, data, context);
|
|
159
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#include "validate_string.h"
|
|
2
|
+
#include "error.h"
|
|
3
|
+
#include "formats/format.h"
|
|
4
|
+
|
|
5
|
+
void validate_string(VALUE schema, CompiledSchema *compiled_schema, VALUE data, Context *context) {
|
|
6
|
+
if(!RB_TYPE_P(data, T_STRING))
|
|
7
|
+
return yield_error(compiled_schema, data, context, "type_string");
|
|
8
|
+
|
|
9
|
+
if(compiled_schema->maxLength_val != Qundef) {
|
|
10
|
+
VALUE string_length = rb_str_length(data);
|
|
11
|
+
|
|
12
|
+
if(NUM2LONG(string_length) > NUM2LONG(compiled_schema->maxLength_val))
|
|
13
|
+
yield_error(compiled_schema, data, context, "maxLength");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if(compiled_schema->minLength_val != Qundef) {
|
|
17
|
+
VALUE string_length = rb_str_length(data);
|
|
18
|
+
|
|
19
|
+
if(NUM2LONG(string_length) < NUM2LONG(compiled_schema->minLength_val))
|
|
20
|
+
yield_error(compiled_schema, data, context, "minLength");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if(compiled_schema->pattern_val != Qundef) {
|
|
24
|
+
VALUE regexp = rb_reg_new_str(compiled_schema->pattern_val, 0);
|
|
25
|
+
VALUE result = rb_reg_match(regexp, data);
|
|
26
|
+
|
|
27
|
+
if(NIL_P(result))
|
|
28
|
+
yield_error(compiled_schema, data, context, "pattern");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
compiled_schema->format_validation_function(schema, compiled_schema, data, context);
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/fast_json/schema/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "fast_json-schema"
|
|
7
|
+
spec.version = FastJSON::Schema::VERSION
|
|
8
|
+
spec.authors = ["Mehmet Emin INAC"]
|
|
9
|
+
spec.email = ["mehmetemininac@gmail.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Fastest JSON schema validation library"
|
|
12
|
+
spec.description = "Validates JSON schemas against given meta-schema"
|
|
13
|
+
spec.homepage = "https://github.com/meinac/fast_json-schema"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
16
|
+
|
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
|
+
|
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
+
spec.files = Dir.chdir(__dir__) do
|
|
23
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
spec.bindir = "exe"
|
|
28
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
|
+
spec.require_paths = ["lib"]
|
|
30
|
+
spec.extensions = ["ext/fast_json/schema/extconf.rb"]
|
|
31
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class FastJSON
|
|
4
|
+
class Schema
|
|
5
|
+
class Error
|
|
6
|
+
def initialize(schema_path, data, data_path, type)
|
|
7
|
+
@schema_path = schema_path
|
|
8
|
+
@data = data
|
|
9
|
+
@data_path = data_path
|
|
10
|
+
@type = type
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :schema_path, :data, :data_path, :type
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "schema/version"
|
|
4
|
+
require_relative "schema/error"
|
|
5
|
+
require_relative "schema/ext/schema"
|
|
6
|
+
|
|
7
|
+
class FastJSON
|
|
8
|
+
class Schema
|
|
9
|
+
class << self
|
|
10
|
+
def create(ruby_schema, formats: nil)
|
|
11
|
+
new(ruby_schema, formats: formats).compile
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def initialize(ruby_schema, formats: nil)
|
|
16
|
+
@ruby_schema = ruby_schema
|
|
17
|
+
@custom_formats = validate_custom_formats!(formats)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def invalid?(data)
|
|
21
|
+
!valid?(data)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def validate_custom_formats!(formats)
|
|
27
|
+
return if formats.nil?
|
|
28
|
+
|
|
29
|
+
unless formats.is_a?(Hash)
|
|
30
|
+
raise TypeError, "formats must be a Hash, got #{formats.class}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
validate_each_custom_format!(formats)
|
|
34
|
+
|
|
35
|
+
formats
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def validate_each_custom_format!(formats)
|
|
39
|
+
formats.each do |name, callable|
|
|
40
|
+
unless name.is_a?(String)
|
|
41
|
+
raise TypeError, "format name must be a String, got #{name.class}"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
unless callable.respond_to?(:call)
|
|
45
|
+
raise TypeError, "format validator for #{name.inspect} must respond to :call"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
data/makefile
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
IMAGE_TAG=fast_json-schema-docker
|
|
2
|
+
|
|
3
|
+
WITH_VOLUMES=-v ${PWD}/:/fast_json-schema/ -v fast_json-schema-bundle:/bundle
|
|
4
|
+
WITH_DEBUG_FLAGS=--cap-add=SYS_PTRACE --security-opt seccomp=unconfined
|
|
5
|
+
|
|
6
|
+
build-image:
|
|
7
|
+
docker build . -t ${IMAGE_TAG} --rm
|
|
8
|
+
|
|
9
|
+
sh:
|
|
10
|
+
docker run -it --rm ${WITH_VOLUMES} ${WITH_DEBUG_FLAGS} ${IMAGE_TAG} sh
|
metadata
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: fast_json-schema
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Mehmet Emin INAC
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Validates JSON schemas against given meta-schema
|
|
13
|
+
email:
|
|
14
|
+
- mehmetemininac@gmail.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions:
|
|
17
|
+
- ext/fast_json/schema/extconf.rb
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- ".rspec"
|
|
21
|
+
- CODE_OF_CONDUCT.md
|
|
22
|
+
- Dockerfile
|
|
23
|
+
- Gemfile
|
|
24
|
+
- Gemfile.lock
|
|
25
|
+
- LICENSE.txt
|
|
26
|
+
- README.md
|
|
27
|
+
- Rakefile
|
|
28
|
+
- build-deps
|
|
29
|
+
- data/invalid.json
|
|
30
|
+
- data/schema.json
|
|
31
|
+
- data/valid.json
|
|
32
|
+
- ext/fast_json/schema/all_of.c
|
|
33
|
+
- ext/fast_json/schema/all_of.h
|
|
34
|
+
- ext/fast_json/schema/any_of.c
|
|
35
|
+
- ext/fast_json/schema/any_of.h
|
|
36
|
+
- ext/fast_json/schema/compiled_schema.c
|
|
37
|
+
- ext/fast_json/schema/compiled_schema.h
|
|
38
|
+
- ext/fast_json/schema/context.c
|
|
39
|
+
- ext/fast_json/schema/error.c
|
|
40
|
+
- ext/fast_json/schema/error.h
|
|
41
|
+
- ext/fast_json/schema/extconf.rb
|
|
42
|
+
- ext/fast_json/schema/formats/custom_format.c
|
|
43
|
+
- ext/fast_json/schema/formats/custom_format.h
|
|
44
|
+
- ext/fast_json/schema/formats/date.c
|
|
45
|
+
- ext/fast_json/schema/formats/date.h
|
|
46
|
+
- ext/fast_json/schema/formats/date_time.c
|
|
47
|
+
- ext/fast_json/schema/formats/date_time.h
|
|
48
|
+
- ext/fast_json/schema/formats/email.c
|
|
49
|
+
- ext/fast_json/schema/formats/email.h
|
|
50
|
+
- ext/fast_json/schema/formats/format.c
|
|
51
|
+
- ext/fast_json/schema/formats/format.h
|
|
52
|
+
- ext/fast_json/schema/formats/hostname.c
|
|
53
|
+
- ext/fast_json/schema/formats/hostname.h
|
|
54
|
+
- ext/fast_json/schema/formats/idn_email.c
|
|
55
|
+
- ext/fast_json/schema/formats/idn_email.h
|
|
56
|
+
- ext/fast_json/schema/formats/idn_hostname.c
|
|
57
|
+
- ext/fast_json/schema/formats/idn_hostname.h
|
|
58
|
+
- ext/fast_json/schema/formats/ipv4.c
|
|
59
|
+
- ext/fast_json/schema/formats/ipv4.h
|
|
60
|
+
- ext/fast_json/schema/formats/ipv6.c
|
|
61
|
+
- ext/fast_json/schema/formats/ipv6.h
|
|
62
|
+
- ext/fast_json/schema/formats/iri.c
|
|
63
|
+
- ext/fast_json/schema/formats/iri.h
|
|
64
|
+
- ext/fast_json/schema/formats/iri_reference.c
|
|
65
|
+
- ext/fast_json/schema/formats/iri_reference.h
|
|
66
|
+
- ext/fast_json/schema/formats/json_pointer.c
|
|
67
|
+
- ext/fast_json/schema/formats/json_pointer.h
|
|
68
|
+
- ext/fast_json/schema/formats/regex.c
|
|
69
|
+
- ext/fast_json/schema/formats/regex.h
|
|
70
|
+
- ext/fast_json/schema/formats/relative_json_pointer.c
|
|
71
|
+
- ext/fast_json/schema/formats/relative_json_pointer.h
|
|
72
|
+
- ext/fast_json/schema/formats/time.c
|
|
73
|
+
- ext/fast_json/schema/formats/time.h
|
|
74
|
+
- ext/fast_json/schema/formats/uri.c
|
|
75
|
+
- ext/fast_json/schema/formats/uri.h
|
|
76
|
+
- ext/fast_json/schema/formats/uri_reference.c
|
|
77
|
+
- ext/fast_json/schema/formats/uri_reference.h
|
|
78
|
+
- ext/fast_json/schema/formats/uri_template.c
|
|
79
|
+
- ext/fast_json/schema/formats/uri_template.h
|
|
80
|
+
- ext/fast_json/schema/formats/utils/addr_spec_parser.c
|
|
81
|
+
- ext/fast_json/schema/formats/utils/addr_spec_parser.h
|
|
82
|
+
- ext/fast_json/schema/formats/utils/hostname_parser.c
|
|
83
|
+
- ext/fast_json/schema/formats/utils/hostname_parser.h
|
|
84
|
+
- ext/fast_json/schema/formats/utils/ip_parser.c
|
|
85
|
+
- ext/fast_json/schema/formats/utils/ip_parser.h
|
|
86
|
+
- ext/fast_json/schema/formats/utils/json_pointer_parser.c
|
|
87
|
+
- ext/fast_json/schema/formats/utils/json_pointer_parser.h
|
|
88
|
+
- ext/fast_json/schema/formats/utils/uri_parser.c
|
|
89
|
+
- ext/fast_json/schema/formats/utils/uri_parser.h
|
|
90
|
+
- ext/fast_json/schema/formats/utils/uri_template_parser.c
|
|
91
|
+
- ext/fast_json/schema/formats/utils/uri_template_parser.h
|
|
92
|
+
- ext/fast_json/schema/formats/utils/utf8.c
|
|
93
|
+
- ext/fast_json/schema/formats/utils/utf8.h
|
|
94
|
+
- ext/fast_json/schema/if.c
|
|
95
|
+
- ext/fast_json/schema/if.h
|
|
96
|
+
- ext/fast_json/schema/is_valid.c
|
|
97
|
+
- ext/fast_json/schema/is_valid.h
|
|
98
|
+
- ext/fast_json/schema/keywords.c
|
|
99
|
+
- ext/fast_json/schema/keywords.h
|
|
100
|
+
- ext/fast_json/schema/nested_schemas.c
|
|
101
|
+
- ext/fast_json/schema/nested_schemas.h
|
|
102
|
+
- ext/fast_json/schema/not.c
|
|
103
|
+
- ext/fast_json/schema/not.h
|
|
104
|
+
- ext/fast_json/schema/one_of.c
|
|
105
|
+
- ext/fast_json/schema/one_of.h
|
|
106
|
+
- ext/fast_json/schema/path.c
|
|
107
|
+
- ext/fast_json/schema/path.h
|
|
108
|
+
- ext/fast_json/schema/properties_val.c
|
|
109
|
+
- ext/fast_json/schema/properties_val.h
|
|
110
|
+
- ext/fast_json/schema/ref.c
|
|
111
|
+
- ext/fast_json/schema/ref.h
|
|
112
|
+
- ext/fast_json/schema/ref_resolver.c
|
|
113
|
+
- ext/fast_json/schema/ref_resolver.h
|
|
114
|
+
- ext/fast_json/schema/schema.c
|
|
115
|
+
- ext/fast_json/schema/schema_collection.c
|
|
116
|
+
- ext/fast_json/schema/schema_collection.h
|
|
117
|
+
- ext/fast_json/schema/types/compiled_schema.h
|
|
118
|
+
- ext/fast_json/schema/types/context.h
|
|
119
|
+
- ext/fast_json/schema/validate.c
|
|
120
|
+
- ext/fast_json/schema/validate.h
|
|
121
|
+
- ext/fast_json/schema/validate_array.c
|
|
122
|
+
- ext/fast_json/schema/validate_array.h
|
|
123
|
+
- ext/fast_json/schema/validate_bool.c
|
|
124
|
+
- ext/fast_json/schema/validate_bool.h
|
|
125
|
+
- ext/fast_json/schema/validate_integer.c
|
|
126
|
+
- ext/fast_json/schema/validate_integer.h
|
|
127
|
+
- ext/fast_json/schema/validate_null.c
|
|
128
|
+
- ext/fast_json/schema/validate_null.h
|
|
129
|
+
- ext/fast_json/schema/validate_number.c
|
|
130
|
+
- ext/fast_json/schema/validate_number.h
|
|
131
|
+
- ext/fast_json/schema/validate_object.c
|
|
132
|
+
- ext/fast_json/schema/validate_object.h
|
|
133
|
+
- ext/fast_json/schema/validate_string.c
|
|
134
|
+
- ext/fast_json/schema/validate_string.h
|
|
135
|
+
- ext/fast_json/schema/value_pointer_caster.h
|
|
136
|
+
- fast_json-schema.gemspec
|
|
137
|
+
- lib/fast_json/schema.rb
|
|
138
|
+
- lib/fast_json/schema/error.rb
|
|
139
|
+
- lib/fast_json/schema/version.rb
|
|
140
|
+
- makefile
|
|
141
|
+
homepage: https://github.com/meinac/fast_json-schema
|
|
142
|
+
licenses:
|
|
143
|
+
- MIT
|
|
144
|
+
metadata:
|
|
145
|
+
homepage_uri: https://github.com/meinac/fast_json-schema
|
|
146
|
+
source_code_uri: https://github.com/meinac/fast_json-schema
|
|
147
|
+
rdoc_options: []
|
|
148
|
+
require_paths:
|
|
149
|
+
- lib
|
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
|
+
requirements:
|
|
152
|
+
- - ">="
|
|
153
|
+
- !ruby/object:Gem::Version
|
|
154
|
+
version: 2.6.0
|
|
155
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
requirements: []
|
|
161
|
+
rubygems_version: 4.0.10
|
|
162
|
+
specification_version: 4
|
|
163
|
+
summary: Fastest JSON schema validation library
|
|
164
|
+
test_files: []
|