Mismatch of parameters in OpenAPI schema and actual Netbox API (for POST /api/ipam/prefixes/{id}/available-prefixes/ endpoint) #9869

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

Originally created by @Emreu on GitHub (Jun 18, 2024).

Change Type

Correction

Area

Integrations/API

Proposed Changes

Problem with endpoint: POST /api/ipam/prefixes/{id}/available-prefixes/
Right now in PrefixRequest model required field is "prefix" which is actually ignored by API, however API requires "prefix_length" field which is absent in the model.
Since API client libraries are generated from OpenAPI spec this mismatch makes them hard to use (if ever usable for specific endpoint).
I use go client which allows to add custom fields to request, but its quite an unpleasant workaround. I don't have enough skill with python and django to provide fix myself so relying this problem to community.

Originally created by @Emreu on GitHub (Jun 18, 2024). ### Change Type Correction ### Area Integrations/API ### Proposed Changes Problem with endpoint: [POST /api/ipam/prefixes/{id}/available-prefixes/](https://demo.netbox.dev/api/schema/swagger-ui/#/ipam/ipam_prefixes_available_prefixes_create) Right now in **PrefixRequest** model required field is _"prefix"_ which is actually ignored by API, however API requires _"prefix_length"_ field which is absent in the model. Since API client libraries are generated from OpenAPI spec this mismatch makes them hard to use (if ever usable for specific endpoint). I use [go client]( https://github.com/netbox-community/go-netbox) which allows to add custom fields to request, but its quite an unpleasant workaround. I don't have enough skill with python and django to provide fix myself so relying this problem to community.
adam closed this issue 2025-12-29 21:23:46 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jun 20, 2024):

Thanks for reporting this problem. We're aware that this kind of mismatch is not uncommon, but the team's current capacity does not permit us to make a major push to address the problem at its root.

Moving along to needs owner; anybody who has the requisite skills and capacity is welcome to pick it up and work through to a PR. Just comment on the issue expressing your interest, and a maintainer will assign the issue to you.

@jeffgdotorg commented on GitHub (Jun 20, 2024): Thanks for reporting this problem. We're aware that this kind of mismatch is not uncommon, but the team's current capacity does not permit us to make a major push to address the problem at its root. Moving along to `needs owner`; anybody who has the requisite skills and capacity is welcome to pick it up and work through to a PR. Just comment on the issue expressing your interest, and a maintainer will assign the issue to you.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 19, 2024):

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 (Sep 19, 2024): 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/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 2024):

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 (Oct 20, 2024): 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#9869