jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
53 stars 41 forks source link

Just a quick copy from IRC #232

Closed Skeeve closed 2 years ago

Skeeve commented 2 years ago

08:30 (Skeeve) Hi batman. Maybe it's a known issue and I need not investigat further. I'm using OpenAPI v3 and have a path parameter which is a base64 encoded token like /api/v1/user/1yCPLtcgjzyawhHslfbz33UJLfX 08:31 (Skeeve) That seems to work as long as there is no dot in the token, in which case I get a 404 08:32 (Skeeve) Like with this: /api/v1/user/XRh.xl0Yf9KawxHskRDQZu6lvUhd 08:41 (Skeeve) Oh wait. There must be something in my part wrong "." is no base 64 character :( 08:52 (Skeeve) Okay… It seems there is an issue with "." To clarify: My base64 encoded string is tr-ed to translate "=", "+" and "/" into "-", "", and ".". When the "." occours, Openapi fails to find my path. I replaced "." now with "!" and that works.

Sorry for not having more information a.t.m.

jhthorsen commented 2 years ago

As mentioned on IRC: https://metacpan.org/dist/Mojolicious-Plugin-OpenAPI/view/lib/Mojolicious/Plugin/OpenAPI/Guides/OpenAPIv2.pod