Giter Site home page Giter Site logo

olivierlsc / example-swagger-express-ts Goto Github PK

View Code? Open in Web Editor NEW
7.0 0.0 10.0 972 KB

License: MIT License

JavaScript 1.94% TypeScript 73.39% HTML 24.67%
typescript inversifyjs inversify express expressjs swagger swagger2 swagger-ui documentation rest-api

example-swagger-express-ts's People

Contributors

olivierlsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-swagger-express-ts's Issues

Error in @ApiModelProperty

Whenever I add the @ApiModelProperty on the attributes in my model I get the following error while building the code:

error: Cannot access property name on undefined
var propertyType = Reflect.getMetadata("design:type", target, propertyKey).name.toLowerCase();

Any idea why is this happening?

TSError: ⨯ Unable to compile TypeScript:

After npm install and running npm run dev , facing this error :
src/index.ts:72:22 - error TS2339: Property 'status' does not exist on type 'Response<any, Record<string, any>>'.

72 response.status(500).send('Something broke!');
~~~~~~
src/index.ts:78:5 - error TS2339: Property 'listen' does not exist on type 'Application'.

78 app.listen(3000);

Compile Error: Not Found express

TSError: ⨯ Unable to compile TypeScript:
error TS2688: Cannot find type definition file for 'express'.
src/index.ts(2,26): error TS7016: Could not find a declaration file for module 'express'.

2 ports with different swagger

with this example is possible deploy the same /api/users for different posts, obviously with every swagger without generate conflicts?
For instance:
-localhost:3190/api/users >> -localhost:3190/api-docs/swagger/
-localhost:4000/api/usersProtected >>-localhost:3190/api-docs/swagger/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.