             try print(trTemplate.render(context))
         }
 
-        try ast.apiOverview.dataStructures.forEach { ds in
+        try ast.api.dataStructures.forEach { ds in
             let s = try swift(dataStructure: ds)
             globalExtensionCode += s.global
             print(s.local)


        var globalExtensionCode: String = ""

        let transitions = ast.apiOverview.resourceGroup.flatMap {$0.resources}.flatMap {$0.transitions}

        func allResponses(href: String, method: String) -> [APIBlueprintTransition.Transaction.Response] {
            return transitions.filter {$0.href == href}


struct APIBlueprintAST: APIBlueprintElementDecodable {
    static let elementName = "parseResult"
    let api: APIBlueprintAPI
    let annotations: [APIBluprintAnnotation]

    static func decode(_ e: Extractor) throws -> APIBlueprintAST {
        return try APIBlueprintAST(
            api: APIBlueprintAPI.decodeElement(e),
            annotations: APIBluprintAnnotation.decodeElements(e))
    }
}

struct APIBlueprintAPI: APIBlueprintCategoryDecodable {
    static let className = "api"
    let title: String?
    let resourceGroup: [APIBlueprintResourceGroup]
    let dataStructures: [APIBlueprintDataStructure]

    static func decode(_ e: Extractor) throws -> APIBlueprintAPI {
        return try APIBlueprintAPI(
            title: e <|? ["meta", "title"],
            resourceGroup: APIBlueprintResourceGroup.decodeElements(e),
            dataStructures: APIBlueprintDataStructures.decodeElements(e).flatMap {
