• Home
  • Raw
  • Download

Lines Matching +full:json +full:- +full:schema

9 #     http://www.apache.org/licenses/LICENSE-2.0
28 "--flatc",
31 parser.add_argument("--cpp-0x", action="store_true", help="use --cpp-std c++ox")
33 "--skip-monster-extra",
38 "--skip-gen-reflection",
72 def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path): argument
75 cmd += ["-o"] + [prefix]
77 cmd += ["-I"] + [include]
78 cmd += [schema] if isinstance(schema, str) else schema
84 # Generate the code for flatbuffers reflection schema
86 full_options = ["--no-prefix"] + options
91 schema="reflection.fbs",
101 def flatc_annotate(schema, file, include=None, cwd=tests_path): argument
104 cmd += ["-I"] + [include]
105 cmd += ["--annotate", schema, file]
114 BASE_OPTS = ["--reflect-names", "--gen-mutable", "--gen-object-api"]
115 NO_INCL_OPTS = BASE_OPTS + ["--no-includes"]
118 CS_OPTS = ["--csharp", "--cs-gen-json-serializer"]
120 "--cpp",
121 "--gen-compare",
122 "--cpp-ptr-type",
124 ] + (["--cpp-std", "c++0x"] if args.cpp_0x else [])
127 "--cpp",
128 "--cpp-std",
130 "--cpp-static-reflection",
131 "--gen-object-api",
134 "--rust",
135 "--gen-all",
136 "--gen-name-strings",
137 "--rust-module-root-file",
140 "--rust",
141 "--gen-all",
142 "--gen-name-strings",
143 "--rust-serialize",
144 "--rust-module-root-file",
146 TS_OPTS = ["--ts", "--gen-name-strings"]
147 LOBSTER_OPTS = ["--lobster"]
148 SWIFT_OPTS = ["--swift", "--gen-json-emit", "--bfbs-filenames", str(tests_path)]
150 "--swift",
151 "--gen-json-emit",
152 "--bfbs-filenames",
155 JAVA_OPTS = ["--java"]
156 KOTLIN_OPTS = ["--kotlin"]
157 PHP_OPTS = ["--php"]
158 DART_OPTS = ["--dart"]
159 PYTHON_OPTS = ["--python"]
160 BINARY_OPTS = ["-b", "--schema", "--bfbs-comments", "--bfbs-builtins"]
170 "--binary",
171 "--java",
172 "--kotlin",
173 "--dart",
174 "--go",
175 "--lobster",
176 "--php",
178 schema="monster_test.fbs",
180 data="monsterdata_test.json",
184 ["--lua", "--bfbs-filenames", str(tests_path)],
185 schema="monster_test.fbs",
190 NO_INCL_OPTS + CPP_OPTS + ["--grpc"],
191 schema="monster_test.fbs",
193 data="monsterdata_test.json",
198 schema="monster_test.fbs",
201 data="monsterdata_test.json",
206 schema="monster_test.fbs",
209 data="monsterdata_test.json",
213 options=BASE_OPTS + ["--python"],
214 schema="monster_test.fbs",
216 data="monsterdata_test.json",
220 options=BASE_OPTS + ["--python", "--gen-onefile"],
221 schema="monster_test.fbs",
223 data="monsterdata_test.json",
231 schema=[
240 schema="union_vector/union_vector.fbs",
244 BASE_OPTS + TS_OPTS + ["--gen-name-strings", "--gen-mutable"],
246 schema="monster_test.fbs",
251 ["--ts", "--gen-all", "--ts-flat-files"],
253 schema="monster_test.fbs",
254 prefix="ts/ts-flat-files"
258 BASE_OPTS + TS_OPTS + ["-b"],
260 schema="monster_test.fbs",
261 data="unicode_test.json",
265 BASE_OPTS + TS_OPTS + ["--gen-name-strings"],
267 schema="union_vector/union_vector.fbs",
274 schema="include_test/include_test1.fbs",
281 schema="include_test/sub/include_test2.fbs",
285 BINARY_OPTS + ["--bfbs-filenames", str(tests_path)],
287 schema="monster_test.fbs",
290 # Generate the annotated binary of the monster_test binary schema.
292 schema="../reflection/reflection.fbs",
298 schema="monster_test.fbs",
307 "--bfbs-comments",
308 "--bfbs-builtins",
309 "--bfbs-gen-embed",
310 "--bfbs-filenames",
314 schema="monster_test.fbs",
318 BINARY_OPTS + ["--bfbs-filenames", str(tests_path)],
320 schema="arrays_test.fbs",
324 ["--jsonschema", "--schema"],
326 schema="monster_test.fbs",
332 schema="monster_extra.fbs",
333 data="monsterdata_extra.json",
337 DART_OPTS + ["--gen-object-api"],
338 schema="monster_extra.fbs",
342 CPP_OPTS + CS_OPTS + NO_INCL_OPTS + JAVA_OPTS + ["--jsonschema", "--scoped-enums"],
343 schema="arrays_test.fbs",
349 schema="arrays_test.fbs",
354 schema="arrays_test.fbs",
360 flatc(["--java", "--kotlin", "--lobster", "--ts"], schema=optional_scalars_schema)
362 flatc(["--csharp", "--python", "--gen-object-api"], schema=optional_scalars_schema)
364 flatc(RUST_OPTS, prefix="optional_scalars", schema=optional_scalars_schema)
366 flatc(NO_INCL_OPTS + CPP_OPTS, schema=optional_scalars_schema)
371 flatc(["--csharp", "--gen-object-api"], schema=type_field_collsion_schema)
374 flatc(RUST_OPTS, prefix="more_defaults", schema="more_defaults.fbs")
376 # Generate the schema evolution tests
378 CPP_OPTS + ["--scoped-enums"],
380 schema=glob(tests_path, "evolution_test/evolution_v*.fbs"),
384 flatc(BASE_OPTS + CS_OPTS, schema="keyword_test.fbs")
385 flatc(RUST_OPTS, prefix="keyword_test", schema="keyword_test.fbs")
387 BASE_OPTS + CS_OPTS + ["--cs-global-alias", "--gen-onefile"],
389 schema=glob(tests_path, "nested_namespace_test/nested_namespace_test*.fbs"),
391 flatc(BASE_OPTS + DART_OPTS, prefix="../dart/test/", schema="keyword_test.fbs")
395 flatc(["--java", "--kotlin"], schema=dictionary_lookup_schema)
400 SWIFT_OPTS + BASE_OPTS + ["--grpc"],
401 schema="monster_test.fbs",
407 schema="union_vector/union_vector.fbs",
410 flatc(SWIFT_OPTS, schema="optional_scalars.fbs", prefix=swift_prefix)
411 flatc(SWIFT_OPTS, schema="vector_has_test.fbs", prefix=swift_prefix)
413 SWIFT_OPTS + ["--gen-object-api"],
414 schema="more_defaults.fbs",
419 schema="MutatingBool.fbs",
424 SWIFT_OPTS_CODE_GEN + BASE_OPTS + ["--grpc", "--swift-implementation-only"],
425 schema="test_import.fbs",
430 SWIFT_OPTS_CODE_GEN + NO_INCL_OPTS + ["--grpc"],
431 schema="test_no_include.fbs",
435 # --filename-suffix and --filename-ext tests
437 CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-ext", "hpp"],
440 schema="monster_test.fbs",
443 CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-suffix", "_suffix"],
446 schema="monster_test.fbs",
449 CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-suffix", "_suffix", "--filename-ext", "hpp"],
452 schema="monster_test.fbs",
459 schema="monster_test.fbs",
465 schema="optional_scalars.fbs",
470 schema="union_vector/union_vector.fbs",
477 flatc(RUST_OPTS + ["--no-leak-private-annotation", "--gen-object-api"], prefix="private_annotation_…
481 flatc(BASE_OPTS + CPP_OPTS + LOBSTER_OPTS, schema=samples_schema, cwd=samples_path)
482 flatc(RUST_OPTS, prefix="rust_generated", schema=samples_schema, cwd=samples_path)
484 BINARY_OPTS + ["--bfbs-filenames", str(samples_path)],
485 schema=samples_schema,
496 ["-c", "--cpp-std", "c++0x"], "include/flatbuffers", "reflection_generated.h"
500 flatc_reflection(["-p"], "python/flatbuffers", "reflection")
505 def flatc_annotate(schema, include=None, data=None, cwd=tests_path): argument
508 cmd += ["-I"] + [include]
509 cmd += ["--annotate", schema]
516 schema="monster_test.fbs", include="include_test", data="monsterdata_test.mon"