Closed jlevers closed 3 months ago
I've just tested this and yes, this seems to generate correct output now.
Regenerating the library does fix the new catalog items schema, but we now lose OrderedQuantity::$orderedQuantity
in the vendors Orders v1 schema. That's the only other change, so it could have been worse :) I'll see if I can figure out why.
Hah, I'm working on the same problem right now. It has to do with the recursion fix (#8), but I haven't yet figured out how to resolve it in a way that makes sense.
Okay, I think I have found a "solution" which is to also compare the description of the schema and the ancestor, which isn't ideal, but does work.
if ($_parent->rawName === $name && $_parent->description === $schema->description) {
Yeah, that seems like a good enough solution for now. If it becomes a problem again at some point we can revisit it, but I think doing this properly will involve some sorta actual schema object comparator function which seems like overkill for now.
I pushed that fix – I'll regenerate again once https://github.com/jlevers/selling-partner-api/pull/731 is merged.
@dpash this appears to fix https://github.com/jlevers/selling-partner-api/issues/719. Just want to check that the solution seems sane to you.