Skip to content

feat(rest-api): return valid JSON from DELETE endpoints#2701

Open
osu wants to merge 5 commits into
NVIDIA:mainfrom
osu:feat/2090-delete-json-responses
Open

feat(rest-api): return valid JSON from DELETE endpoints#2701
osu wants to merge 5 commits into
NVIDIA:mainfrom
osu:feat/2090-delete-json-responses

Conversation

@osu

@osu osu commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

DELETE success routes in the carbide REST API did not consistently return valid JSON bodies. Many async delete handlers responded with a plain-text string (Deletion request was accepted) via c.String, which breaks clients that expect to json.Unmarshal every API response.

Per #2090 and maintainer agreement with the reporter: HTTP 202 Accepted async deletes should return JSON instead of a plain text string; HTTP 204 No Content sync deletes should remain empty (204 does not allow a response body).

This PR introduces APIDeletionAcceptedResponse ({"message":"Deletion request was accepted"}) and updates only the 202 Accepted async delete handlers. 204 No Content sync delete handlers are unchanged (c.NoContent). OpenAPI and sdk/standard are updated for 202 delete endpoints only.

Signed-off-by: Hasan Khan hasank@nvidia.com

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Fixes #2090

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Validated locally (Go toolchain from rest-api/go.mod):

  • go test ./api/pkg/api/model/... -run TestAPIDeletionAcceptedResponse — passed
  • go build ./api/pkg/api/handler/... — clean
  • go vet ./sdk/simple/... — clean
  • oasdiff breaking origin/main:rest-api/openapi/spec.yaml :rest-api/openapi/spec.yaml — no breaking changes
  • make test-api — not run (requires PostgreSQL on :30432)

Additional Notes

~47 files changed (down from ~83 in the earlier revision). Clients that previously matched the raw string "Deletion request was accepted" will still find that value in the message field on 202 responses. The generated sdk/standard delete clients for 202 endpoints now deserialize DeletionAcceptedResponse; sdk/simple wrappers ignore the body and continue to use the HTTP response for error handling.

@osu osu requested a review from a team as a code owner June 19, 2026 07:07
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d6b7264e-2a3e-4bb3-9af8-e77633f774ff

📥 Commits

Reviewing files that changed from the base of the PR and between 9b7f486 and 90346c0.

📒 Files selected for processing (2)
  • rest-api/api/pkg/api/model/deletion_test.go
  • rest-api/openapi/spec.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • rest-api/api/pkg/api/model/deletion_test.go
  • rest-api/openapi/spec.yaml

Summary by CodeRabbit

  • New Features
    • Standardized asynchronous DELETE responses (HTTP 202 Accepted) to return a JSON payload with a message field.
    • Updated the OpenAPI spec to include the new JSON response schema and example.
  • Refactor
    • Consolidated the accepted-deletion response format across all supported resource types.
  • Tests
    • Updated and added tests/helpers to validate the new JSON response body.
  • Chores
    • Adjusted SDK delete call handling to match the underlying client’s execute return signature.

Walkthrough

Introduces a new APIDeletionAcceptedResponse model with an exported constant, struct, and factory function. All 18 asynchronous DELETE handlers are updated to return this structured JSON payload with HTTP 202 instead of plain strings or nil bodies. Six SDK client methods are adjusted to handle the updated Execute() return signature, and the OpenAPI specification is extended with the new DeletionAcceptedResponse component schema.

Changes

Deletion Response Standardization

