Skip to content

Conversation

@NeverBehave
Copy link
Contributor

@NeverBehave NeverBehave commented Dec 9, 2025

Fixes: #505

Add support for SVG elevation diagrams via render='svg' parameter on rack elevation endpoint.

Changes

  • Add expect_json parameter to Request.__init__() (defaults to True)
  • Update Request._make_call() to set Accept header and parse responses based on expect_json
  • Create ROMultiFormatDetailEndpoint class for multiformat responses
  • Update Racks.elevation to use ROMultiFormatDetailEndpoint
  • Add documentation to docs/advanced.md

@jnovinger jnovinger requested review from a team and arthanson and removed request for a team, arthanson, bctiemann, jeremystretch and jnovinger December 9, 2025 20:26
Copy link
Collaborator

@arthanson arthanson left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple items to clean up.

and sets appropriate Accept header. If False, expects raw content
(e.g., SVG, XML) and returns text. Defaults to True.
## Note
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this supposed to be here, doesn't seem part of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is my note when exploring this part of the codebase. I am not entirely positive if I understand this correctly tho.
I tried to add an attribute and realize the count attribute was not declared but used, but it actually suppose to be that way.

@arthanson arthanson merged commit 34685b4 into netbox-community:master Dec 17, 2025
9 checks passed
@NeverBehave NeverBehave deleted the nb/svg-support branch December 18, 2025 00:38
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.

Render Elevation as SVG

2 participants