forked from loafle/openapi-generator-original
removed unused method
This commit is contained in:
parent
59cd5380aa
commit
26bcc80ae3
@ -28,17 +28,6 @@ import scala.io.Source
|
|||||||
object CoreUtils {
|
object CoreUtils {
|
||||||
def m = JsonUtil.getJsonMapper
|
def m = JsonUtil.getJsonMapper
|
||||||
|
|
||||||
def fetchAndExtractAllModels(baseDoc: Documentation): Map[String, DocumentationSchema] = {
|
|
||||||
val modelObjects = new HashMap[String, DocumentationSchema]
|
|
||||||
baseDoc.getApis.foreach(api => {
|
|
||||||
val apiPath = (baseDoc.basePath + api.path).replaceAll(".\\{format\\}", ".json")
|
|
||||||
val sd = m.readValue(Source.fromURL(apiPath).mkString, classOf[Documentation])
|
|
||||||
for ((nm, model) <- extractModels(sd)) modelObjects += nm -> model
|
|
||||||
if (sd.getModels != null) sd.getModels.foreach(sm => modelObjects += sm._1 -> sm._2)
|
|
||||||
})
|
|
||||||
modelObjects.toMap
|
|
||||||
}
|
|
||||||
|
|
||||||
def extractAllModels(docs: List[Documentation]): Map[String, DocumentationSchema] = {
|
def extractAllModels(docs: List[Documentation]): Map[String, DocumentationSchema] = {
|
||||||
val modelObjects = new HashMap[String, DocumentationSchema]
|
val modelObjects = new HashMap[String, DocumentationSchema]
|
||||||
docs.foreach(sd => {
|
docs.foreach(sd => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user