added default value

This commit is contained in:
Tony Tam 2012-09-20 14:16:51 -07:00
parent 26bcc80ae3
commit 77141cd55a

View File

@ -19,7 +19,7 @@ package com.wordnik.swagger.codegen.util
import scala.io.Source
object ResourceExtractor {
def extractListing(path: String, apiKey: Option[String]) = {
def extractListing(path: String, apiKey: Option[String] = None) = {
path.startsWith("http") match {
case true => Source.fromURL(path + apiKey.getOrElse("")).mkString
case false => Source.fromFile(path).mkString