Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3bcceaa
Bump diff from 3.2.0 to 3.5.0
dependabot[bot] Jul 20, 2019
16303b0
keep the right node_modules directory for resolveTypes
JulienSergent Jul 22, 2019
3667a21
added @Consumes decorator
Jul 24, 2019
84b2a7c
generate 'produces' from @Accept if @Produces is not specified
Jul 24, 2019
1109f03
closes #96
pauloFernandes Oct 1, 2019
e36efd6
Bump handlebars from 4.1.2 to 4.5.3
dependabot[bot] Dec 26, 2019
669aa21
added @Hidden decorator: hide some endpoints from the generated swagg…
Feb 12, 2020
663537f
fixed tslint
Feb 12, 2020
8a1739b
updated README.MD
Feb 12, 2020
7729314
Merge pull request #104 from Insalien/hidden-endpoints
thiagobustamante Feb 20, 2020
d229d00
Merge pull request #103 from TeselaGen/master
thiagobustamante Feb 20, 2020
6913065
Merge pull request #94 from pauloFernandes/96-enum-definition-type
thiagobustamante Feb 20, 2020
96b5fa9
Merge pull request #88 from Insalien/add-consumes-decorator
tnrich Feb 21, 2020
f3e513f
Merge pull request #86 from JulienSergent/hotfix/keep-module-typescri…
tnrich Feb 21, 2020
e474eeb
Merge pull request #85 from thiagobustamante/dependabot/npm_and_yarn/…
tnrich Feb 21, 2020
5dc6731
Merge pull request #101 from thiagobustamante/dependabot/npm_and_yarn…
tnrich Feb 21, 2020
c2024a1
support union types
Feb 21, 2020
a956a13
Merge branch 'master' of https://github.com/thiagobustamante/typescri…
Feb 21, 2020
c591024
fix travis deploy
Feb 21, 2020
ce35c40
fix release
Feb 21, 2020
cc10432
fix travis
Feb 21, 2020
83ff9e1
Moved all dependencies to devDependencies to avoid dependency creep
Feb 25, 2020
3a47f3c
Merge pull request #108 from oranoran/fix/devDependencies
thiagobustamante Feb 27, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ coverage
*.log
npm-debug.log*
.idea
reports
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
language: node_js
node_js:
- '6'
script: nyc npm test && nyc report --reporter=text-lcov | coveralls
- '12'
script: npm run build && npm run test:coverage | coveralls
deploy:
provider: npm
edge: true
email: thiago@cruxframework.org
skip_cleanup: true
api_key:
secure: h36KkxAMuHGXktDL1FB3rgl8s3cPLdSBpbBMN7A5XpXF3E7mMIPEEEfSQ5nfRc5wxmlseBZjyjhcXbEavluAGmBB+d3bBRz3ifqrwqT/DTPRdTMkMhqVKC7ywAzh+pU8qkmcX9TVMmYYJQhFIj7fWy0yr2DRoEEa6Ei4ZEDFH/hHOSzHmfJNZAoXuI7rZ1nJoQZ1UJsGERMNp+xdJdVY1jng33karymkl+zNrqxPPf+enfazxqo4+s5fQM/pAU64IEyj+JCpzYrXG9uu+1CDOVyp+G1bdVYohCJj1nUFqSpaKyYHTjO963ogVnMjMFlDlzy2C6jD6/q6f4dqWiG6W1EAau2VdJdfEVfOqiZ7djPYR8DP/qdLIBUdpcWJKOchL3+Y/S6vz25s/aGWmZrqBp1Lwmuod9vh+Wdfm96kWA9HQO6JIt+bsxa8RNstNnWlb8FCf9O48S/Jhjl5UTcgsSjxvXJe/5V0bqXSW6MNGwP89Y7mnDgV+r2zd/twuYOc020YBNHqdvywQJrMk1m+rP3MLJPgnzjfFrXUKmoL2JI9Nr73rce1U6E3D24KXdE43NmvulXve6DQ23Zc57U2DKNxlxvac+Jx6ksoQ3rYkWa9d3R3bYYD5e3HAn9D+QsJz+kTo8uVlH/9PjAAE4TyhJkQY+XikIVfa36dFmAXeos=
secure: JdM7eESWBSHdBOcOggIU89iJRQW1zE86GtBuJs3IbUvezDMlNIhVZNzv0sFPU9wJi5xr7FWROcZYaNz5ud6WHMof5ZKW4H5Wb91l4iaUaAt2u0ZzavA7htMV4GHl01Z3ZeDHpDCB92ag/zbweRS+D1RMAK0KeWEoZi0Cb+Zu1XglmCGHLH6C7SuSEbTgIPsHVzKn9+/BHpEV4yxl0JvH2eHxg0mPgSofTi7qTTl2fLqVRv1YFPHrO//vTGWmtiN4uTw/pH72YpfV0ua8JIFvlleTGmeRmPDne6sYoyn33mtRdYqsGndL4+DDNpnbDjwRfa5Q2dEzjmFpjj+qeJU67h/eAicMDvVJKC/yrxZ1l3l7kIoXbeP/AG/kFK7XqaP8WA+u0T5UOAk2A+/3t9UKeq33vfGcFwOgd/j/ubNPMNTGJu0vyLJlLCI6+YZFKnu2lwSeJM2Wz+u1R2jnVCN8sC/s7Wwz4s0uGiG9kcJAkh/cTotcf92UyNP6vhHALqy6xB2tT/Wm0vVlNAJG1mGGXShOyX2Q+Kn2bggrRZAqP6HkQjDddVqbFl9xjeJPFaAbq7yYyRtqTzqmySfqMT+lP30F9NKQYmgRMsusTxxPuqfmPhyUzeXxeDMdqAbUB2l5AfdDt9128l51qmci7mI56Soa6/ivaLO8GkZSzs41lEo=
on:
tags: true
repo: thiagobustamante/typescript-rest-swagger
33 changes: 33 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ This is a tool to generate swagger files from a [typescript-rest](https://github
- [@Response](#response)
- [@Example](#example)
- [@Tags](#tags)
- [@Consumes](#consumes)
- [@Produces](#produces)
- [@Hidden](#hidden)
- [@IsInt, @IsLong, @IsFloat, @IsDouble](#isint-islong-isfloat-isdouble)
- [SwaggerConfig.json](#swaggerconfigjson)

Expand Down Expand Up @@ -164,6 +166,21 @@ class PeopleService {
```


#### @Consumes

Document the consumes property in generated swagger docs

```typescript
@Path('people')
@Consumes('text/html')
class PeopleService {
@PUT
createPeople(@Param('name') name: string, people: People) {
// ...
}
}
```

#### @Produces

Document the produces property in generated swagger docs
Expand All @@ -182,6 +199,22 @@ class PeopleService {
A Default produces is already created in swagger documentation from the method return analisys.
You can use this decorator to override this default produces.

#### @Hidden

Allow to hide some APIs from swagger docs (ex: test or dev APIs, etc ...).
This decorator can be applied for the whole class or only a single method

```typescript
@Path('people')
@Hidden()
class PeopleService {
@GET
getPeople(@Param('name') name: string) {
// ...
}
}
```

#### @IsInt, @IsLong, @IsFloat, @IsDouble

Document the type of a `number` property or parameter in generated swagger docs.
Expand Down
Loading