Closed stumueller closed 3 hours ago
Hi @stumueller, after looking into this I believe the best thing to do is to rename the Blocks. My suggestion would be to use an underscore instead of a slash like so:
10.224.32.0_19
The reason behind this is it appears OpenAPI doesn't really have a way to handle paths as an HTTP path parameter very well and this can also lead to some difficult situations from a testing & stability perspective.
This is documented here: https://fastapi.tiangolo.com/tutorial/path-params/#path-parameters-containing-paths
OpenAPI doesn't support a way to declare a path parameter to contain a path inside, as that could lead to scenarios that are difficult to test and define.
I'll be removing the "/" as a supported character for Block names, however I'm open to any feedback you may have on my above observations.
Thanks for reaching out!
Thanks for confirming. I'm not sure if the spaces name also has support for / but it may be worth removing it there as well as for block names for the same reason.
Stuart
On Fri, 10 May 2024, 17:35 DCMattyG, @.***> wrote:
Hi @stumueller https://github.com/stumueller, after looking into this I believe the best thing to do is to rename the Blocks. My suggestion would be to use an underscore instead of a slash like so:
10.224.32.0_19
The reason behind this is it appears OpenAPI doesn't really have a way to handle paths as an HTTP path parameter very well and this can also lead to some difficult situations from a testing & stability perspective.
This is documented here: https://fastapi.tiangolo.com/tutorial/path-params/#path-parameters-containing-paths
I'll be removing the "/" as a supported character for Block names, however I'm open to any feedback you may have on my above observations.
Thanks for reaching out!
— Reply to this email directly, view it on GitHub https://github.com/Azure/ipam/issues/263#issuecomment-2104905011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTVZW726JU45B226MQHUF3ZBTZLLAVCNFSM6AAAAABHQHM7KSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUHEYDKMBRGE . You are receiving this because you were mentioned.Message ID: @.***>
Good catch, I'll make sure that's all addressed accordingly.
Thanks so much!
Hi @stumueller, this should now be addressed with PR #279 and incorporated into release v3.2.0.
Please restart your IPAM App Service to pull down the latest containers and give it a try, thanks!
Hi @stumueller, I'm going to close this issue as the fix has been available for several months now. I hope everything is working well for you. If for any reason you're still having an issue, please don't hesitate to re-open this issue or reach out to me directly.
Thanks much and I hope you're enjoying Azure IPAM!
Describe the bug I have created a number of spaces: slash_19 slash_20 etc
I have also created a number of bocks within those spaces, however I have named the blocks 10.224.32.0/19 10.224.64.0/19 etc
this means when trying to set a reservation through the api I get an invalid api path as my api path becomes api/spaces/slash_19/blocks/10.224.32.0/19/reservations I have tried api/spaces/slash_19/blocks/10224.32.0%2F19/reservations but still get the same result. Is there any way around this or do I need to rename my blocks?