Skip to content

Commit

Permalink
Merge pull request #26 from smollweide/develop
Browse files Browse the repository at this point in the history
v0.12.0
  • Loading branch information
smollweide authored Apr 9, 2017
2 parents 9217e91 + 601e3e6 commit af4a57c
Show file tree
Hide file tree
Showing 173 changed files with 4,282 additions and 5,773 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.idea/
/node_modules/
/test/
/src/libraries/
/src/swagger/
/src/templates/
/demo/
51 changes: 0 additions & 51 deletions .eslintrc

This file was deleted.

9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
"extends": "@namics/eslint-config/configurations/es5-node.js",
"rules": {
"complexity": 0,
"valid-jsdoc": 0,
"require-jsdoc": 0,
"no-useless-escape": 0,
},
};
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.idea
node_modules
/preferences.json
/example_rest_folder/*/*/*/mock/response.txt
rest
/demo/rest/*/*/*/mock/response.txt
/test/tmp
/test/func-imported
/tmp
npm-debug.log
/func-imported
/func-imported
18 changes: 10 additions & 8 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/example_rest_folder
example_rest_folder
/func
func
/func2
func2
/demo/rest
demo/rest
/demo/func
demo/func
/demo/func2
demo/func2
/test
test
/doc
doc
/.idea
.idea
/src/swagger
src/swagger
/tmp
tmp
/func-imported
func-imported
/demo/func-imported
demo/func-imported
npm-debug.log
.eslintrc
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
language: node_js
node_js:
- "6"
- "5"
- "4"
- "0.12"
35 changes: 0 additions & 35 deletions app.js

This file was deleted.

4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

environment:
matrix:
- nodejs_version: 0.12
- nodejs_version: 4
- nodejs_version: 5
- nodejs_version: 6

version: "{build}"
Expand All @@ -24,4 +22,4 @@ install:
test_script:
- node --version
- npm --version
- npm test
- npm test
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions demo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

var mockServer = require('./../mock-server.js');
var dest = __dirname + '/rest';
var replacePathsStr = '/v2/{baseSiteId}';
var responseFuncPath = __dirname + '/func-imported';

// http://petstore.swagger.io/v2/swagger.json

mockServer({
restPath: dest,
dirName: __dirname,
funcPath: [
__dirname + '/func',
__dirname + '/func2',
responseFuncPath,
],
headers: {
'Global-Custom-Header': 'Global-Custom-Header',
},
customDTOToClassTemplate: __dirname + '/templates/dto_es6flow.ejs',
swaggerImport: {
protocol: 'http',
authUser: undefined,
authPass: undefined,
host: 'petstore.swagger.io',
port: 80,
path: '/v2/swagger.json',
dest: dest,
replacePathsStr: replacePathsStr,
createErrorFile: true,
createEmptyFile: true,
overwriteExistingDescriptions: true,
responseFuncPath: responseFuncPath,
},
});
5 changes: 5 additions & 0 deletions demo/rest/_DTO/AddressComponent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"long_name": "string",
"short_name": "string",
"types": [ "string" ]
}
File renamed without changes.
26 changes: 26 additions & 0 deletions demo/rest/_DTO/AddressWsDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"country": "$ref-CountryWsDTO",
"countryIsocode": "string",
"country2": "$ref-CountryWsDTO",
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"line1": "string",
"phone": "string",
"postalCode": "string",
"streetName": "string",
"streetNumber": "string",
"title": "string",
"titleCode": "string",
"town": "string",
"list": [
{
"country": "$ref-CountryWsDTO",
"email": "string"
}
],
"items": [
"$ref-CountryWsDTO"
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"name": "string",
"id": "number",
"isActive": "boolean",
"username": "string",
"email": "string",
"phone": "string",
"website": "string",
"card": "$ref-CardDTO",
"user": "$ref-UserDTO",
"entries": [
"$ref-CardDTO"
],
"users": [
"$ref-UserDTO"
],
"posts": [
{
"words": "string",
Expand Down
14 changes: 14 additions & 0 deletions demo/rest/_DTO/ComplexDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"list": [
{
"country": "$ref-CountryWsDTO",
"email": "string"
}
],
"items": [
"$ref-ImageDTO"
],
"parameters": {
"additional": "string"
}
}
5 changes: 5 additions & 0 deletions demo/rest/_DTO/CountryWsDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"code": "string",
"name": "string",
"value": "string"
}
6 changes: 6 additions & 0 deletions demo/rest/_DTO/Geocode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"results": [
"$ref-GeocodeResult"
],
"status": "string"
}
6 changes: 6 additions & 0 deletions demo/rest/_DTO/GeocodeResult.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"address_components": [
"$ref-AddressComponent"
],
"formatted_address": "string"
}
File renamed without changes.
3 changes: 3 additions & 0 deletions demo/rest/_DTO/ResponseFuncLoopDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"funcLoop": "$ref-ResponseFuncLoopDTO"
}
31 changes: 31 additions & 0 deletions demo/rest/_DTO/ResponseFuncTestDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"list": [
{
"country": "$ref-CountryWsDTO",
"email": "string"
}
],
"items": [
"$ref-CountryWsDTO"
],
"image": "$ref-CountryWsDTO",
"exampleString": "string",
"exampleNumber": "number",
"exampleInteger": "number",
"name": "string",
"firstName": "string",
"lastName": "string",
"country": "$ref-CountryWsDTO",
"countryIsocode": "string",
"email": "string",
"phone": "string",
"postalCode": "string",
"streetName": "string",
"streetNumber": "string",
"title": "string",
"titleCode": "string",
"town": "string",
"parameters": {
"additional": "string"
}
}
3 changes: 3 additions & 0 deletions demo/rest/_DTO/RuleWsDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"value": "string"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"validation": {
"success": {
"counter": 0
},
"success.headers": {
"counter": 1
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions demo/rest/products/#search/GET/response_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"success": "boolean"
}
Loading

0 comments on commit af4a57c

Please sign in to comment.