> @@ -43,6 +43,13 @@
>
> @Override
> public CookbookDefinition apply(HttpResponse response) {
> - return parser.apply(response).values().iterator().next();
> + Map<String, CookbookDefinition> result = parser.apply(response);
The problem is that the JSON structure does not 100% match the Java domain
object model, and we would need a new entity that had the name of the cookbook
and a CookbookDefinition inside.
It feels more natural to have the name in the CookbookDefinition itself, and
that's the reason why it is manually added after parsing the Map. (See the JSON
file for the Expect test and the CookbookDefinition Java class to see the
differences in the structure)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/24/files#r6428355