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

This commit is contained in:
wing328 2017-04-17 23:05:46 +08:00
commit c7ccb1a9a9
51 changed files with 728 additions and 710 deletions

View File

@ -796,6 +796,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [Svenska Spel AB](https://www.svenskaspel.se/)
- [TaskData](http://www.taskdata.com/)
- [ThoughtWorks](https://www.thoughtworks.com)
- [Trexle](https://trexle.com/)
- [Upwork](http://upwork.com/)
- [uShip](https://www.uship.com/)
- [VMware](https://vmware.com/)

View File

@ -91,6 +91,7 @@ public class CodegenParameter {
output.dataFormat = this.dataFormat;
output.collectionFormat = this.collectionFormat;
output.isCollectionFormatMulti = this.isCollectionFormatMulti;
output.isPrimitiveType = this.isPrimitiveType;
output.description = this.description;
output.unescapedDescription = this.unescapedDescription;
output.baseType = this.baseType;

View File

@ -1739,12 +1739,16 @@ public class DefaultCodegen {
CodegenProperty cp = fromProperty(property.name, ap.getItems());
updatePropertyForArray(property, cp);
} else if (p instanceof MapProperty) {
MapProperty ap = (MapProperty) p;
property.isContainer = true;
property.isMapContainer = true;
property.containerType = "map";
property.baseType = getSwaggerType(p);
property.minItems = ap.getMinProperties();
property.maxItems = ap.getMaxProperties();
// handle inner property
MapProperty ap = (MapProperty) p;
CodegenProperty cp = fromProperty("inner", ap.getAdditionalProperties());
updatePropertyForMap(property, cp);
} else {

View File

@ -1,9 +1,9 @@
{{#apiInfo}}
{{#apis}}
{{#operations}}
export * from './{{ classname }}';
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}}{{/apis}}];
{{/apiInfo}}

View File

@ -1,5 +1,5 @@
{{#models}}
{{#model}}
export * from './{{{ classname }}}';
export * from './{{{ classFilename }}}';
{{/model}}
{{/models}}

13
pom.xml
View File

@ -710,6 +710,18 @@
<module>samples/server/petstore/spring-mvc</module>
</modules>
</profile>
<profile>
<id>springboot-beanvalidation</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/server/petstore/springboot-beanvalidation</module>
</modules>
</profile>
<profile>
<id>springboot</id>
<activation>
@ -820,6 +832,7 @@
<module>samples/server/petstore/spring-mvc</module>
<module>samples/client/petstore/spring-cloud</module>
<module>samples/server/petstore/springboot</module>
<module>samples/server/petstore/springboot-beanvalidation</module>
<module>samples/server/petstore/jaxrs-cxf</module>
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
<module>samples/server/petstore/jaxrs-cxf-cdi</module>

View File

@ -1,3 +1,3 @@
export * from './FakeApi';
import { FakeApi } from './FakeApi';
export const APIS = [ FakeApi, ];
export const APIS = [FakeApi, ];

View File

@ -4,4 +4,4 @@ export * from './StoreApi';
import { StoreApi } from './StoreApi';
export * from './UserApi';
import { UserApi } from './UserApi';
export const APIS = [ PetApi, StoreApi, UserApi, ];
export const APIS = [PetApi, StoreApi, UserApi, ];

View File

@ -1,7 +1,7 @@
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];
export * from './pet.service';
import { PetService } from './pet.service';
export * from './store.service';
import { StoreService } from './store.service';
export * from './user.service';
import { UserService } from './user.service';
export const APIS = [PetService, StoreService, UserService];

View File

@ -1,4 +1,4 @@
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703271250
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704172305
### 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.201703271250 --save
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704172305 --save
```
_unPublished (not recommended):_

View File

@ -1,7 +1,7 @@
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];
export * from './pet.service';
import { PetService } from './pet.service';
export * from './store.service';
import { StoreService } from './store.service';
export * from './user.service';
import { UserService } from './user.service';
export const APIS = [PetService, StoreService, UserService];

View File

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

View File

@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-spring</artifactId>
<artifactId>swagger-spring-beanvalidation</artifactId>
<packaging>jar</packaging>
<name>swagger-spring</name>
<version>1.0.0</version>