Swagger vs REST API: type of DCIM/RackElevation request #9225

Closed
opened 2025-12-29 20:47:15 +01:00 by adam · 0 comments
Owner

Originally created by @janhlavin on GitHub (Feb 9, 2024).

Originally assigned to: @abhi1693 on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.2

Python Version

3.11

Steps to Reproduce

  1. create rack
  2. call API for Rack elevation (GET /api/dcim/racks/$ID/elevation)

Expected Behavior

collection of RackElevation items in Swagger schema

[
  {
    "id": 12,
    "name": "U12",
    "face": {
      "value": "front",
      "label": "Front"
    },
    "device": {
      "id": 79,
      "url": "https://demo.netbox.dev/api/dcim/devices/79/",
      "display": "Panduit 48-Port Patch Panel (79)",
      "name": null
    },
    "occupied": true,
    "display": "U12"
  }
]

Observed Behavior

type error, API return RackElevation collection for Rack ID, but in Swagger schema is return type Rack object

Originally created by @janhlavin on GitHub (Feb 9, 2024). Originally assigned to: @abhi1693 on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.2 ### Python Version 3.11 ### Steps to Reproduce 1. create rack 2. call API for Rack elevation (`GET /api/dcim/racks/$ID/elevation`) ### Expected Behavior collection of `RackElevation` items in Swagger schema ```json [ { "id": 12, "name": "U12", "face": { "value": "front", "label": "Front" }, "device": { "id": 79, "url": "https://demo.netbox.dev/api/dcim/devices/79/", "display": "Panduit 48-Port Patch Panel (79)", "name": null }, "occupied": true, "display": "U12" } ] ``` ### Observed Behavior type error, API return `RackElevation` collection for _Rack ID_, but in Swagger schema is return type `Rack` object
adam added the type: bugstatus: acceptedseverity: lowtopic: OpenAPI labels 2025-12-29 20:47:15 +01:00
adam closed this issue 2025-12-29 20:47:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9225