Skip to content

Adds swagger and introduces repository-layer #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 52 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3039603
First step for adding swagger to project
mamen Jul 16, 2020
c72f1c2
Generating swagger-config FINALLY works
mamen Jul 16, 2020
08cd933
Further refactoring and implementing of swagger configs
mamen Jul 18, 2020
cd0b6c4
Finishes UserRouter
mamen Jul 18, 2020
2c39058
Reorders imports
mamen Jul 18, 2020
0975968
Fixes some tests
mamen Jul 18, 2020
285d918
Fixes swagger-ui
mamen Jul 18, 2020
5a8e85e
Further rewrite of routers to make use of tsoa
mamen Aug 2, 2020
4078601
Further rewrite of routers to make use of tsoa
mamen Aug 2, 2020
9c792e0
Further rewrite of routers to make use of tsoa
mamen Aug 2, 2020
55eaa46
Fixes linter errors
mamen Aug 2, 2020
35eea06
Update
mamen Aug 2, 2020
bcf5925
Some cleanup
mamen Aug 3, 2020
afaf3ab
Some cleanup
mamen Aug 3, 2020
f11477c
Removes watch from tsconfig.json and updates travis config to show bu…
mamen Aug 4, 2020
5182f60
Adds tsoa:gen to travis
mamen Aug 4, 2020
d943e76
Changes ; to &&
mamen Aug 4, 2020
f89d159
Adds creation of tsoa dir
mamen Aug 4, 2020
e05ecac
Adds tsoa:gen to test
mamen Aug 4, 2020
3e1036e
Adds tsoa files and fixes gulp task
mamen Aug 4, 2020
7732943
Adds return to badRequestRespone
mamen Aug 4, 2020
2687cdc
Fixes auth response
mamen Aug 4, 2020
58ee5e9
Fixes some tests
mamen Aug 4, 2020
67ab7d5
Introduces repositores and moves code from routers to repository and …
mamen Aug 4, 2020
ac43e85
Disables no-use-before-define for routes
mamen Aug 4, 2020
ec614a8
Removes commented out code
mamen Aug 4, 2020
ad699c7
Fixes some bugs
mamen Aug 4, 2020
71fabf9
Fixes more unit-tests
mamen Aug 6, 2020
3d36450
Fixes more unit-tests
mamen Aug 6, 2020
160feed
Merge remote-tracking branch 'origin/swagger-setup' into swagger-setup
mamen Aug 6, 2020
150aa7b
Fixes more unit-tests
mamen Aug 7, 2020
c0cf056
Fixes more unit-tests
mamen Aug 10, 2020
e4251dc
Fixes more unit-tests
mamen Aug 11, 2020
f9c7f0e
Adds latest swagger-definitions
mamen Aug 11, 2020
f6f1859
Removes auditing (for now)
mamen Aug 11, 2020
f10864e
Fixes SQ-issues
mamen Aug 11, 2020
b0d45fb
Updates readme and removes specification.yaml
mamen Aug 11, 2020
5b1a812
Updates tsoa.json and renames authenticate-method to login
mamen Aug 11, 2020
ad0b59a
Fixes lint-errors
mamen Aug 11, 2020
eb9577e
Moves test to correct folder
mamen Aug 11, 2020
af92a18
Removes unnecessary input validation
mamen Aug 11, 2020
54ce509
Adds test for router
mamen Aug 11, 2020
0d303fb
Adds test for AuthService and adds ts-mockito
mamen Aug 11, 2020
c3b2a36
Resolves comments
mamen Aug 12, 2020
d8d5773
Adds routers to inversify.config.ts
mamen Aug 12, 2020
04f9e72
Adds tests for BuildingService
mamen Aug 12, 2020
fae88ef
Fixes lint errors
mamen Aug 12, 2020
99ae7bb
First batch of resolved comments
mamen Aug 18, 2020
76a8751
First batch of resolved comments
mamen Aug 18, 2020
ee94de4
Fixes test-description
mamen Aug 18, 2020
cb72203
Removes not needed comments
mamen Aug 18, 2020
b70f511
Throws more specific exceptions and lint-cleanup
mamen Aug 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 26 additions & 28 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
const SEVERITY = {
OFF: 0,
WARNING: 1,
ERROR: 2
};

module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
Expand All @@ -12,39 +18,31 @@ module.exports = {
project: './tsconfig.json'
},
rules: {
"comma-dangle": [2, "always-multiline"],
"quotes": [2, "double"],
"eqeqeq": [2, "always"],
"arrow-parens": [2, "as-needed"],
"space-before-function-paren": [2, {
"comma-dangle": [SEVERITY.ERROR, "always-multiline"],
"quotes": [SEVERITY.ERROR, "double"],
"eqeqeq": [SEVERITY.ERROR, "always"],
"arrow-parens": [SEVERITY.ERROR, "as-needed"],
"space-before-function-paren": [SEVERITY.ERROR, {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"object-curly-spacing": [2, "always"],
"max-len": ["warn", { "code": 120, "tabWidth": 2 }],
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/no-empty-interface": 0,
"no-unused-vars": 2,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-var-requires": 2,
"require-jsdoc": [2, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}],
"unused-imports/no-unused-imports-ts": 2,
"unused-imports/no-unused-vars-ts": 1,
"@typescript-eslint/interface-name-prefix": 0,
"object-curly-spacing": [SEVERITY.ERROR, "always"],
"max-len": [SEVERITY.WARNING, { "code": 120, "tabWidth": 2 }],
"@typescript-eslint/no-use-before-define": SEVERITY.WARNING,
"@typescript-eslint/no-namespace": SEVERITY.OFF,
"@typescript-eslint/no-empty-interface": SEVERITY.OFF,
"no-unused-vars": SEVERITY.ERROR,
"@typescript-eslint/no-unused-vars": SEVERITY.ERROR,
"@typescript-eslint/no-explicit-any": SEVERITY.ERROR,
"@typescript-eslint/explicit-function-return-type": SEVERITY.OFF,
"@typescript-eslint/no-var-requires": SEVERITY.ERROR,
"require-jsdoc": SEVERITY.OFF,
"unused-imports/no-unused-imports-ts": SEVERITY.ERROR,
"unused-imports/no-unused-vars-ts": SEVERITY.WARNING,
"@typescript-eslint/interface-name-prefix": SEVERITY.OFF,
"@typescript-eslint/naming-convention": [
2,
SEVERITY.ERROR,
{
"selector": "default",
"format": ["PascalCase", "UPPER_CASE"]
Expand Down
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
- NODE_ENV=development

stages:
- "Audit"
#- "Audit"
- "Build"
- "Test"
- "Lint"
Expand All @@ -30,19 +30,20 @@ stages:

jobs:
include:
- stage: "Audit"
if: type = pull_request
script: audit-ci --low --report-type full
#- stage: "Audit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO readd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, github does auditions out-of-the-box so we could speed up our CI builds by removing the auditing

# if: type = pull_request
# script: audit-ci --low --report-type full
- &build
stage: "Build"
script: npm run-script build
script: npm run-script tsoa:gen && npm run-script build
node_js: '8'
- <<: *build
node_js: '10'
- <<: *build
node_js: '12'
- stage: "Test"
script:
- npm run-script tsoa:gen
- git fetch --unshallow --quiet
- sudo mysql -u root < test/ci.sql
- npm run-script test-coverage
Expand Down
Loading