netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.32k stars 2.49k forks source link

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

Open Emreu opened 1 week ago

Emreu commented 1 week ago

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 _"prefixlength" 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.

jeffgdotorg commented 1 week ago

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.