forked from loafle/openapi-generator-original
updates the codegen to also include the project name for sbt
This commit is contained in:
parent
f3dc69a7e7
commit
a656ea301e
31
specs/extra.sbt
Normal file
31
specs/extra.sbt
Normal file
@ -0,0 +1,31 @@
|
||||
val wordnikSnapshots = "Wordnik Snapshots" at "https://ci.aws.wordnik.com/artifactory/m2-snapshots/"
|
||||
|
||||
val wordnikReleases = "Wordnik Releases" at "https://ci.aws.wordnik.com/artifactory/m2-releases/"
|
||||
|
||||
val wordnikRemoteRepos = "Wordnik Remote Repos" at "https://ci.aws.wordnik.com/artifactory/remote-repos/"
|
||||
|
||||
scalaVersion := "2.11.2"
|
||||
|
||||
crossScalaVersions := Seq("2.10.4", "2.11.2")
|
||||
|
||||
scalacOptions ++= Seq("-unchecked", "-deprecation", "-optimize", "-Xcheckinit", "-encoding", "utf8")
|
||||
|
||||
version := "1.6.1"
|
||||
|
||||
publishTo <<= (version) { version: String =>
|
||||
val artifactory = "https://ci.aws.wordnik.com/artifactory/m2-"
|
||||
if (version.trim.endsWith("SNAPSHOT"))
|
||||
Some("snapshots" at artifactory + "snapshots")
|
||||
else
|
||||
Some("releases" at artifactory + "releases")
|
||||
}
|
||||
|
||||
publishMavenStyle := true
|
||||
|
||||
publishArtifact in Test := false
|
||||
|
||||
pomIncludeRepository := { x => false }
|
||||
|
||||
credentials += Credentials("Artifactory Realm", "ci.aws.wordnik.com", "mavenuser", "DEEaffe987a")
|
||||
|
||||
resolvers ++= Seq(wordnikSnapshots, wordnikReleases, wordnikRemoteRepos)
|
@ -1,20 +1,14 @@
|
||||
package com.wordnik.swagger.codegen
|
||||
|
||||
import scala.collection.mutable
|
||||
import java.io.{File, FileWriter}
|
||||
import java.io.File
|
||||
|
||||
import com.wordnik.swagger.codegen.language.CodegenConfig
|
||||
import com.wordnik.swagger.codegen.model._
|
||||
import scala.collection.mutable.{HashMap, ListBuffer}
|
||||
import language.CodegenConfig
|
||||
import scala.io.Source
|
||||
import org.json4s.jackson.Serialization._
|
||||
import org.fusesource.scalate.{Template, TemplateSource, TemplateEngine}
|
||||
import org.apache.commons.io.FileUtils
|
||||
import com.wordnik.swagger.codegen.util.{CoreUtils, ApiExtractor, ResourceExtractor}
|
||||
import com.wordnik.swagger.codegen.spec.SwaggerSpecValidator
|
||||
import mojolly.inflector.InflectorImports._
|
||||
import org.rogach.scallop.{ScallopConf, Scallop}
|
||||
import scala.annotation.switch
|
||||
import org.rogach.scallop.ScallopConf
|
||||
|
||||
import scala.collection.JavaConverters._
|
||||
import scala.collection.mutable.HashMap
|
||||
|
||||
case class SwaggerApi(
|
||||
clientName: String,
|
||||
@ -119,6 +113,7 @@ object ScalaAsyncClientGenerator extends App {
|
||||
props += "fileMap" -> resUrl
|
||||
|
||||
props += "clientName" -> cfg.api.clientName.underscore.pascalize
|
||||
props += "projectName" -> cfg.api.clientName.underscore.dasherize
|
||||
|
||||
clientOpts.properties = props.toMap.asJava
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user