         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) {

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

        let inputTypeInfo: TypeInfo
        do {
            inputTypeInfo = try TypeDecoder.decode(inputType)
        } catch {
            Log.debug("Failed to decode input type \(inputType)")
            return
        }

        var outputTypeInfo: TypeInfo? = nil
        if inputType != outputType {
            do {
                outputTypeInfo = try TypeDecoder.decode(outputType)
            } catch {
                Log.debug("Failed to decode output type \(outputType)")
                return
            }
        }
