Skip to content

Commit

Permalink
scripts: avoid trailing space when dumping json
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Rodriguez <diego.rodriguez@cern.ch>
  • Loading branch information
Diego Rodriguez committed Oct 19, 2017
1 parent 5f549f0 commit 62300ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/generate_openapi_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def build_openapi_spec():
if key != 'static' and key != 'get_openapi_spec':
spec.add_path(view=current_app.view_functions[key])

spec_json = json.dumps(spec.to_dict(), indent=2, sort_keys=True)
spec_json = json.dumps(spec.to_dict(), indent=2,
separators=(',', ': '), sort_keys=True)

# Output spec to JSON file
with click.open_file(__output_path__, mode='w+',
Expand Down

0 comments on commit 62300ad

Please sign in to comment.