Do not use cached properties for additionalProperties#7955
Do not use cached properties for additionalProperties#7955spacether merged 2 commits intoOpenAPITools:masterfrom
Conversation
|
@macjohnny FYI. This change has an impact to the TS generators and looks to be minor as only the order in the samples has changed. |
|
@macjohnny ah ok. Thanks for the clarification. |
This reverts commit 057647c.
|
I believe I am seeing intermittent failures in tests due to this issue. I have a mirror of the openapi-tester, which has a branch, which has changes which diverge from "master" in some generators. It is otherwise identical to master as of commit b5ce7ce ("comment out angular v6, v7 tests") with the exclusion of commit 3bf8ca7 ("[python] Renames python generators (#7965)") - as I don't have time to deal with any issues this might cause to my use of python. My CI runs "docker build -t TAG ." and this intermittently fails with assertions on lines
Or, in other words, lines like this.. assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema); Due to mapWithAddPropsTrue.getAdditionalProperties() being NULL The failures happen when the schema in Q reaches the later stages without being resolved from the reference ($ref: #/components/schemas/AdditionalPropertiesTrue), to the thing it references (a map). |
|
@reganheath are you able to repeat the issue with the latest master? |
|
@wing328 No. I have not (yet) reproduced in our mirror of master (using the same CI process). It has only happened for our branch, which has an additional generator plus changes to two more. What is truly frustrating is that it didn't happen in the branch I used to merge the latest master changes into our branch, it only happened once it was merged. Also, adding debug logging to a branch where it was occurring, caused it to also stop occurring, or occur less frequently such that it hasn't happened since. Frustrating! |
|
@reganheath the issue should have been resolved in the latest master. Please pull it into your branch and let us know if you can still repeat the issue. |
|
@wing328 Sorry, I cannot do that at this time. Is there a specific commit you can point me at, which should have corrected this issue? Edit: It's commit 5e02a5b isn't it? |
Do not use cached properties for additionalProperties
This should fix the bug where additionalProperties tests are intermittently failing
PR checklist
./bin/generate-samples.shto update all Petstore samples related to your fix. 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*. For Windows users, please run the script in Git BASH.masterCore Team Members
@wing328 (2015/07) ❤️
@jimschubert (2016/05) ❤️
@cbornet (2016/05)
@ackintosh (2018/02) ❤️
@jmini (2018/04) ❤️
@etherealjoy (2019/06)
@spacether (2020/05)