Skip to content

Fixes #21658: Fix OpenAPI schema for available-prefixes endpoint request body#21956

Open
attoba wants to merge 1 commit intonetbox-community:mainfrom
attoba:fix-available-prefixes-schema
Open

Fixes #21658: Fix OpenAPI schema for available-prefixes endpoint request body#21956
attoba wants to merge 1 commit intonetbox-community:mainfrom
attoba:fix-available-prefixes-schema

Conversation

@attoba
Copy link
Copy Markdown
Contributor

@attoba attoba commented Apr 18, 2026

Fixes: #21658

Summary

The available-prefixes endpoint correctly validates input using PrefixLengthSerializer, which expects a prefix_length field.

However, the OpenAPI schema incorrectly documents the request body using PrefixSerializer, which leads to a mismatch between the API documentation and the actual behavior.

This change updates the OpenAPI schema to use PrefixLengthSerializer, aligning the documentation with the implemented API behavior.

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.

OpenAPI Spec / swagger docs: POST /api/ipam/prefixes/{id}/available-prefixes/ requestBody is incorrect

1 participant