Uh oh!
There was an error while loading. Please reload this page.
Add isCircularReference to properties - #4553
Conversation
There was a problem hiding this comment.
Can we add this to the default codegen instead as users would expect isCircularReference with a valid value (true, false) for all generators?
There was a problem hiding this comment.
@wing328 that was my intention, that's why I added it to updateAllModels in DefaultCodegen. Somehow this did got not triggered in Elm, so I thought I'd probably overridden it. Is updateAllModels the correct place to put this?
There was a problem hiding this comment.
Can you please move it to updateAllModels and I'll run some tests later to troubleshoot?
There was a problem hiding this comment.
@wing328 I already put it in updateAllModels. Do I need to remove it from the Elm codegen?
395cffe to
4190c50Compare
As a preparation to a major refactoring of the Elm generator I would like to add the ability of detecting circular references. Support for self referring types was already in place, but this PR also detects types that indirectly refer back to themselves. Every property that indirectly refers back to itself gets marked with
isCircularReference.PR checklist
./bin/(or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).master,4.3.x,5.0.x. Default:master.cc @wing328@jimschubert@cbornet@ackintosh@jmini@etherealjoy