Layer / File(s) Summary
APIDeletionAcceptedResponse model and unit tests
rest-api/api/pkg/api/model/deletion.go, rest-api/api/pkg/api/model/deletion_test.go
Adds DeletionRequestAcceptedMessage constant, APIDeletionAcceptedResponse struct with JSON message field, and NewAPIDeletionAcceptedResponse factory. Unit test validates JSON round-trip marshaling and message equality against the constant.
202 Accepted DELETE handler response updates
rest-api/api/pkg/api/handler/{allocation,infinibandpartition,instance,instancetype,ipblock,machine,machineinstancetype,machinevalidation,networksecuritygroup,nvlinklogicalpartition,operatingsystem,site,sshkey,sshkeygroup,subnet,tenantaccount,vpc,vpcprefix}.go
All 18 asynchronous DELETE handlers replace c.String(http.StatusAccepted, ...) or c.JSON(http.StatusAccepted, nil) with c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()). Response logic is uniform; deletion semantics and HTTP status are preserved.
Test helper and handler test assertions
rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go, rest-api/api/pkg/api/handler/instance_test.go, rest-api/api/pkg/api/handler/vpc_test.go
Adds assertDeletionAcceptedResponse shared test helper that unmarshals the response body into APIDeletionAcceptedResponse and validates the Message field. Updates instance and VPC delete handler tests to use the helper instead of substring assertions.
SDK client Execute return-value adjustments
rest-api/sdk/simple/{infinibandpartition,instance,nvlinklogicalpartition,operatingsystem,sshkeygroup,vpc}.go
Six SDK manager Delete methods update Execute() result destructuring to _, resp, err to accommodate the additional typed response value in the updated generated client signatures.
OpenAPI spec DeletionAcceptedResponse schema and 202 response updates
rest-api/openapi/spec.yaml
Adds components/schemas/DeletionAcceptedResponse with required message: string property and example. Standardizes all DELETE operation 202 responses to include application/json content referencing this schema with consistent example payloads.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/infra-controller#2363: Modifies DeleteAllocationHandler.Handle and related delete handler flows, which are the same handlers being updated in this PR to return structured JSON responses.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: returning valid JSON from DELETE endpoints instead of plain-text strings.
Description check ✅ Passed The description thoroughly explains the problem, solution, and implementation details, with clear reference to the linked issue and testing approach.
Linked Issues check ✅ Passed The PR fully addresses issue #2090 by implementing structured JSON responses for 202 Accepted delete endpoints while maintaining empty bodies for 204 No Content endpoints.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the stated objective: updating DELETE handlers to return JSON responses, introducing the response model, and updating OpenAPI specifications and SDKs accordingly.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
nico-flow 126 14 55 44 5 8
nico-nsm 133 11 45 66 11 0
nico-psm 128 14 57 44 5 8
nico-rest-api 192 17 89 70 8 8
nico-rest-cert-manager 105 6 52 35 4 8
nico-rest-db 126 14 55 44 5 8
nico-rest-site-agent 125 14 55 44 4 8
nico-rest-site-manager 112 7 53 40 4 8
nico-rest-workflow 128 14 57 44 5 8
TOTAL 1175 111 518 431 51 64

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-06-19 07:10:17 UTC | Commit: 85a174e

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rest-api/api/pkg/api/handler/dpuextensionservice.go`:
- Line 1125: The deletion handler returns HTTP 204 No Content with a JSON
response body, which violates RFC 7231 that explicitly prohibits message bodies
in 204 responses. In the dpuextensionservice.go file, locate all return
statements using c.JSON(http.StatusNoContent,
model.NewAPIDeletionCompletedResponse()) (appearing at least at lines 1125 and
1653) and change http.StatusNoContent to http.StatusOK to maintain HTTP
specification compliance while still returning the structured deletion response
body.

In `@rest-api/openapi/spec.yaml`:
- Around line 2911-2920: The 202 Accepted response examples in the OpenAPI spec
use a message that indicates completion ("Resource deleted successfully")
instead of reflecting the async/accepted semantics of a 202 response. Update the
example message values in both 202 response examples (one around line 2911-2920
and another around line 3227-3236) that reference the DeletionResponse schema to
use a message that accurately represents an accepted but pending deletion
request, such as "Deletion request has been accepted and is being processed" or
similar wording that conveys the request is queued rather than already
completed.
- Around line 2713-2722: The OpenAPI specification declares content and schemas
for HTTP 204 No Content responses, which violates RFC 7231 since 204 responses
must not contain a message body. Remove the content declaration (including the
application/json schema and DeletionResponse reference) from all 204 response
definitions in DELETE endpoints, or alternatively change the response status
code to 200 OK or 202 Accepted if returning a DeletionResponse body is required.
Ensure consistency between the OpenAPI spec and the handler implementations that
use c.JSON(http.StatusNoContent, ...) to use the same contract across all
affected DELETE endpoints.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3e61b954-2b05-4fe0-bcf5-df529045ccea

📥 Commits

Reviewing files that changed from the base of the PR and between 47e42bc and 85a174e.

📒 Files selected for processing (33)
  • rest-api/api/pkg/api/handler/allocation.go
  • rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go
  • rest-api/api/pkg/api/handler/dpuextensionservice.go
  • rest-api/api/pkg/api/handler/expectedmachine.go
  • rest-api/api/pkg/api/handler/expectedmachine_test.go
  • rest-api/api/pkg/api/handler/expectedpowershelf.go
  • rest-api/api/pkg/api/handler/expectedrack.go
  • rest-api/api/pkg/api/handler/expectedswitch.go
  • rest-api/api/pkg/api/handler/infinibandpartition.go
  • rest-api/api/pkg/api/handler/instance.go
  • rest-api/api/pkg/api/handler/instance_test.go
  • rest-api/api/pkg/api/handler/instancetype.go
  • rest-api/api/pkg/api/handler/ipblock.go
  • rest-api/api/pkg/api/handler/machine.go
  • rest-api/api/pkg/api/handler/machineinstancetype.go
  • rest-api/api/pkg/api/handler/machinevalidation.go
  • rest-api/api/pkg/api/handler/networksecuritygroup.go
  • rest-api/api/pkg/api/handler/nvlinklogicalpartition.go
  • rest-api/api/pkg/api/handler/operatingsystem.go
  • rest-api/api/pkg/api/handler/site.go
  • rest-api/api/pkg/api/handler/sshkey.go
  • rest-api/api/pkg/api/handler/sshkeygroup.go
  • rest-api/api/pkg/api/handler/subnet.go
  • rest-api/api/pkg/api/handler/taskrule.go
  • rest-api/api/pkg/api/handler/tenantaccount.go
  • rest-api/api/pkg/api/handler/tenantidentity.go
  • rest-api/api/pkg/api/handler/vpc.go
  • rest-api/api/pkg/api/handler/vpc_test.go
  • rest-api/api/pkg/api/handler/vpcpeering.go
  • rest-api/api/pkg/api/handler/vpcprefix.go
  • rest-api/api/pkg/api/model/deletion.go
  • rest-api/api/pkg/api/model/deletion_test.go
  • rest-api/openapi/spec.yaml

logger.Info().Msg("finishing API handler")

return c.NoContent(http.StatusNoContent)
return c.JSON(http.StatusNoContent, model.NewAPIDeletionCompletedResponse())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

HTTP 204 with response body violates HTTP specification.

Both deletion handlers now return HTTP 204 No Content with a JSON response body. This directly contradicts RFC 7231 Section 6.3.5, which explicitly states that 204 responses MUST NOT contain a message body. While the OpenAPI specification documents this as intentional design, this creates potential compatibility issues:

  • Strict HTTP clients may discard the response body
  • Proxies and intermediaries may strip bodies from 204 responses
  • API consumers expecting standard HTTP semantics will encounter unexpected behavior

Recommended alternative: Use HTTP 200 OK for synchronous deletions that return a structured response body. This maintains HTTP spec compliance while still providing the desired JSON response:

return c.JSON(http.StatusOK, model.NewAPIDeletionCompletedResponse())

If the team has decided to proceed with 204 + body by design, document this deviation and its rationale prominently in API documentation to set client expectations.

Also applies to: 1653-1653

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rest-api/api/pkg/api/handler/dpuextensionservice.go` at line 1125, The
deletion handler returns HTTP 204 No Content with a JSON response body, which
violates RFC 7231 that explicitly prohibits message bodies in 204 responses. In
the dpuextensionservice.go file, locate all return statements using
c.JSON(http.StatusNoContent, model.NewAPIDeletionCompletedResponse()) (appearing
at least at lines 1125 and 1653) and change http.StatusNoContent to
http.StatusOK to maintain HTTP specification compliance while still returning
the structured deletion response body.

