Skip to content

Commit

Permalink
added java friendly type converter per #588
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Jun 5, 2014
1 parent 01eab45 commit 4ccce94
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.wordnik.swagger.converter

import scala.collection.mutable.HashMap

class TypeConverter extends ModelConverter with BaseConverter {
private val LOGGER = LoggerFactory.getLogger(this.getClass)

val m = new HashMap[String, String]

def read(cls: Class[_], typeMap: Map[String, String]): Option[Model] = None
def add(sourceClassName: String, destClassName: String) = {
m += sourceClassName.toLower -> destClassName
}

override def typeMap = m.toMap

// don't expand mapped models
override def ignoredClasses: Set[String] = m.keys.toSet
}

0 comments on commit 4ccce94

Please sign in to comment.