From 555bc01db66b8480f42bfed2d6c8c2996d98d106 Mon Sep 17 00:00:00 2001 From: "McGinn,Aaron" Date: Tue, 26 Dec 2017 22:17:13 -0600 Subject: [PATCH 1/2] [JavaPKMST-Server] Change Java 8 code to Java 7 to meet project specifications --- .../codegen/languages/JavaPKMSTServerCodegen.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java index bb197056da4..aa46f647c0c 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java @@ -82,8 +82,13 @@ public JavaPKMSTServerCodegen() { // Middleware config this.cliOptions.add(new CliOption("pkmstInterceptor", "PKMST Interceptor")); this.apiTestTemplateFiles.put("api_test.mustache", ".java"); - this.modelDocTemplateFiles.remove("model_doc.mustache", ".md"); - this.apiDocTemplateFiles.remove("api_doc.mustache", ".md"); + + if (".md".equals(this.modelDocTemplateFiles.get("model_doc.mustache"))) { + this.modelDocTemplateFiles.remove("model_doc.mustache"); + } + if (".md".equals(this.apiDocTemplateFiles.get("api_doc.mustache"))) { + this.apiDocTemplateFiles.remove("api_doc.mustache"); + } } private static String getAccept(Operation operation) { From e8609514a871b09387f051e0017841f64e0de8d4 Mon Sep 17 00:00:00 2001 From: "McGinn,Aaron" Date: Tue, 26 Dec 2017 22:18:24 -0600 Subject: [PATCH 2/2] Revert "Update readme to Java 8" This reverts commit 54ce4caafc3909056630d97b428b2e8a9022a6f9. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8a4b93f0885..2b9ff48835c 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes ### Prerequisites -If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): +If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 7 runtime at a minimum): ```sh wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.0/swagger-codegen-cli-2.3.0.jar -O swagger-codegen-cli.jar @@ -108,12 +108,12 @@ brew install swagger-codegen To build from source, you need the following installed and available in your $PATH: -* [Java 8](http://java.oracle.com) +* [Java 7 or 8](http://java.oracle.com) * [Apache maven 3.3.3 or greater](http://maven.apache.org/) #### OS X Users -Don't forget to install Java 8. You probably have 1.6. +Don't forget to install Java 7 or 8. You probably have 1.6. Export JAVA_HOME in order to use the supported Java version: ```sh @@ -916,7 +916,7 @@ Presentations/Videos/Tutorials/Books - 2017/09/21 - [Generating an Elastic Cloud Enterprise Client](https://www.elastic.co/blog/generating-an-elastic-cloud-enterprise-client) by [Greg Marzouka](https://github.com/gmarz) ([Elastic](https://www.elastic.co/)) - 2017/09/26 - [How to Use IoT Application Enablement Api Hub JSON Descriptor in Postman and How to Generate Client Code](https://www.linkedin.com/in/radu-simen/) by [Radu Simen](https://www.linkedin.com/in/radu-simen/) ([SAP](https://www.sap.com/)) - 2017/09/28 - [Swagger Codegenで APIクライアントgem 自動生成 #m3kt](https://speakerdeck.com/juntaki/swagger-codegende-apikuraiantogem-zi-dong-sheng-cheng-number-m3kt) by [Jumpei Takiyasu](https://github.com/juntaki) -- 2017/09/30 - [Swaggerのテンプレートを魔改造した話 #渋谷java](https://www.slideshare.net/int128/swagger-80309224) by [Hidetake Iwata](https://github.com/int128) ([NTT DATA Corporation](http://www.nttdata.com/global/en/)) +- 2017/09/30 - [Swaggerのテンプレートを魔改造した話 #渋谷java](https://www.slideshare.net/int128/swagger-80309224) by [Hidetake Iwata](https://github.com/int128) ([NTT DATA Corporation](http://www.nttdata.com/global/en/)) - 2017/10/04 - [Enterprise-friendly Java client for Microsoft Machine Learning Server](https://blogs.msdn.microsoft.com/mlserver/2017/10/04/enterprise-friendly-java-client-for-microsoft-machine-learning-server/) by [Pratik Palnitkar](https://www.linkedin.com/in/pratikpalnitkar/) ([Microsoft](https://www.microsoft.com/)) - 2017/10/08 - [Generating a REST Ada client with OpenAPI and Swagger Codegen](https://blog.vacs.fr/vacs/blogs/post.html?post=2017/10/08/Generating-a-REST-Ada-client-with-OpenAPI-and-Swagger-Codegen) by [Stephane Carrez](https://github.com/stcarrez) - 2017/11/08 - [A Beginner's Guide to Code Generation for REST APIs](https://gum.co/swagger_codegen_beginner)(eBook) by [William Cheng](https://twitter.com/wing328)