Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger v1 #1654

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ grails.project.dependency.resolution = {
grailsCentral()
mavenCentral()

jcenter()
mavenRepo "http://jcenter.bintray.com/"



// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
//mavenRepo "http://maven.crbs.ucsd.edu/nexus/content/repositories/NIF-snapshot/"
//mavenRepo "http://maven.crbs.ucsd.edu/nexus/conxrs
// ]tent/repositories/NIF-snapshot/"
//mavenRepo "http://www.biojava.org/download/maven/"
}

Expand Down Expand Up @@ -99,6 +104,19 @@ grails.project.dependency.resolution = {

// compile "org.grails:quartz:1.0.2"

// swagger includes
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'
// compile group: 'javax.ws.rs', name: 'javax.ws.rs', version: '2.0'
// compile group: 'io.swagger', name: 'swagger-annotations', version: '1.5.15'
// compile group: 'io.swagger', name: 'swagger-core', version: '1.5.15'
// compile group: 'io.swagger', name: 'swagger-jaxrs', version: '1.5.15'
// compile group: 'io.github.robwin', name: 'swagger2markup', version: '0.9.2'
// compile group: 'io.swagger', name: 'swagger-ui', version: '3.0.14'
// compile 'org.webjars:swagger-ui:2.1.0'

compile "com.github.rahulsom:swaggydoc-commons:0.28.0"


}

plugins {
Expand Down Expand Up @@ -149,7 +167,7 @@ grails.project.dependency.resolution = {
compile ":yammer-metrics:3.0.1-2"
compile "org.grails.plugins:quartz2:2.1.6.2"


compile "org.grails.plugins:swaggydoc:0.28.0"

//compile ":joda-time:1.4"
// TODO: re-add when ready to install functional tests
Expand All @@ -169,6 +187,8 @@ grails.project.dependency.resolution = {
test(':code-coverage:2.0.3-3') {
export = false
}


}
}

Expand Down
20 changes: 20 additions & 0 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
// if (System.properties["${appName}.config.location"]) {
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
// }
org.grails.jaxrs.url.mappings = ['/api','/swagger.*']
org.grails.jaxrs.provider.init.parameters = [
'com.sun.jersey.config.property.packages':
'io.swagger.sample.resource;io.swagger.sample.model;io.swagger.jaxrs.listing;io.swagger.jaxrs.json']

extraSrcDirs = "$basedir/src/gwt/org.bbop.apollo.gwt.shared"
eventCompileStart = {
Expand Down Expand Up @@ -429,4 +433,20 @@ jbrowse {
// }
}

swaggydoc {
contact = "rahul.som@gmail.com"
description = """
| This is a sample server Petstore server. You can find out more about Swagger
| at <a href="http://swagger.wordnik.com">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger.
| For this sample,
| you can use the api key "special-key" to test the authorization filters""".stripMargin()
license = "Apache 2.0"
licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.html"
termsOfServiceUrl = "http://helloreverb.com/terms/"
title = "Swaggydoc Demo App"
apiVersion = "1.0"
}

grails.mime.disable.accept.header.userAgents = []

}
10 changes: 6 additions & 4 deletions grails-app/conf/UrlMappings.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class UrlMappings {
"/jbrowse/data/trackList.json"(controller:"jbrowse", action: "trackList")



"/${clientToken}/AnnotationEditorService"(controller:"annotationEditor",action: "handleOperation",params:params)
"/Login"(controller:"login",action: "handleOperation",params:params)
"/${clientToken}/Login"(controller:"login",action: "handleOperation",params:params)
Expand All @@ -71,9 +70,12 @@ class UrlMappings {
"/IOService/download"(controller:"IOService",action: "download", params:params)
"/${clientToken}/IOService/download"(controller:"IOService",action: "download", params:params)

"/jbrowse/web_services/api"(controller:"annotationEditor",action: "web_services", params:params)
"/jbrowse/web_services/api"(controller:"webServices",action: "index", params:params)
"/${clientToken}/jbrowse/web_services/api"(controller:"webServices",action: "index", params:params)
// "/jbrowse/web_services/api"(controller:"annotationEditor",action: "web_services", params:params)
// "/jbrowse/web_services/api"(controller:"webServices",action: "index", params:params)
// "/${clientToken}/jbrowse/web_services/api"(controller:"webServices",action: "index", params:params)




// if all else fails
// TODO: pass all of these into the same function and remap from there
Expand Down
Loading