You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generating an Elixir client using Paypal's OpenAPI spec files, invalid module names are sometimes created. This prevents the application from compiling.
Actual: defmodule Orders.Model.400DetailsInner do
Expected: uncertain.
Every part of a module name separated by a .must begin with an upper-case letter. So, prefixing the 400DetailsInner portion with something arbitrary like X would work: defmodule Orders.Model.X400DetailsInner do.
Alternatively, module names are just atoms that start with Elixir. Creating modules (and referencing them throughout the code base) like this should work: :"Elixir.Orders.Model.400DetailsInner"
There may be another, better solution that I'm not thinking of.
aparod
changed the title
[BUG] [Elixir] Invalid client module names generate from Paypal API spec
[BUG] [Elixir] Invalid client module names generated from Paypal API spec
Jan 20, 2025
Bug Report Checklist
Description
When generating an Elixir client using Paypal's OpenAPI spec files, invalid module names are sometimes created. This prevents the application from compiling.
Actual:
defmodule Orders.Model.400DetailsInner do
Expected: uncertain.
.
must begin with an upper-case letter. So, prefixing the400DetailsInner
portion with something arbitrary likeX
would work:defmodule Orders.Model.X400DetailsInner do
.Elixir.
Creating modules (and referencing them throughout the code base) like this should work::"Elixir.Orders.Model.400DetailsInner"
openapi-generator version
latest
OpenAPI declaration file content or url
https://github.com/paypal/paypal-rest-api-specifications/blob/main/openapi/checkout_orders_v2.json
Generation Details
Steps to reproduce
git clone [email protected]:paypal/paypal-rest-api-specifications.git
cd paypal-rest-api-specifications/openapi
less out/lib/orders/model/_400_details_inner.ex
defmodule Orders.Model.400DetailsInner do
Related issues/PRs
Suggest a fix
See above.
The text was updated successfully, but these errors were encountered: