diff --git a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/ClientOptInput.java b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/ClientOptInput.java index 36a9d74a60..9e8466824a 100644 --- a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/ClientOptInput.java +++ b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/ClientOptInput.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-codegen/src/main/resources/Java/model.mustache b/modules/swagger-codegen/src/main/resources/Java/model.mustache index 60aa5d72a3..cbaf1f83d3 100644 --- a/modules/swagger-codegen/src/main/resources/Java/model.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/model.mustache @@ -12,11 +12,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; * {{description}} **/{{/description}} @ApiModel(description = "{{{description}}}") -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { {{#vars}} - private {{{datatype}}} {{name}} = {{{defaultValue}}};{{#allowableValues}} - - //{{^min}}public enum {{name}}Enum { {{#values}} {{.}}, {{/values}} }; - {{/min}}{{/allowableValues}}{{/vars}} +public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { + {{#vars}}{{#isEnum}} + public enum {{datatype}} { + {{#allowableValues}}{{#values}} {{.}}, {{/values}}{{/allowableValues}} + }; + private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}} + private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}} {{#vars}} /**{{#description}} diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/Bootstrap.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/Bootstrap.java index d71cb88721..2bafc0e841 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/Bootstrap.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/Bootstrap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/ApiException.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/ApiException.java index 075531421e..1383c791aa 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/ApiException.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/ApiException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/BadRequestException.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/BadRequestException.java index 339df2e105..c0883b30ed 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/BadRequestException.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/BadRequestException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/NotFoundException.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/NotFoundException.java index a9b29e9949..e9a302b2f1 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/NotFoundException.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/exception/NotFoundException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/ApiResponse.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/ApiResponse.java index 32e6f68910..1dfc431b07 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/ApiResponse.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/ApiResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/Generated.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/Generated.java index 19c9a32817..6436498ac3 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/Generated.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/Generated.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/InputOption.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/InputOption.java index 446bb53db1..deee8e23c6 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/InputOption.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/model/InputOption.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/resource/SwaggerResource.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/resource/SwaggerResource.java index 0f5c6e2c14..645d777a0c 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/resource/SwaggerResource.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/resource/SwaggerResource.java @@ -1,19 +1,3 @@ -/** - * Copyright 2014 Reverb, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.wordnik.swagger.generator.resource; import com.wordnik.swagger.codegen.*; @@ -37,6 +21,7 @@ public class SwaggerResource { @GET @Path("/download/{fileId}") @Produces({"application/zip", "application/json"}) + @ApiOperation(value = "Downloads a pre-generated file", response = File.class) public Response downloadFile(@PathParam("fileId") String fileId) throws Exception { Generated g = fileMap.get(fileId); System.out.println("looking for fileId " + fileId); @@ -58,8 +43,7 @@ public class SwaggerResource { @POST @Path("/clients/{language}") @Produces({"application/zip", "application/json"}) - @ApiOperation(value = "Generates a client library based on the config", - notes = "The model representing this is not accurate, it needs to contain a consolidated JSON structure") + @ApiOperation(value = "Generates a client library based on the config") public Response generateClient( @ApiParam(value = "The target language for the client library", allowableValues = "android,java,php,objc,docs", required = true) @PathParam("language") String language, @ApiParam(value = "Configuration for building the client library", required = true) GeneratorInput opts) throws Exception { diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ApiOriginFilter.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ApiOriginFilter.java index 4d2d7ef570..b9d279d20a 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ApiOriginFilter.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ApiOriginFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ZipUtil.java b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ZipUtil.java index de462c57c1..1d090bf96d 100644 --- a/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ZipUtil.java +++ b/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ZipUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Reverb, Inc. + * Copyright 2015 Reverb, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.