forked from loafle/openapi-generator-original
* Add async support to scala client. * Format api endpoints. * Modify build.sbt. * Change date format and pass StoreApis tests. * Add StringReader and StringWriter to support string serialization/deserialization. * update petstore samples for scala clients * Update maven and gradle dependency. Update tests to pass compilation.
23 lines
442 B
Plaintext
23 lines
442 B
Plaintext
package {{invokerPackage}}
|
|
|
|
{{#imports}}import {{import}}
|
|
{{/imports}}
|
|
import {{apiPackage}}._
|
|
|
|
import com.wordnik.swagger.client._
|
|
|
|
import java.io.Closeable
|
|
|
|
class {{clientName}}(config: SwaggerConfig) extends Closeable {
|
|
val locator = config.locator
|
|
val name = config.name
|
|
|
|
private[this] val client = transportClient
|
|
|
|
protected def transportClient: TransportClient = new RestClient(config)
|
|
|
|
def close() {
|
|
client.close()
|
|
}
|
|
}
|