diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..238f5e6 --- /dev/null +++ b/build.gradle @@ -0,0 +1,42 @@ +apply plugin: 'groovy' +apply plugin: 'idea' +apply plugin: 'eclipse' + +def artifactory = 'buildserver.supportspace.com' +group = 'com.supportspace' +archivesBaseName = 'swagger-gen-groovy' +version = '0.1' + +buildscript { + repositories { + maven { url 'http://repo.jfrog.org/artifactory/gradle-plugins' } + } + dependencies { + classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') + } +} + +repositories { + mavenCentral() + mavenLocal() + mavenCentral(artifactUrls: ['http://maven.springframework.org/milestone']) + maven { url "http://$artifactory:8080/artifactory/repo" } +} + +ext { + swagger_annotations_version = "1.5.8" + jackson_version = "2.7.0" +} + +dependencies { + compile 'org.codehaus.groovy:groovy-all:2.4.6' + compile "io.swagger:swagger-annotations:$swagger_annotations_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-databind:$jackson_version" + compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" + compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1' +} + +task wrapper(type: Wrapper) { gradleVersion = '1.6' } diff --git a/src/main/groovy/io/swagger/api/ApiUtils.groovy b/src/main/groovy/io/swagger/api/ApiUtils.groovy new file mode 100644 index 0000000..877ed4e --- /dev/null +++ b/src/main/groovy/io/swagger/api/ApiUtils.groovy @@ -0,0 +1,50 @@ +package io.swagger.api; + +import groovyx.net.http.HTTPBuilder +import groovyx.net.http.Method + +import static groovyx.net.http.ContentType.JSON +import static java.net.URI.create; + +class ApiUtils { + + def invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, method, container, type) { + def (url, uriPath) = buildUrlAndUriPath(basePath, versionPath, resourcePath) + println "url=$url uriPath=$uriPath" + def http = new HTTPBuilder(url) + http.request( Method.valueOf(method), JSON ) { + uri.path = uriPath + uri.query = queryParams + response.success = { resp, json -> + if (type != null) { + onSuccess(parse(json, container, type)) + } + } + response.failure = { resp -> + onFailure(resp.status, resp.statusLine.reasonPhrase) + } + } + } + + + def buildUrlAndUriPath(basePath, versionPath, resourcePath) { + // HTTPBuilder expects to get as its constructor parameter an URL, + // without any other additions like path, therefore we need to cut the path + // from the basePath as it is represented by swagger APIs + // we use java.net.URI to manipulate the basePath + // then the uriPath will hold the rest of the path + URI baseUri = create(basePath) + def pathOnly = baseUri.getPath() + [basePath-pathOnly, pathOnly+versionPath+resourcePath] + } + + + def parse(object, container, clazz) { + if (container == "List") { + return object.collect {parse(it, "", clazz)} + } else { + return clazz.newInstance(object) + } + } + +} diff --git a/src/main/groovy/io/swagger/api/DraftsetsApi.groovy b/src/main/groovy/io/swagger/api/DraftsetsApi.groovy new file mode 100644 index 0000000..4a45b4b --- /dev/null +++ b/src/main/groovy/io/swagger/api/DraftsetsApi.groovy @@ -0,0 +1,152 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.AsyncJob +import io.swagger.model.Draftset + +import java.util.*; + +@Mixin(ApiUtils) +class DraftsetsApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def draftsetIdClaimPut ( String id, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/claim" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "PUT", "", + Draftset.class ) + + } + def draftsetIdDelete ( String id, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "DELETE", "", + AsyncJob.class ) + + } + def draftsetIdPublishPost ( String id, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/publish" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "POST", "", + AsyncJob.class ) + + } + def draftsetIdSubmitToPost ( String id, String role, String user, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/submit-to" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + if (!"null".equals(String.valueOf(role))) + queryParams.put("role", String.valueOf(role)) +if (!"null".equals(String.valueOf(user))) + queryParams.put("user", String.valueOf(user)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "POST", "", + Draftset.class ) + + } + def draftsetsGet ( String include, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftsets" + + // query params + def queryParams = [:] + def headerParams = [:] + + + if (!"null".equals(String.valueOf(include))) + queryParams.put("include", String.valueOf(include)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "array", + Draftset.class ) + + } + def draftsetsPost ( String displayName, String description, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftsets" + + // query params + def queryParams = [:] + def headerParams = [:] + + + if (!"null".equals(String.valueOf(displayName))) + queryParams.put("display-name", String.valueOf(displayName)) +if (!"null".equals(String.valueOf(description))) + queryParams.put("description", String.valueOf(description)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "POST", "", + null ) + + } +} diff --git a/src/main/groovy/io/swagger/api/JobsApi.groovy b/src/main/groovy/io/swagger/api/JobsApi.groovy new file mode 100644 index 0000000..2c8ed0c --- /dev/null +++ b/src/main/groovy/io/swagger/api/JobsApi.groovy @@ -0,0 +1,57 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.FinishedJob + +import java.util.*; + +@Mixin(ApiUtils) +class JobsApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def statusFinishedJobsJobidGet ( String jobid, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/status/finished-jobs/{jobid}" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (jobid == null) { + throw new RuntimeException("missing required params jobid") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + FinishedJob.class ) + + } + def statusWritesLockedGet ( Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/status/writes-locked" + + // query params + def queryParams = [:] + def headerParams = [:] + + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + Boolean.class ) + + } +} diff --git a/src/main/groovy/io/swagger/api/MetadataApi.groovy b/src/main/groovy/io/swagger/api/MetadataApi.groovy new file mode 100644 index 0000000..95973ec --- /dev/null +++ b/src/main/groovy/io/swagger/api/MetadataApi.groovy @@ -0,0 +1,65 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.Draftset + +import java.util.*; + +@Mixin(ApiUtils) +class MetadataApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def draftsetIdGet ( String id, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + Draftset.class ) + + } + def draftsetIdPut ( String id, String displayName, String description, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + if (!"null".equals(String.valueOf(displayName))) + queryParams.put("display-name", String.valueOf(displayName)) +if (!"null".equals(String.valueOf(description))) + queryParams.put("description", String.valueOf(description)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "PUT", "", + Draftset.class ) + + } +} diff --git a/src/main/groovy/io/swagger/api/QueryingApi.groovy b/src/main/groovy/io/swagger/api/QueryingApi.groovy new file mode 100644 index 0000000..2061c53 --- /dev/null +++ b/src/main/groovy/io/swagger/api/QueryingApi.groovy @@ -0,0 +1,107 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.File + +import java.util.*; + +@Mixin(ApiUtils) +class QueryingApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def draftsetIdDataGet ( String id, String graph, Boolean unionWithLive, Integer timeout, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/data" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) +if (!"null".equals(String.valueOf(unionWithLive))) + queryParams.put("union-with-live", String.valueOf(unionWithLive)) +if (!"null".equals(String.valueOf(timeout))) + queryParams.put("timeout", String.valueOf(timeout)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + File.class ) + + } + def draftsetIdQueryGet ( String id, String query, Boolean unionWithLive, Integer timeout, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/query" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (query == null) { + throw new RuntimeException("missing required params query") + } + + if (!"null".equals(String.valueOf(query))) + queryParams.put("query", String.valueOf(query)) +if (!"null".equals(String.valueOf(unionWithLive))) + queryParams.put("union-with-live", String.valueOf(unionWithLive)) +if (!"null".equals(String.valueOf(timeout))) + queryParams.put("timeout", String.valueOf(timeout)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + File.class ) + + } + def draftsetIdQueryPost ( String id, String query, Boolean unionWithLive, Integer timeout, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/query" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (query == null) { + throw new RuntimeException("missing required params query") + } + + if (!"null".equals(String.valueOf(unionWithLive))) + queryParams.put("union-with-live", String.valueOf(unionWithLive)) +if (!"null".equals(String.valueOf(timeout))) + queryParams.put("timeout", String.valueOf(timeout)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "POST", "", + File.class ) + + } +} diff --git a/src/main/groovy/io/swagger/api/SparqlEndpointsApi.groovy b/src/main/groovy/io/swagger/api/SparqlEndpointsApi.groovy new file mode 100644 index 0000000..2d19289 --- /dev/null +++ b/src/main/groovy/io/swagger/api/SparqlEndpointsApi.groovy @@ -0,0 +1,65 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.File + +import java.util.*; + +@Mixin(ApiUtils) +class SparqlEndpointsApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def sparqlLiveGet ( String query, Integer timeout, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/sparql/live" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (query == null) { + throw new RuntimeException("missing required params query") + } + + if (!"null".equals(String.valueOf(query))) + queryParams.put("query", String.valueOf(query)) +if (!"null".equals(String.valueOf(timeout))) + queryParams.put("timeout", String.valueOf(timeout)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "", + File.class ) + + } + def sparqlLivePost ( String query, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/sparql/live" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (query == null) { + throw new RuntimeException("missing required params query") + } + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "POST", "", + File.class ) + + } +} diff --git a/src/main/groovy/io/swagger/api/UpdatingDataApi.groovy b/src/main/groovy/io/swagger/api/UpdatingDataApi.groovy new file mode 100644 index 0000000..eeb713f --- /dev/null +++ b/src/main/groovy/io/swagger/api/UpdatingDataApi.groovy @@ -0,0 +1,160 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.AsyncJob +import io.swagger.model.Draftset + +import java.util.*; + +@Mixin(ApiUtils) +class UpdatingDataApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def draftsetIdChangesDelete ( String id, String graph, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/changes" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (graph == null) { + throw new RuntimeException("missing required params graph") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "DELETE", "", + Draftset.class ) + + } + def draftsetIdDataDelete ( String id, String data, String graph, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/data" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (data == null) { + throw new RuntimeException("missing required params data") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "DELETE", "", + AsyncJob.class ) + + } + def draftsetIdDataPut ( String id, String data, String graph, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/data" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (data == null) { + throw new RuntimeException("missing required params data") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "PUT", "", + AsyncJob.class ) + + } + def draftsetIdGraphDelete ( String id, String graph, Boolean silent, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/graph" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (graph == null) { + throw new RuntimeException("missing required params graph") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) +if (!"null".equals(String.valueOf(silent))) + queryParams.put("silent", String.valueOf(silent)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "DELETE", "", + Draftset.class ) + + } + def draftsetIdGraphPut ( String id, String graph, Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/draftset/{id}/graph" + + // query params + def queryParams = [:] + def headerParams = [:] + + // verify required params are set + if (id == null) { + throw new RuntimeException("missing required params id") + } + // verify required params are set + if (graph == null) { + throw new RuntimeException("missing required params graph") + } + + if (!"null".equals(String.valueOf(graph))) + queryParams.put("graph", String.valueOf(graph)) + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "PUT", "", + AsyncJob.class ) + + } +} diff --git a/src/main/groovy/io/swagger/api/UsersApi.groovy b/src/main/groovy/io/swagger/api/UsersApi.groovy new file mode 100644 index 0000000..82ef1a3 --- /dev/null +++ b/src/main/groovy/io/swagger/api/UsersApi.groovy @@ -0,0 +1,35 @@ +package io.swagger.api; + +import groovyx.net.http.* +import static groovyx.net.http.ContentType.* +import static groovyx.net.http.Method.* +import io.swagger.api.ApiUtils + +import io.swagger.model.User + +import java.util.*; + +@Mixin(ApiUtils) +class UsersApi { + String basePath = "https://localhost/v1" + String versionPath = "/api/v1" + + def usersGet ( Closure onSuccess, Closure onFailure) { + // create path and map path parameters (TODO) + String resourcePath = "/users" + + // query params + def queryParams = [:] + def headerParams = [:] + + + + + // Also still TODO: form params, body param + + invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, + "GET", "array", + User.class ) + + } +} diff --git a/src/main/groovy/io/swagger/model/AsyncJob.groovy b/src/main/groovy/io/swagger/model/AsyncJob.groovy new file mode 100644 index 0000000..164d18a --- /dev/null +++ b/src/main/groovy/io/swagger/model/AsyncJob.groovy @@ -0,0 +1,17 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@Canonical +class AsyncJob { + + String type = null + + String finishedJob = null + + String restartId = null + + +} + diff --git a/src/main/groovy/io/swagger/model/Draftset.groovy b/src/main/groovy/io/swagger/model/Draftset.groovy new file mode 100644 index 0000000..e3c9c4d --- /dev/null +++ b/src/main/groovy/io/swagger/model/Draftset.groovy @@ -0,0 +1,49 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Date; +import io.swagger.model.Graph; +import io.swagger.model.HashMap; +import io.swagger.model.Map; +import io.swagger.model.UUID; +import java.util.List; +@Canonical +class Draftset { + + /* Unique identifier representing this draftset */ + UUID id = null + + /* The user who created this Draftset */ + String createdBy = null + + Map changes = new HashMap() + + /* Display name of the Draftset */ + String displayName = null + + /* The current owner of this Draftset */ + String currentOwner = null + + /* The owner who submitted this Draftset for review */ + String submittedBy = null + + /* The required role for users who can claim this Draftset */ + String claimRole = null + + /* The user who can claim this Draftset */ + String claimUser = null + + /* A description of the Draftset */ + String description = null + + /* IS0 8601 DateTime representing the time the draftsets metadata was last updated */ + Date updatedAt = null + + /* IS0 8601 DateTime representing the time the draftset was created */ + Date createdAt = null + + +} + diff --git a/src/main/groovy/io/swagger/model/Error.groovy b/src/main/groovy/io/swagger/model/Error.groovy new file mode 100644 index 0000000..13ea3ac --- /dev/null +++ b/src/main/groovy/io/swagger/model/Error.groovy @@ -0,0 +1,19 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ErrorException; +@Canonical +class Error { + + String type = null + + /* String representing the class of error that occurred */ + String errorType = null + + ErrorException exception = null + + +} + diff --git a/src/main/groovy/io/swagger/model/ErrorException.groovy b/src/main/groovy/io/swagger/model/ErrorException.groovy new file mode 100644 index 0000000..af549bb --- /dev/null +++ b/src/main/groovy/io/swagger/model/ErrorException.groovy @@ -0,0 +1,14 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@Canonical +class ErrorException { + + /* An error message relating to the specific exception */ + String message = null + + +} + diff --git a/src/main/groovy/io/swagger/model/FinishedJob.groovy b/src/main/groovy/io/swagger/model/FinishedJob.groovy new file mode 100644 index 0000000..d70f2ea --- /dev/null +++ b/src/main/groovy/io/swagger/model/FinishedJob.groovy @@ -0,0 +1,21 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@Canonical +class FinishedJob { + + String type = null + + String restartId = null + + String errorClass = null + + String message = null + + Object details = null + + +} + diff --git a/src/main/groovy/io/swagger/model/Graph.groovy b/src/main/groovy/io/swagger/model/Graph.groovy new file mode 100644 index 0000000..6914226 --- /dev/null +++ b/src/main/groovy/io/swagger/model/Graph.groovy @@ -0,0 +1,13 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@Canonical +class Graph { + + String status = null + + +} + diff --git a/src/main/groovy/io/swagger/model/User.groovy b/src/main/groovy/io/swagger/model/User.groovy new file mode 100644 index 0000000..baec4a8 --- /dev/null +++ b/src/main/groovy/io/swagger/model/User.groovy @@ -0,0 +1,17 @@ +package io.swagger.model; + +import groovy.transform.Canonical +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@Canonical +class User { + + /* Username of the user */ + String username = null + + /* role of the user */ + String role = null + + +} +