Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11578 mark swagger available- apis to accept lists in post #13445

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Aug 11, 2023

Fixes: #11578

Marks the available APIs as returning a list. The technically correct fix would be using a PolymorphicProxySerializer as these can be called with a single object or a list, however this would cause the swagger to emit a "oneOf" which is not supported in Go OpenAPI generator, also it makes the spec more complex. If you only have to request a single item, just use a list with a single object as request so there really isn't a downside for this.

@jeremystretch I was mistaken, these only effect the availalbe-api's so there weren't that many to change.

@arthanson arthanson changed the title DRAFT: 11578 mark swagger available- apis to accept lists in post 11578 mark swagger available- apis to accept lists in post Aug 11, 2023
@arthanson arthanson marked this pull request as ready for review August 11, 2023 08:32
@jeremystretch jeremystretch merged commit 9fd07b5 into develop Aug 11, 2023
@jeremystretch jeremystretch deleted the 11578-openapi branch August 11, 2023 13:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/ipam/prefixes/{id}/available-ips/ wrong model returned
2 participants