• Home
  • Raw
  • Download

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

9 #     http://www.apache.org/licenses/LICENSE-2.0
32 # Generate the code for flatbuffers reflection schema
34 full_options = ["--no-prefix"] + options
39 schema="reflection.fbs",
50 def flatc_annotate(schema, file, include=None, cwd=tests_path): argument
53 cmd += ["-I"] + [include]
54 cmd += ["--annotate", schema, file]
64 BASE_OPTS = ["--reflect-names", "--gen-mutable", "--gen-object-api"]
65 NO_INCL_OPTS = BASE_OPTS + ["--no-includes"]
68 CS_OPTS = ["--csharp", "--cs-gen-json-serializer"]
70 "--cpp",
71 "--gen-compare",
72 ] + (["--cpp-std", "c++0x"] if args.cpp_0x else [])
75 "--cpp",
76 "--cpp-std",
78 "--cpp-static-reflection",
79 "--gen-object-api",
82 "--rust",
83 "--gen-all",
84 "--gen-name-strings",
85 "--rust-module-root-file",
88 "--rust",
89 "--gen-all",
90 "--gen-name-strings",
91 "--rust-serialize",
92 "--rust-module-root-file",
94 TS_OPTS = ["--ts", "--gen-name-strings"]
95 LOBSTER_OPTS = ["--lobster"]
96 SWIFT_OPTS = ["--swift", "--gen-json-emit", "--bfbs-filenames", str(tests_path)]
98 "--swift",
99 "--gen-json-emit",
100 "--bfbs-filenames",
103 JAVA_OPTS = ["--java"]
104 KOTLIN_OPTS = ["--kotlin"]
105 PHP_OPTS = ["--php"]
106 DART_OPTS = ["--dart"]
107 PYTHON_OPTS = ["--python", "--python-typing"]
108 BINARY_OPTS = ["-b", "--schema", "--bfbs-comments", "--bfbs-builtins"]
109 PROTO_OPTS = ["--proto"]
118 "--binary",
119 "--java",
120 "--kotlin",
121 "--dart",
122 "--go",
123 "--lobster",
124 "--php",
126 schema="monster_test.fbs",
128 data="monsterdata_test.json",
133 schema="include_test/include_test1.fbs",
139 schema="include_test/sub/include_test2.fbs",
146 schema="../monster_test.fbs",
148 data="../monsterdata_test.json",
152 ["--lua", "--bfbs-filenames", str(tests_path)],
153 schema="monster_test.fbs",
158 NO_INCL_OPTS + CPP_OPTS + ["--grpc"],
159 schema="monster_test.fbs",
161 data="monsterdata_test.json",
166 schema="monster_test.fbs",
169 data="monsterdata_test.json",
174 schema="monster_test.fbs",
177 data="monsterdata_test.json",
181 options=BASE_OPTS + ["--python"],
182 schema="monster_test.fbs",
184 data="monsterdata_test.json",
188 options=BASE_OPTS + ["--python", "--gen-onefile"],
189 schema="monster_test.fbs",
191 data="monsterdata_test.json",
196 schema="prototest/test.proto",
204 schema=[
212 "--cpp",
213 "--reflect-names",
214 "--no-includes",
215 "--gen-mutable",
216 "--gen-object-api",
217 "--gen-compare",
218 "--gen-name-strings",
221 schema=[
230 schema="union_vector/union_vector.fbs",
237 schema="../union_vector/union_vector.fbs",
241 BASE_OPTS + TS_OPTS + ["--gen-name-strings", "--gen-mutable"],
244 schema="../monster_test.fbs",
248 BASE_OPTS + TS_OPTS + ["-b"],
251 schema="../monster_test.fbs",
252 data="../unicode_test.json",
256 BASE_OPTS + TS_OPTS + ["--gen-name-strings"],
259 schema="../union_vector/union_vector.fbs",
266 schema="include_test/include_test1.fbs",
273 schema="include_test/sub/include_test2.fbs",
277 BINARY_OPTS + ["--bfbs-filenames", str(tests_path)],
279 schema="monster_test.fbs",
282 # Generate the annotated binary of the monster_test binary schema.
284 schema="../reflection/reflection.fbs",
290 schema="monster_test.fbs", file="monsterdata_test.mon", include="include_test"
297 "--bfbs-comments",
298 "--bfbs-builtins",
299 "--bfbs-gen-embed",
300 "--bfbs-filenames",
304 schema="monster_test.fbs",
308 BINARY_OPTS + ["--bfbs-filenames", str(tests_path)],
310 schema="arrays_test.fbs",
314 ["--jsonschema", "--schema"],
316 schema="monster_test.fbs",
322 schema="monster_extra.fbs",
323 data="monsterdata_extra.json",
327 DART_OPTS + ["--gen-object-api"],
328 schema="monster_extra.fbs",
332 CPP_OPTS + CS_OPTS + NO_INCL_OPTS + JAVA_OPTS + ["--jsonschema", "--scoped-enums"],
333 schema="arrays_test.fbs",
339 schema="arrays_test.fbs",
345 schema="rust_namer_test.fbs",
350 schema="arrays_test.fbs",
356 schema="nested_union_test.fbs",
362 flatc(["--java", "--kotlin", "--lobster"], schema=optional_scalars_schema)
363 flatc(TS_OPTS, cwd=ts_code_gen, schema="../optional_scalars.fbs")
365 flatc(["--csharp", "--python", "--gen-object-api"], schema=optional_scalars_schema)
367 flatc(RUST_OPTS, prefix="optional_scalars", schema=optional_scalars_schema)
369 flatc(NO_INCL_OPTS + CPP_OPTS, schema=optional_scalars_schema)
374 flatc(["--csharp", "--gen-object-api"], schema=type_field_collsion_schema)
378 CS_OPTS + ["--gen-object-api", "--gen-onefile"],
380 schema="union_value_collision.fbs",
384 flatc(RUST_OPTS, prefix="more_defaults", schema="more_defaults.fbs")
386 # Generate the schema evolution tests
388 CPP_OPTS + ["--scoped-enums"],
390 schema=glob(tests_path, "evolution_test/evolution_v*.fbs"),
394 flatc(BASE_OPTS + CS_OPTS, schema="keyword_test.fbs")
395 flatc(RUST_OPTS, prefix="keyword_test", schema="keyword_test.fbs")
397 BASE_OPTS + CS_OPTS + ["--cs-global-alias", "--gen-onefile"],
399 schema=glob(tests_path, "nested_namespace_test/nested_namespace_test*.fbs"),
401 flatc(BASE_OPTS + DART_OPTS, prefix="../dart/test/", schema="keyword_test.fbs")
405 flatc(["--java", "--kotlin"], schema=dictionary_lookup_schema)
410 SWIFT_OPTS + BASE_OPTS + ["--grpc"],
411 schema="monster_test.fbs",
417 schema="union_vector/union_vector.fbs",
420 flatc(SWIFT_OPTS, schema="optional_scalars.fbs", prefix=swift_prefix)
421 flatc(SWIFT_OPTS, schema="vector_has_test.fbs", prefix=swift_prefix)
422 flatc(SWIFT_OPTS, schema="nan_inf_test.fbs", prefix=swift_prefix)
424 SWIFT_OPTS + ["--gen-object-api"],
425 schema="more_defaults.fbs",
430 schema="MutatingBool.fbs",
435 SWIFT_OPTS_CODE_GEN + BASE_OPTS + ["--grpc", "--swift-implementation-only"],
436 schema="test_import.fbs",
441 SWIFT_OPTS_CODE_GEN + NO_INCL_OPTS + ["--grpc"],
442 schema="test_no_include.fbs",
450 schema="monster_test.fbs",
456 NIM_OPTS = BASE_OPTS + ["--nim"]
457 flatc(NIM_OPTS, schema="monster_test.fbs", include="include_test")
458 flatc(NIM_OPTS, schema="optional_scalars.fbs")
459 flatc(NIM_OPTS, schema="more_defaults.fbs")
460 flatc(NIM_OPTS, schema="MutatingBool.fbs")
462 # --filename-suffix and --filename-ext tests
464 CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-ext", "hpp"],
467 schema="monster_test.fbs",
470 CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-suffix", "_suffix"],
473 schema="monster_test.fbs",
478 + ["--grpc", "--filename-suffix", "_suffix", "--filename-ext", "hpp"],
481 schema="monster_test.fbs",
488 schema="monster_test.fbs",
494 schema="optional_scalars.fbs",
499 schema="union_vector/union_vector.fbs",
507 RUST_OPTS + ["--no-leak-private-annotation", "--gen-object-api"],
509 schema=annotations_test_schema,
514 flatc(BASE_OPTS + CPP_OPTS + LOBSTER_OPTS, schema=samples_schema, cwd=samples_path)
515 flatc(RUST_OPTS, prefix="rust_generated", schema=samples_schema, cwd=samples_path)
517 BINARY_OPTS + ["--bfbs-filenames", str(samples_path)],
518 schema=samples_schema,
529 ["-c", "--cpp-std", "c++0x"], "include/flatbuffers", "reflection_generated.h"
533 flatc_reflection(["-p"], "python/flatbuffers", "reflection")
537 ["-j", "--java-package-prefix", "com.google.flatbuffers"],
545 def flatc_annotate(schema, include=None, data=None, cwd=tests_path): argument
548 cmd += ["-I"] + [include]
549 cmd += ["--annotate", schema]
556 schema="monster_test.fbs", include="include_test", data="monsterdata_test.mon"