Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
argument = query_result(target=args.target,
key=args.key,
headers=headers,
verify_certificate=not args.insecure_certificate,
requests=args.requests,
stub_responses=args.stub_responses)
# returns a dict
argument = json.loads(argument)
else:
# Parse the local JSON file
with open(args.schema_json_file, "r") as s:
result_raw = s.read()
argument = json.loads(result_raw)
if args.generate_schema:
schema.generate(argument,
fpath=os.path.join(host, "schema-%s-%s.json" % (today, timestamp)))
if args.generate_html:
html.generate(argument,
fpath=os.path.join(host, "doc-%s-%s.html" % (today, timestamp)),
custom=custom,
target=args.target)
if args.generate_queries:
query.generate(argument,
qpath=os.path.join(host, "%s", today, timestamp, "%s"),
detect=args.detect,
custom=custom,
green_print=lambda s: print(string_join(green, "Writing Queries Templates", reset)))
else:
# Likely missing a required arguments
print("Missing Arguments")