Skip to content

Commit

Permalink
fix: set a different example for ConsistencyPreference
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Sep 4, 2024
1 parent 4fe6e93 commit a89e7b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/openapiv2/apidocs.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions scripts/update_swagger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ cat ${filename} | \
'del(.paths[][]."responses"|select(has("400"))."default" ) | del(.paths[][]."responses"|select(has("201"))."200") | del(.paths[][]."responses"|select(has("204"))."200")' > ${tmp_filename}
mv ${tmp_filename} ${filename}

# Add an example value to the ConsistencyPreference to override the default of UNSPECIFIED being shown in the docs
cat ${filename} | \
jq \
'.definitions.ConsistencyPreference.example = "MINIMIZE_LATENCY"' > ${tmp_filename}
mv ${tmp_filename} ${filename}

# Finally, for 204, there should be no schema
cat ${filename} | \
jq \
Expand Down

0 comments on commit a89e7b2

Please sign in to comment.