Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 204 response #426

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/aaz_dev/command/model/configuration/_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def generate_outputs(self, ref_outputs=None, pageable=None):
op_output = self.build_output_by_operation(op, pageable, client_flatten)
if op_output:
output = op_output

if output and ref_outputs:
assert len(ref_outputs) == 1, "Only support one reference output"
ref_output = ref_outputs[0]
Expand All @@ -132,6 +131,9 @@ def build_output_by_operation(cls, op, pageable=None, client_flatten=True):
if resp.is_error:
continue
if resp.body is None:
if 204 in resp.status_codes and op.http.request.method == "delete":
# no content response for delete operation
return None
continue
if isinstance(resp.body, CMDHttpResponseJsonBody):
body_json = resp.body.json
Expand Down
Loading