Use https URL to download dependencies (#2248)

* fix groovy default value, use https to download dep

* update groovy build gradle file
This commit is contained in:
William Cheng 2019-02-27 23:26:53 +08:00 committed by GitHub
parent 92757581d6
commit 54d9c19c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 64 additions and 70 deletions

View File

@ -26,7 +26,7 @@ then
fi fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties -DdebugSupportingFiles=true" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor -DhideGenerationTimestamp=true $@" ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor -DhideGenerationTimestamp=true $@"
java ${JAVA_OPTS} -jar ${executable} ${ags} java ${JAVA_OPTS} -jar ${executable} ${ags}

View File

@ -2,14 +2,13 @@ apply plugin: 'groovy'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'eclipse' apply plugin: 'eclipse'
def artifactory = 'buildserver.supportspace.com' group = '{{groupId}}'
group = 'com.supportspace' version = '{{artifactVersion}}'
archivesBaseName = 'openapi-gen-groovy' archivesBaseName = 'openapi-gen-groovy'
version = '0.1'
buildscript { buildscript {
repositories { repositories {
maven { url 'http://repo.jfrog.org/artifactory/gradle-plugins' } maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' }
} }
dependencies { dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16')
@ -19,14 +18,12 @@ buildscript {
repositories { repositories {
mavenCentral() mavenCentral()
mavenLocal() mavenLocal()
mavenCentral(artifactUrls: ['http://maven.springframework.org/milestone'])
maven { url "http://$artifactory:8080/artifactory/repo" }
} }
ext { ext {
swagger_annotations_version = "1.5.21" swagger_annotations_version = "1.5.22"
jackson_version = "2.8.11" jackson_version = "2.8.11"
jackson_databind_version = "2.8.11.2" jackson_databind_version = "2.8.11.3"
} }
dependencies { dependencies {
@ -34,8 +31,8 @@ dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5"
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1' compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
} }

View File

@ -13,7 +13,7 @@ class {{classname}} {
{{#description}} {{#description}}
/* {{{description}}} */ /* {{{description}}} */
{{/description}} {{/description}}
{{{dataType}}} {{name}} = {{{defaultValue}}} {{{dataType}}} {{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}
{{/vars}} {{/vars}}
} }

View File

@ -10,13 +10,13 @@ scalaVersion := "2.12.3"
resolvers += Resolver.sonatypeRepo("snapshots") resolvers += Resolver.sonatypeRepo("snapshots")
resolvers += "TM" at "http://maven.twttr.com" resolvers += "TM" at "https://maven.twttr.com"
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository" resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/" resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
resolvers += "Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/" resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases/"
Defaults.itSettings Defaults.itSettings

View File

@ -57,7 +57,7 @@ shadowJar {
repositories { repositories {
mavenCentral() mavenCentral()
maven { url "http://dl.bintray.com/kotlin/ktor" } maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "https://dl.bintray.com/kotlin/kotlinx" } maven { url "https://dl.bintray.com/kotlin/kotlinx" }
} }

View File

@ -1 +1 @@
3.0.0-SNAPSHOT 4.0.0-SNAPSHOT

View File

@ -2,14 +2,13 @@ apply plugin: 'groovy'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'eclipse' apply plugin: 'eclipse'
def artifactory = 'buildserver.supportspace.com' group = 'org.openapitools'
group = 'com.supportspace' version = '1.0.0'
archivesBaseName = 'openapi-gen-groovy' archivesBaseName = 'openapi-gen-groovy'
version = '0.1'
buildscript { buildscript {
repositories { repositories {
maven { url 'http://repo.jfrog.org/artifactory/gradle-plugins' } maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' }
} }
dependencies { dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16')
@ -19,14 +18,12 @@ buildscript {
repositories { repositories {
mavenCentral() mavenCentral()
mavenLocal() mavenLocal()
mavenCentral(artifactUrls: ['http://maven.springframework.org/milestone'])
maven { url "http://$artifactory:8080/artifactory/repo" }
} }
ext { ext {
swagger_annotations_version = "1.5.21" swagger_annotations_version = "1.5.22"
jackson_version = "2.8.11" jackson_version = "2.8.11"
jackson_databind_version = "2.8.11.2" jackson_databind_version = "2.8.11.3"
} }
dependencies { dependencies {

View File

@ -15,7 +15,7 @@ class PetApi {
String basePath = "http://petstore.swagger.io/v2" String basePath = "http://petstore.swagger.io/v2"
String versionPath = "/api/v1" String versionPath = "/api/v1"
def addPet ( Pet pet, Closure onSuccess, Closure onFailure) { def addPet ( Pet body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/pet" String resourcePath = "/pet"
@ -24,8 +24,8 @@ class PetApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (pet == null) { if (body == null) {
throw new RuntimeException("missing required params pet") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support
@ -128,7 +128,7 @@ class PetApi {
} }
def updatePet ( Pet pet, Closure onSuccess, Closure onFailure) { def updatePet ( Pet body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/pet" String resourcePath = "/pet"
@ -137,8 +137,8 @@ class PetApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (pet == null) { if (body == null) {
throw new RuntimeException("missing required params pet") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support

View File

@ -72,7 +72,7 @@ class StoreApi {
} }
def placeOrder ( Order order, Closure onSuccess, Closure onFailure) { def placeOrder ( Order body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/store/order" String resourcePath = "/store/order"
@ -81,8 +81,8 @@ class StoreApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (order == null) { if (body == null) {
throw new RuntimeException("missing required params order") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support

View File

@ -14,7 +14,7 @@ class UserApi {
String basePath = "http://petstore.swagger.io/v2" String basePath = "http://petstore.swagger.io/v2"
String versionPath = "/api/v1" String versionPath = "/api/v1"
def createUser ( User user, Closure onSuccess, Closure onFailure) { def createUser ( User body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/user" String resourcePath = "/user"
@ -23,8 +23,8 @@ class UserApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (user == null) { if (body == null) {
throw new RuntimeException("missing required params user") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support
@ -35,7 +35,7 @@ class UserApi {
} }
def createUsersWithArrayInput ( List<User> user, Closure onSuccess, Closure onFailure) { def createUsersWithArrayInput ( List<User> body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/user/createWithArray" String resourcePath = "/user/createWithArray"
@ -44,8 +44,8 @@ class UserApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (user == null) { if (body == null) {
throw new RuntimeException("missing required params user") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support
@ -56,7 +56,7 @@ class UserApi {
} }
def createUsersWithListInput ( List<User> user, Closure onSuccess, Closure onFailure) { def createUsersWithListInput ( List<User> body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/user/createWithList" String resourcePath = "/user/createWithList"
@ -65,8 +65,8 @@ class UserApi {
def headerParams = [:] def headerParams = [:]
// verify required params are set // verify required params are set
if (user == null) { if (body == null) {
throw new RuntimeException("missing required params user") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support
@ -167,7 +167,7 @@ class UserApi {
} }
def updateUser ( String username, User user, Closure onSuccess, Closure onFailure) { def updateUser ( String username, User body, Closure onSuccess, Closure onFailure) {
// create path and map path parameters (TODO) // create path and map path parameters (TODO)
String resourcePath = "/user/{username}" String resourcePath = "/user/{username}"
@ -181,8 +181,8 @@ class UserApi {
} }
// verify required params are set // verify required params are set
if (user == null) { if (body == null) {
throw new RuntimeException("missing required params user") throw new RuntimeException("missing required params body")
} }
// TODO: form params, body param not yet support // TODO: form params, body param not yet support

View File

@ -6,8 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
@Canonical @Canonical
class Category { class Category {
Long id = null Long id
String name = null String name
} }

View File

@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModelProperty;
@Canonical @Canonical
class ModelApiResponse { class ModelApiResponse {
Integer code = null Integer code
String type = null String type
String message = null String message
} }

View File

@ -6,16 +6,16 @@ import io.swagger.annotations.ApiModelProperty;
@Canonical @Canonical
class Order { class Order {
Long id = null Long id
Long petId = null Long petId
Integer quantity = null Integer quantity
Date shipDate = null Date shipDate
/* Order Status */ /* Order Status */
String status = null String status
Boolean complete = false Boolean complete = false

View File

@ -10,17 +10,17 @@ import org.openapitools.model.Tag;
@Canonical @Canonical
class Pet { class Pet {
Long id = null Long id
Category category = null Category category = null
String name = null String name
List<String> photoUrls = new ArrayList<String>() List<String> photoUrls = new ArrayList<String>()
List<Tag> tags = new ArrayList<Tag>() List<Tag> tags = new ArrayList<Tag>()
/* pet status in the store */ /* pet status in the store */
String status = null String status
} }

View File

@ -6,8 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
@Canonical @Canonical
class Tag { class Tag {
Long id = null Long id
String name = null String name
} }

View File

@ -6,21 +6,21 @@ import io.swagger.annotations.ApiModelProperty;
@Canonical @Canonical
class User { class User {
Long id = null Long id
String username = null String username
String firstName = null String firstName
String lastName = null String lastName
String email = null String email
String password = null String password
String phone = null String phone
/* User Status */ /* User Status */
Integer userStatus = null Integer userStatus
} }

View File

@ -57,7 +57,7 @@ shadowJar {
repositories { repositories {
mavenCentral() mavenCentral()
maven { url "http://dl.bintray.com/kotlin/ktor" } maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "https://dl.bintray.com/kotlin/kotlinx" } maven { url "https://dl.bintray.com/kotlin/kotlinx" }
} }