Closed tommck closed 4 years ago
This is related to #90
Also, looks like we need more "hack" code in model.ts or the Property needs to be more aware of what object it's on :(
Well, taking into account that it may be deep, we should give Property more context. For example:
namespace.Type:
propertyA:
allOf:
- $ref: '#/components/schemas/SuperType'
- type: object
properties:
deepReference:
$ref: '#/components/schemas/namespace.Type'
oh right!.. huh.. that sounds complicated.. I'll try to take a look at it, but if you have time to do it, that would be greatly appreciated
I'll see if I can find a solution
I just pushed something that might fix it
I have no idea how to test the deep property reference stuff simply
@luisfpg let me know what you think about what I pushed. Not sure if I'm missing something, since I'm new to this code / openapi stuff
@tommck I have performed a few changes:
gen-utils.tsType
Property
itselfself-ref
tests. I've removed the previous employees
test because it just did the simple self-referencing testIt is merged to master. Please, test it by linking locally (see https://github.com/cyclosproject/ng-openapi-gen#developing-and-contributing). If it is OK, I'll make a new version (will actually be 0.10.0, because of #89).
tests passed locally.. going to try it with my actual code base in just a minute
Looks like it's working locally! 🥳
Thanks so much for being so responsive on this @luisfpg. You rock!
Great. I'll see if I can make the new version later today. Otherwise, will publish tomorrow.
:D
Hope to dig through and figure out the problem shortly.
I'll also update without the focused describe too