Add Apache v2 license to auto-generated scalatra files.

This commit is contained in:
clasnake
2016-06-13 22:55:18 +08:00
parent c5eda5557e
commit ce456fafdc
21 changed files with 698 additions and 108 deletions

View File

@@ -86,7 +86,7 @@ public class ScalatraServerCodegen extends DefaultCodegen implements CodegenConf
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("build.sbt", "", "build.sbt"));
supportingFiles.add(new SupportingFile("web.xml", "/src/main/webapp/WEB-INF", "web.xml"));
supportingFiles.add(new SupportingFile("JettyMain.scala", sourceFolder, "JettyMain.scala"));
supportingFiles.add(new SupportingFile("JettyMain.mustache", sourceFolder, "JettyMain.scala"));
supportingFiles.add(new SupportingFile("Bootstrap.mustache", sourceFolder, "ScalatraBootstrap.scala"));
supportingFiles.add(new SupportingFile("ServletApp.mustache", sourceFolder, "ServletApp.scala"));
supportingFiles.add(new SupportingFile("project/build.properties", "project", "build.properties"));

View File

@@ -1,3 +1,5 @@
{{>licenseInfo}}
import {{apiPackage}}._
import akka.actor.ActorSystem
import io.swagger.app.{ResourcesApp, SwaggerApp}

View File

@@ -1,3 +1,5 @@
{{>licenseInfo}}
import org.eclipse.jetty.server._
import org.eclipse.jetty.webapp.WebAppContext
import org.scalatra.servlet.ScalatraListener

View File

@@ -1,3 +1,5 @@
{{>licenseInfo}}
package io.swagger.app
import _root_.akka.actor.ActorSystem

View File

@@ -1,3 +1,5 @@
{{>licenseInfo}}
package {{package}}
{{#imports}}import {{import}}

View File

@@ -0,0 +1,23 @@
/**
* {{{appName}}}
* {{{appDescription}}}
*
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* 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.
*/

View File

@@ -1,3 +1,5 @@
{{>licenseInfo}}
package {{package}}
{{#imports}}import {{import}}