[fix][elixir] missing type mapping for AnyType#21197
[fix][elixir] missing type mapping for AnyType#21197efcasado wants to merge 1 commit intoOpenAPITools:masterfrom
Conversation
mrmstn
left a comment
There was a problem hiding this comment.
Hi @efcasado
As usual, thank you very much for the PR and the time invested in making the elixir gen. much better!
The PR LGTM, - just to be sure, did you regenerate the sample client as well? I somehow expected to have some changes there as well.
As I'm currently still OOF I can't test it, but I'm quite sure this won't have any side effects 😁!
My pleasure! 🙏
This change does not result in any changes to the existing samples. The existing mappings do a good-enough job to capture the most common occurrences of |
| typeMapping.put("date", "Date.t"); | ||
| typeMapping.put("date-time", "DateTime.t"); | ||
| // other | ||
| typeMapping.put("AnyType", "any()"); |
There was a problem hiding this comment.
what about adding a test schema with AnyType property (or updating an existing schema) to ensure output is good?
|
merged via #22081 with a any type property added to test spec |
Description
Add missing mapping for
AnyType.The lack of this mapping would result in
AnyTypebeing encoded as<invokerPackage>.Model.AnyTypein certain scenarios.Here is an example of a generated model exhibiting this issue. Here is the same model generated after applying this fix.
The issue was caught by dialyzer.
I am having difficulties generating a smaller example to reproduce the issue and add it as a new test to the project. So far, I've only been able to reproduce the issue when using
--skip-validate-specwith the Cloudflare OAS file.As usual, curious to hear your thoughts @mrmstn and @wing328 😊
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)