google/autoparse — pull request #4 by sqrrrl (2013-03-26 03:32:10+00:00)
Title: Avoid redefining parent class was generating classes for properties

Thought I had fixed this previously, but turns out to still be a problem. Need to prevent autoparse from globally registering anonymous classes using the parent URI since it ends up returning the wrong class in future lookups.

Fix ends up being simple -- just don't register schemas if the URI is the same as the parent. Thought about giving anonymous classes unique URIs (e.g. #class.property) but a lot of tests are checking to make sure the property URIs match the parent. Kept that behavior while preventing the redefinition problem.

See https://code.google.com/p/google-api-ruby-client/issues/detail?id=74