Change API-Documentation for AvailailableIP/Prefix to accept list of objects #10311
Labels
pending closure
Requires immediate attention to avoid being closed for inactivity
type: feature
Introduction of new functionality to the application
NetBox version
v3.3.3
Feature type
Change to existing functionality
Proposed functionality
This is similar to #9471. But instead of changing the function, i propose to change only the API-Documentation.
The current swagger.json documents the functions to accept an object as input and return a list of objects. As far as i can see both can never be met. If the in put is a single object, the return value is always a single object, but never a list.
Changing the annotation in the post function of AvailableIPAddressesView from
to
changes the swagger.json while not affecting the functionality. The same can be done for AvailablePrefix.
The diff looks something like
If you want I can create a PR for this.
Use case
This would help users of strongly typed languages to generate a working library from swagger.json.
While not ideal, at least this allows users of the library to use this functionality by always providing a list, even for a single value.
Database changes
None
External dependencies
None
The text was updated successfully, but these errors were encountered: