Devices render-config swagger spec is incorrect #10722

Closed
opened 2025-12-29 21:35:11 +01:00 by adam · 3 comments
Owner

Originally created by @cwilloughby-bw on GitHub (Jan 31, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.2.2

Python Version

3.12

Steps to Reproduce

  1. Open the Rest API documentation at /api/schema/swagger-ui/
  2. Navigate to DCIM > "/api/dcim/devices/{id}/render-config/
  3. Observe required parameters, request body, and response body
  4. Attempt to use API endpoint to request rendered configuration for device
  5. Observe that the request body is ignored, and that the response body is completely different from the swagger spec

Expected Behavior

The swagger spec should indicate that the response body is actually a json blob with the following format:
{"configtemplate": {"id": 1,"url":"https://netbox.example.com/api/extras/config-templates/1/","display":"test-template","name":"test-template"},"content": "..."}

This then allows generated SDKs (Such as go-netbox) to create the correct structs/methods.

Observed Behavior

Generated SDKs have incorrect requirements/responses, and the documentation is incorrect, leading to difficulties in leveraging the API.

Originally created by @cwilloughby-bw on GitHub (Jan 31, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.2.2 ### Python Version 3.12 ### Steps to Reproduce 1. Open the Rest API documentation at /api/schema/swagger-ui/ 2. Navigate to DCIM > "/api/dcim/devices/{id}/render-config/ 3. Observe required parameters, request body, and response body 4. Attempt to use API endpoint to request rendered configuration for device 5. Observe that the request body is ignored, and that the response body is completely different from the swagger spec ### Expected Behavior The swagger spec should indicate that the response body is actually a json blob with the following format: `{"configtemplate": {"id": 1,"url":"https://netbox.example.com/api/extras/config-templates/1/","display":"test-template","name":"test-template"},"content": "..."}` This then allows generated SDKs (Such as go-netbox) to create the correct structs/methods. ### Observed Behavior Generated SDKs have incorrect requirements/responses, and the documentation is incorrect, leading to difficulties in leveraging the API.
adam closed this issue 2025-12-29 21:35:12 +01:00
Author
Owner

@cwilloughby-bw commented on GitHub (Jan 31, 2025):

It feels like this is just an issue with the Swagger documentation, but that has downstream ramifications with generated SDKs. I'm not entirely sure where the swagger spec is generated, otherwise I'd try to submit a patch for this myself. Please let me know if I can add any additional information to make this easier to triage/remediate!

@cwilloughby-bw commented on GitHub (Jan 31, 2025): It feels like this is just an issue with the Swagger documentation, but that has downstream ramifications with generated SDKs. I'm not entirely sure where the swagger spec is generated, otherwise I'd try to submit a patch for this myself. Please let me know if I can add any additional information to make this easier to triage/remediate!
Author
Owner

@github-actions[bot] commented on GitHub (May 9, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (May 9, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jun 8, 2025):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Jun 8, 2025): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10722