         swagger.addPath(path: route, method: method, id: "\(id)", qParams: nil, inputType: "\(inputType)", responseList: responseTypes)
 
         // add model information into the document structure.
-        swagger.addModel(model: typeInfo1)
-        if let typeInfo2 = typeInfo2 {
-            swagger.addModel(model: typeInfo2)
+        swagger.addModel(model: inputTypeInfo)
+        if let outputTypeInfo = outputTypeInfo {
+            swagger.addModel(model: outputTypeInfo)
         }
 
         // now walk all the unprocessed models and ensure they are processed.

    func registerRoute<I: Codable, O: Codable>(route: String, method: String, inputType: I.Type, outputType: O.Type, responseTypes: [SwaggerResponseType]) {
        Log.debug("Registering \(route) for \(method) method")

        let typeInfo: TypeInfo
        do {
            typeInfo = try TypeDecoder.decode(outputType)
        } catch {
            Log.debug("type decode error")
            return
        }

        // insert the path information into the document structure.
        swagger.addPath(path: route, method: method, id: nil, qParams: nil, inputType: "\(inputType)", responseList: responseTypes)

        // add model information into the document structure.
        swagger.addModel(model: typeInfo)

        // now walk all the unprocessed models and ensure they are processed.
        for unprocessed in Array(swagger.unprocessedTypes) {

            let model = String(describing: name)
            var modelDefinition: SwaggerModel

            // Check to see if we have already built this model
            guard self.definitions[model] == nil else {
                Log.debug("Already generated model \(model)")
                return
            }

            // then build all it
            if let modelInfo = try? buildModel(typeInfo) {
                Log.debug("in addModel(model: \(model))")