Comment thread rest-api/openapi/spec.yaml Outdated
Comment thread rest-api/openapi/spec.yaml Outdated
@osu

osu commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

osu added 4 commits June 19, 2026 01:41
Introduce a typed JSON body for async DELETE requests that return
HTTP 202 Accepted.

Fixes NVIDIA#2090

Signed-off-by: Hasan Khan <hasank@nvidia.com>
Replace plain-text c.String responses with APIDeletionAcceptedResponse
so clients can json.Unmarshal delete outcomes.

Signed-off-by: Hasan Khan <hasank@nvidia.com>
Signed-off-by: Hasan Khan <hasank@nvidia.com>
Add DeletionAcceptedResponse schema for async delete endpoints only.
Regenerate sdk/standard, update sdk/simple wrappers, and publish docs.

Signed-off-by: Hasan Khan <hasank@nvidia.com>
@osu osu force-pushed the feat/2090-delete-json-responses branch from 9c0defa to 9b7f486 Compare June 19, 2026 08:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
rest-api/api/pkg/api/model/deletion_test.go (1)

14-23: ⚡ Quick win

Consider adding explicit JSON structure verification.

The round-trip test validates that the JSON tag is correct (a wrong tag would fail unmarshaling), but adding an explicit assertion on the marshaled JSON bytes would make the test more explicit and catch structural issues immediately.

