Merge remote-tracking branch 'origin/master' into 2.3.0

This commit is contained in:
wing328
2017-03-22 15:55:56 +08:00
90 changed files with 2437 additions and 144 deletions

View File

@@ -8,6 +8,8 @@ cache:
directories:
- $HOME/.m2
- $HOME/.ivy2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/samples/client/petstore/php/SwaggerClient-php/vendor
- $HOME/samples/client/petstore/ruby/venodr/bundle
- $HOME/samples/client/petstore/python/.venv/
@@ -48,6 +50,8 @@ before_install:
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version
- java -version
install:
# Add Godeps dependencies to GOPATH and PATH

View File

@@ -231,7 +231,7 @@ public class AkkaScalaClientCodegen extends AbstractScalaCodegen implements Code
}
private String formatIdentifier(String name, boolean capitalized) {
String identifier = camelize(name, true);
String identifier = camelize(sanitizeName(name), true);
if (capitalized) {
identifier = StringUtils.capitalize(identifier);
}
@@ -290,6 +290,11 @@ public class AkkaScalaClientCodegen extends AbstractScalaCodegen implements Code
}
}
@Override
public String toModelName(final String name) {
return formatIdentifier(name, true);
}
private static abstract class CustomLambda implements Mustache.Lambda {
@Override
public void execute(Template.Fragment frag, Writer out) throws IOException {
@@ -301,7 +306,6 @@ public class AkkaScalaClientCodegen extends AbstractScalaCodegen implements Code
public abstract String formatFragment(String fragment);
}
private static class JavadocLambda extends CustomLambda {
@Override
public String formatFragment(String fragment) {

View File

@@ -86,6 +86,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
super.processOpts();
additionalProperties.put("packageGuid", packageGuid);
additionalProperties.put("dockerTag", this.packageName.toLowerCase());
apiPackage = packageName + ".Controllers";
modelPackage = packageName + ".Models";

View File

@@ -107,6 +107,8 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile"));
supportingFiles.add(new SupportingFile("dockerignore.mustache", "", ".dockerignore"));
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).")
.defaultValue("swagger_server"));

View File

@@ -1,4 +1,4 @@
FROM microsoft/dotnet:latest
FROM microsoft/dotnet:1.0.3-sdk-projectjson
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

View File

@@ -22,6 +22,6 @@ build.bat
```
cd src/{{packageName}}
docker build -t {{packageName}} .
docker run -p 5000:5000 {{packageName}}
docker build -t {{dockerTag}} .
docker run -p 5000:5000 {{dockerTag}}
```

View File

@@ -189,37 +189,37 @@ this.{{name}} = {{name}};
}
{{/generatePropertyChanged}}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {{#vars}}{{#hasValidation}}{{#maxLength}}
// {{{name}}} ({{{datatype}}}) maxLength
if(this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}})
{
yield return new ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" });
}
{{/maxLength}}{{#minLength}}
// {{{name}}} ({{{datatype}}}) minLength
if(this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}})
{
yield return new ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" });
}
{{/minLength}}{{#maximum}}
// {{{name}}} ({{{datatype}}}) maximum
if(this.{{{name}}} > ({{{datatype}}}){{maximum}})
{
yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
}
{{/maximum}}{{#minimum}}
// {{{name}}} ({{{datatype}}}) minimum
if(this.{{{name}}} < ({{{datatype}}}){{minimum}})
{
yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
}
{{/minimum}}{{#pattern}}
// {{{name}}} ({{{datatype}}}) pattern
Regex regex{{{name}}} = new Regex(@"{{vendorExtensions.x-regex}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}});
if (false == regex{{{name}}}.Match(this.{{{name}}}).Success)
{
yield return new ValidationResult("Invalid value for {{{name}}}, must match a pattern of {{pattern}}.", new [] { "{{{name}}}" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of {{pattern}}.", new [] { "{{{name}}}" });
}
{{/pattern}}{{/hasValidation}}{{/vars}}
yield break;

View File

@@ -0,0 +1,31 @@
{{#supportPython2}}
FROM python:2-alpine
{{/supportPython2}}
{{^supportPython2}}
FROM python:3-alpine
{{/supportPython2}}
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
{{#supportPython2}}
RUN pip install --no-cache-dir -r requirements.txt
{{/supportPython2}}
{{^supportPython2}}
RUN pip3 install --no-cache-dir -r requirements.txt
{{/supportPython2}}
COPY . /usr/src/app
EXPOSE {{serverPort}}
{{#supportPython2}}
ENTRYPOINT ["python"]
{{/supportPython2}}
{{^supportPython2}}
ENTRYPOINT ["python3"]
{{/supportPython2}}
CMD ["-m", "{{packageName}}"]

View File

@@ -46,3 +46,15 @@ To launch the integration tests, use tox:
sudo pip install tox
tox
```
## Running with Docker
To run the server on a Docker container, please execute the following from the root directory:
```bash
# building the image
docker build -t {{packageName}} .
# starting up a container
docker run -p {{serverPort}}:{{serverPort}} {{packageName}}
```

View File

@@ -0,0 +1,72 @@
.travis.yaml
.swagger-codegen-ignore
README.md
tox.ini
git_push.sh
test-requirements.txt
setup.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
venv/
.python-version
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
#Ipython Notebook
.ipynb_checkpoints

View File

@@ -446,6 +446,7 @@
</div>
</div>
</div>
{{>js_jsonformatter}}
{{>js_jsonschemaview}}
{{>js_jsonref}}
{{>js_webfontloader}}

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{{#apiInfo}}
{{#apis}}
{{#operations}}
export * from './{{ apiFilename }}';
import { {{ classname }} } from './{{ classname }}';
export * from './{{ classFilename }}';
import { {{ classname }} } from './{{ classFilename }}';
{{/operations}}
{{/apis}}
export const APIS = [ {{#apis}}{{#operations}}{{ classname }}, {{/operations}}{{/apis}}];
export const APIS = [{{#apis}}{{#operations}}{{ classname }}{{/operations}}{{^-last}}, {{/-last}}{{/apis}}];
{{/apiInfo}}

View File

@@ -95,8 +95,8 @@ object UserApi {
.withErrorResponse[Unit](400)
object LoginUserHeaders {
def `x-Rate-Limit`(r: ApiReturnWithHeaders) = r.getIntHeader("X-Rate-Limit")
def `x-Expires-After`(r: ApiReturnWithHeaders) = r.getDateTimeHeader("X-Expires-After")
def xRateLimit(r: ApiReturnWithHeaders) = r.getIntHeader("X-Rate-Limit")
def xExpiresAfter(r: ApiReturnWithHeaders) = r.getDateTimeHeader("X-Expires-After")
}
/**
*

View File

@@ -127,7 +127,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -148,7 +148,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -98,7 +98,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -142,7 +142,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -142,7 +142,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -188,7 +188,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -163,7 +163,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -127,7 +127,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -163,7 +163,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -168,7 +168,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -223,7 +223,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -329,85 +329,85 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// Integer (int?) maximum
if(this.Integer > (int?)100)
{
yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
}
// Integer (int?) minimum
if(this.Integer < (int?)10)
{
yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
}
// Int32 (int?) maximum
if(this.Int32 > (int?)200)
{
yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
}
// Int32 (int?) minimum
if(this.Int32 < (int?)20)
{
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
// Number (decimal?) maximum
if(this.Number > (decimal?)543.2)
{
yield return new ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
}
// Number (decimal?) minimum
if(this.Number < (decimal?)32.1)
{
yield return new ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
}
// _Float (float?) maximum
if(this._Float > (float?)987.6)
{
yield return new ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
}
// _Float (float?) minimum
if(this._Float < (float?)54.3)
{
yield return new ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
}
// _Double (double?) maximum
if(this._Double > (double?)123.4)
{
yield return new ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
}
// _Double (double?) minimum
if(this._Double < (double?)67.8)
{
yield return new ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
}
// _String (string) pattern
Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
if (false == regex_String.Match(this._String).Success)
{
yield return new ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
}
// Password (string) maxLength
if(this.Password != null && this.Password.Length > 64)
{
yield return new ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
}
// Password (string) minLength
if(this.Password != null && this.Password.Length < 10)
{
yield return new ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
}
yield break;

View File

@@ -124,7 +124,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -148,7 +148,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -142,7 +142,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -127,7 +127,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -166,7 +166,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -223,7 +223,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -236,7 +236,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -125,7 +125,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -127,7 +127,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -218,7 +218,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -164,7 +164,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -114,7 +114,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -158,7 +158,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -158,7 +158,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -179,7 +179,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -179,7 +179,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -184,7 +184,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -239,7 +239,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -345,85 +345,85 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// Integer (int?) maximum
if(this.Integer > (int?)100)
{
yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
}
// Integer (int?) minimum
if(this.Integer < (int?)10)
{
yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
}
// Int32 (int?) maximum
if(this.Int32 > (int?)200)
{
yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
}
// Int32 (int?) minimum
if(this.Int32 < (int?)20)
{
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
// Number (decimal?) maximum
if(this.Number > (decimal?)543.2)
{
yield return new ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
}
// Number (decimal?) minimum
if(this.Number < (decimal?)32.1)
{
yield return new ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
}
// _Float (float?) maximum
if(this._Float > (float?)987.6)
{
yield return new ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
}
// _Float (float?) minimum
if(this._Float < (float?)54.3)
{
yield return new ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
}
// _Double (double?) maximum
if(this._Double > (double?)123.4)
{
yield return new ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
}
// _Double (double?) minimum
if(this._Double < (double?)67.8)
{
yield return new ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
}
// _String (string) pattern
Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
if (false == regex_String.Match(this._String).Success)
{
yield return new ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
}
// Password (string) maxLength
if(this.Password != null && this.Password.Length > 64)
{
yield return new ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
}
// Password (string) minLength
if(this.Password != null && this.Password.Length < 10)
{
yield return new ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
}
yield break;

View File

@@ -140,7 +140,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -164,7 +164,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -158,7 +158,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -182,7 +182,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -239,7 +239,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -252,7 +252,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -141,7 +141,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -128,7 +128,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -234,7 +234,7 @@ namespace IO.Swagger.Model
}
}
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}

View File

@@ -1,7 +1,7 @@
export * from './pet.service';
import { PetService } from './PetService';
export * from './store.service';
import { StoreService } from './StoreService';
export * from './user.service';
import { UserService } from './UserService';
export const APIS = [ PetService, StoreService, UserService, ];
export * from './PetApi';
import { PetApi } from './PetApi';
export * from './StoreApi';
import { StoreApi } from './StoreApi';
export * from './UserApi';
import { UserApi } from './UserApi';
export const APIS = [PetApi, StoreApi, UserApi];

View File

@@ -1,4 +1,4 @@
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703181635
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703211709
### Building
@@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
_published:_
```
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703181635 --save
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703211709 --save
```
_unPublished (not recommended):_

View File

@@ -1,7 +1,7 @@
export * from './pet.service';
import { PetService } from './PetService';
export * from './store.service';
import { StoreService } from './StoreService';
export * from './user.service';
import { UserService } from './UserService';
export const APIS = [ PetService, StoreService, UserService, ];
export * from './PetApi';
import { PetApi } from './PetApi';
export * from './StoreApi';
import { StoreApi } from './StoreApi';
export * from './UserApi';
import { UserApi } from './UserApi';
export const APIS = [PetApi, StoreApi, UserApi];

View File

@@ -1,6 +1,6 @@
{
"name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1-SNAPSHOT.201703181635",
"version": "0.0.1-SNAPSHOT.201703211709",
"description": "swagger client for @swagger/angular2-typescript-petstore",
"author": "Swagger Codegen Contributors",
"keywords": [
@@ -10,29 +10,30 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "typings install && tsc --outDir dist/"
"build": "typings install && tsc --outDir dist/",
"postinstall": "npm run build"
},
"peerDependencies": {
"@angular/core": "^2.0.0",
"@angular/http": "^2.0.0",
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/core": "^2.0.0-rc.5",
"@angular/http": "^2.0.0-rc.5",
"@angular/common": "^2.0.0-rc.5",
"@angular/compiler": "^2.0.0-rc.5",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.17"
},
"devDependencies": {
"@angular/core": "^2.0.0",
"@angular/http": "^2.0.0",
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/platform-browser": "^2.0.0",
"@angular/core": "^2.0.0-rc.5",
"@angular/http": "^2.0.0-rc.5",
"@angular/common": "^2.0.0-rc.5",
"@angular/compiler": "^2.0.0-rc.5",
"@angular/platform-browser": "^2.0.0-rc.5",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.17",
"typescript": "^2.0.0",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.17",
"typescript": "^1.8.10",
"typings": "^1.3.2"
},
"publishConfig":{

File diff suppressed because one or more lines are too long

View File

@@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.xproj", "{4AD738F8-0EE6-48AF-9501-113739BD4D31}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.xproj", "{3C799344-F285-4669-8FD5-7ED9B795D5C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -15,10 +15,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4AD738F8-0EE6-48AF-9501-113739BD4D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4AD738F8-0EE6-48AF-9501-113739BD4D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4AD738F8-0EE6-48AF-9501-113739BD4D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4AD738F8-0EE6-48AF-9501-113739BD4D31}.Release|Any CPU.Build.0 = Release|Any CPU
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -20,6 +20,6 @@ build.bat
```
cd src/IO.Swagger
docker build -t IO.Swagger .
docker run -p 5000:5000 IO.Swagger
docker build -t io.swagger .
docker run -p 5000:5000 io.swagger
```

View File

@@ -1,4 +1,4 @@
FROM microsoft/dotnet:latest
FROM microsoft/dotnet:1.0.3-sdk-projectjson
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

View File

@@ -6,7 +6,7 @@
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>{4AD738F8-0EE6-48AF-9501-113739BD4D31}</ProjectGuid>
<ProjectGuid>{3C799344-F285-4669-8FD5-7ED9B795D5C5}</ProjectGuid>
<RootNamespace>IO.Swagger</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>

View File

@@ -0,0 +1,72 @@
.travis.yaml
.swagger-codegen-ignore
README.md
tox.ini
git_push.sh
test-requirements.txt
setup.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
venv/
.python-version
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
#Ipython Notebook
.ipynb_checkpoints

View File

@@ -0,0 +1,16 @@
FROM python:3-alpine
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip3 install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
EXPOSE 8080
ENTRYPOINT ["python3"]
CMD ["-m", "swagger_server"]

View File

@@ -35,3 +35,15 @@ To launch the integration tests, use tox:
sudo pip install tox
tox
```
## Running with Docker
To run the server on a Docker container, please execute the following from the root directory:
```bash
# building the image
docker build -t swagger_server .
# starting up a container
docker run -p 8080:8080 swagger_server
```

View File

@@ -0,0 +1,29 @@
package controllers;
import java.io.File;
import apimodels.Pet;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
import play.mvc.Http;
public interface PetApiControllerImpInterface {
void addPet(Pet body);
void deletePet( Long petId, String apiKey);
List<Pet> findPetsByStatus( List<String> status);
List<Pet> findPetsByTags( List<String> tags);
Pet getPetById( Long petId);
void updatePet(Pet body);
void updatePetWithForm( String petId, String name, String status);
void uploadFile( Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file);
}

View File

@@ -0,0 +1,19 @@
package controllers;
import java.util.Map;
import apimodels.Order;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
public interface StoreApiControllerImpInterface {
void deleteOrder( String orderId);
Map<String, Integer> getInventory();
Order getOrderById( String orderId);
Order placeOrder(Order body);
}

View File

@@ -0,0 +1,27 @@
package controllers;
import java.util.List;
import apimodels.User;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
public interface UserApiControllerImpInterface {
void createUser(User body);
void createUsersWithArrayInput(List<User> body);
void createUsersWithListInput(List<User> body);
void deleteUser( String username);
User getUserByName( String username);
String loginUser( String username, String password);
void logoutUser();
void updateUser( String username, User body);
}

View File

@@ -0,0 +1,43 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>PlayServerTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Play Petstore Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>Play Test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./sbt_test_jdk8_only.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,11 @@
#!/bin/bash
java -version 2>&1 | grep "java version \"1.8"
if [ $? -eq 0 ]
then
echo "Running JDK8"
sbt test
else
echo "Not running JDK8"
fi