Fix allOf decoding issue#27
Fix allOf decoding issue#27liamnichols merged 8 commits intoCreateAPI:mainCreateAPI/CreateAPI:mainfrom imjn:imjn/fix-allOf-decoding-issueimjn/CreateAPI:imjn/fix-allOf-decoding-issueCopy head branch name to clipboard
Conversation
|
I found more to fix so marked this PR as draft now 🙏🏽 |
|
Thanks for working on this. I merged the other two MRs and also fixed the remaining tests in the main branch. |
9428021 to
5f532ad
Compare
| properties: | ||
| breed: | ||
| type: string | ||
| image: |
There was a problem hiding this comment.
This is the test case I wanted to pass by this PR's changes.
liamnichols
left a comment
There was a problem hiding this comment.
This looks great @imjn 💪
Did you also want to replicate the first issue that you described in the PR description within the specs/tests? Or do you think just adding Image to Animal is sufficient like you have done already? I'm just trying to understand if the current tests are covering all of the behavioural changes 🙏
ea379ef to
6ebb9f5
Compare
|
Added test coverage for the first issue that I described in the description 6ebb9f5. |
Co-authored-by: Liam Nichols <liam.nichols.ln@gmail.com>
6ebb9f5 to
b7d9bfb
Compare
liamnichols
left a comment
There was a problem hiding this comment.
Looking great @imjn! Thanks again for solving this 💪 Just one tweak to the schema and then I think its good to go 🚀
Tests/CreateAPITests/Expected/edgecases-yaml-config/Sources/Entities.swift
Outdated
Show resolved
Hide resolved
eba3b81 to
e1cd392
Compare
WHAT
When we have this kind OpenAPI schema ↓
it fails to decode
typebecause currently, CreateAPI generates ↓It should be
In this PR, I've added
isInlineedtoPropertyin order to differentiateTypeandBaseDoggenerated codes in the example above.Also, when an object in
allOfhas a reference type property, it fails because currently it is generated asbut should be
HOW
isInlinedtoProperty.