💡 Suggested enhancement
 func TestAPIDeletionAcceptedResponse_JSON(t *testing.T) {
 	t.Parallel()
 
 	payload, err := json.Marshal(NewAPIDeletionAcceptedResponse())
 	require.NoError(t, err)
+	assert.JSONEq(t, `{"message":"Deletion request was accepted"}`, string(payload))
 
 	var decoded APIDeletionAcceptedResponse
 	require.NoError(t, json.Unmarshal(payload, &decoded))
 	assert.Equal(t, DeletionRequestAcceptedMessage, decoded.Message)
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rest-api/api/pkg/api/model/deletion_test.go` around lines 14 - 23, In the
TestAPIDeletionAcceptedResponse_JSON function, add an explicit assertion on the
marshaled JSON payload bytes to verify the actual JSON structure rather than
relying solely on the round-trip test. After marshaling
NewAPIDeletionAcceptedResponse() into the payload variable, add an assertion
that checks the payload bytes match the expected JSON structure (for example,
verifying it contains the Message field with the correct value). This makes the
test more explicit and will catch structural issues in the JSON output
immediately without depending on unmarshaling to validate it.
rest-api/openapi/spec.yaml (2)

22959-22960: 💤 Low value

Prefer example over examples at schema level.

The examples array format is valid OpenAPI 3.0, but schema-level examples conventionally use the singular example keyword for a single representative value. The plural examples is typically reserved for media-type–level Example Objects (as correctly used in the response definitions).

Suggested fix
-      examples:
-        - message: Deletion request was accepted
+      example:
+        message: Deletion request was accepted
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rest-api/openapi/spec.yaml` around lines 22959 - 22960, Replace the
`examples` array at the schema level with the singular `example` keyword.
Convert the array structure containing the message "Deletion request was
accepted" to use the `example` keyword directly with the message value, removing
the array wrapping. This aligns with OpenAPI 3.0 conventions where schema-level
examples use the singular `example` keyword, reserving the plural `examples` for
media-type-level usage.

762-762: ⚡ Quick win

Standardize 202 response descriptions across all DELETE endpoints.

Most DELETE operations document the 202 response with description "Accepted", while line 1033 uses "Deletion request was accepted". This inconsistency introduces ambiguity—readers cannot determine whether the variation is intentional or an oversight.

Prefer a uniform description across all async DELETE responses. Either adopt the more explicit "Deletion request was accepted" everywhere, or retain the concise "Accepted" consistently. The former clarifies intent; the latter aligns with standard HTTP semantics.

Suggested fix

Option A: Align all to the explicit description:

-          description: Accepted
+          description: Deletion request was accepted

Option B: Align line 1033 to match the others:

-          description: Deletion request was accepted
+          description: Accepted

Also applies to: 1033-1033, 1468-1468, 1901-1901, 2383-2383, 4896-4896, 5226-5226, 5660-5660, 5912-5912, 6960-6960, 8281-8281, 9117-9117, 11499-11499, 12078-12078, 12373-12373

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rest-api/openapi/spec.yaml` at line 762, Standardize the description for 202
responses across all DELETE endpoints in the OpenAPI specification file.
Currently, most DELETE operations use the description "Accepted" while some
locations (including line 1033 and others noted in the comment) use "Deletion
request was accepted", creating inconsistency. Identify all 202 response
descriptions at the specified line numbers (762, 1033, 1468, 1901, 2383, 4896,
5226, 5660, 5912, 6960, 8281, 9117, 11499, 12078, 12373) in the DELETE endpoint
definitions and update them all to use the same description—either keep the
concise "Accepted" consistently throughout or update all to use the more
explicit "Deletion request was accepted" for clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@rest-api/api/pkg/api/model/deletion_test.go`:
- Around line 14-23: In the TestAPIDeletionAcceptedResponse_JSON function, add
an explicit assertion on the marshaled JSON payload bytes to verify the actual
JSON structure rather than relying solely on the round-trip test. After
marshaling NewAPIDeletionAcceptedResponse() into the payload variable, add an
assertion that checks the payload bytes match the expected JSON structure (for
example, verifying it contains the Message field with the correct value). This
makes the test more explicit and will catch structural issues in the JSON output
immediately without depending on unmarshaling to validate it.

In `@rest-api/openapi/spec.yaml`:
- Around line 22959-22960: Replace the `examples` array at the schema level with
the singular `example` keyword. Convert the array structure containing the
message "Deletion request was accepted" to use the `example` keyword directly
with the message value, removing the array wrapping. This aligns with OpenAPI
3.0 conventions where schema-level examples use the singular `example` keyword,
reserving the plural `examples` for media-type-level usage.
- Line 762: Standardize the description for 202 responses across all DELETE
endpoints in the OpenAPI specification file. Currently, most DELETE operations
use the description "Accepted" while some locations (including line 1033 and
others noted in the comment) use "Deletion request was accepted", creating
inconsistency. Identify all 202 response descriptions at the specified line
numbers (762, 1033, 1468, 1901, 2383, 4896, 5226, 5660, 5912, 6960, 8281, 9117,
11499, 12078, 12373) in the DELETE endpoint definitions and update them all to
use the same description—either keep the concise "Accepted" consistently
throughout or update all to use the more explicit "Deletion request was
accepted" for clarity.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3033efc5-4c62-40b7-9e11-d1d63e1224c1

📥 Commits

Reviewing files that changed from the base of the PR and between 9c0defa and 9b7f486.

⛔ Files ignored due to path filters (16)
  • rest-api/sdk/standard/api_allocation.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_infini_band_partition.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_instance.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_instance_type.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_ip_block.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_machine.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_network_security_group.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_nv_link_logical_partition.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_operating_system.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_site.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_ssh_key.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_ssh_key_group.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_tenant_account.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/api_vpc.go is excluded by !rest-api/sdk/standard/api_*.go
  • rest-api/sdk/standard/client.go is excluded by !rest-api/sdk/standard/client.go
  • rest-api/sdk/standard/model_deletion_accepted_response.go is excluded by !rest-api/sdk/standard/model_*.go
📒 Files selected for processing (31)
  • rest-api/api/pkg/api/handler/allocation.go
  • rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go
  • rest-api/api/pkg/api/handler/infinibandpartition.go
  • rest-api/api/pkg/api/handler/instance.go
  • rest-api/api/pkg/api/handler/instance_test.go
  • rest-api/api/pkg/api/handler/instancetype.go
  • rest-api/api/pkg/api/handler/ipblock.go
  • rest-api/api/pkg/api/handler/machine.go
  • rest-api/api/pkg/api/handler/machineinstancetype.go
  • rest-api/api/pkg/api/handler/machinevalidation.go
  • rest-api/api/pkg/api/handler/networksecuritygroup.go
  • rest-api/api/pkg/api/handler/nvlinklogicalpartition.go
  • rest-api/api/pkg/api/handler/operatingsystem.go
  • rest-api/api/pkg/api/handler/site.go
  • rest-api/api/pkg/api/handler/sshkey.go
  • rest-api/api/pkg/api/handler/sshkeygroup.go
  • rest-api/api/pkg/api/handler/subnet.go
  • rest-api/api/pkg/api/handler/tenantaccount.go
  • rest-api/api/pkg/api/handler/vpc.go
  • rest-api/api/pkg/api/handler/vpc_test.go
  • rest-api/api/pkg/api/handler/vpcprefix.go
  • rest-api/api/pkg/api/model/deletion.go
  • rest-api/api/pkg/api/model/deletion_test.go
  • rest-api/docs/index.html
  • rest-api/openapi/spec.yaml
  • rest-api/sdk/simple/infinibandpartition.go
  • rest-api/sdk/simple/instance.go
  • rest-api/sdk/simple/nvlinklogicalpartition.go
  • rest-api/sdk/simple/operatingsystem.go
  • rest-api/sdk/simple/sshkeygroup.go
  • rest-api/sdk/simple/vpc.go
✅ Files skipped from review due to trivial changes (8)
  • rest-api/api/pkg/api/handler/instancetype.go
  • rest-api/sdk/simple/sshkeygroup.go
  • rest-api/api/pkg/api/handler/instance_test.go
  • rest-api/api/pkg/api/handler/machine.go
  • rest-api/sdk/simple/infinibandpartition.go
  • rest-api/api/pkg/api/handler/machinevalidation.go
  • rest-api/api/pkg/api/handler/instance.go
  • rest-api/sdk/simple/operatingsystem.go
🚧 Files skipped from review as they are similar to previous changes (18)
  • rest-api/api/pkg/api/handler/site.go
  • rest-api/api/pkg/api/handler/tenantaccount.go
  • rest-api/sdk/simple/vpc.go
  • rest-api/api/pkg/api/handler/operatingsystem.go
  • rest-api/api/pkg/api/handler/nvlinklogicalpartition.go
  • rest-api/api/pkg/api/handler/vpcprefix.go
  • rest-api/api/pkg/api/handler/machineinstancetype.go
  • rest-api/api/pkg/api/handler/sshkey.go
  • rest-api/sdk/simple/nvlinklogicalpartition.go
  • rest-api/api/pkg/api/handler/vpc_test.go
  • rest-api/api/pkg/api/handler/networksecuritygroup.go
  • rest-api/api/pkg/api/handler/subnet.go
  • rest-api/api/pkg/api/handler/sshkeygroup.go
  • rest-api/api/pkg/api/handler/allocation.go
  • rest-api/sdk/simple/instance.go
  • rest-api/api/pkg/api/handler/vpc.go
  • rest-api/api/pkg/api/handler/infinibandpartition.go
  • rest-api/api/pkg/api/handler/ipblock.go

Assert marshaled JSON bytes in the model test, use schema-level example in
OpenAPI, and standardize 202 delete response descriptions.

Signed-off-by: Hasan Khan <hasank@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Delete requests to API don't respond with a valid JSON response

1 participant