We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm noticing the generated json and yml does have basePath in it, but the server is not accessible with the base path.
The generated swagger.json
{ "basePath": "/swagger-demo", "definitions": {}, .. .. ..
My swaggerConfig.json is
"swagger": { "basePath": "/swagger-demo", "outputDirectory": "./dist", "entryFile": "./src/routes/catService.ts", } }``` My server.ts is ```import express from 'express'; const app = express(); import bodyParser from 'body-parser'; import {Server} from "typescript-rest"; import {CatService} from "./routes/catService"; const swaggerUi = require('swagger-ui-express'); const swaggerDocument = require('./swagger.json'); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.get('/ping', (req: any, res: any) => { res.send('PONG')}); Server.buildServices(app, CatService); app.listen(3000); console.log(`Server @: 3000`);
Expected result: the api end points should be accessible at http://localhost:3000/swagger-demo/cat http://localhost:3000/swagger-demo/ping
If this problem relates to the typescript-rest module, I'm happy to move it.
typescript-rest
The text was updated successfully, but these errors were encountered:
Were you able to access swagger ui ?
Sorry, something went wrong.
No branches or pull requests
I'm noticing the generated json and yml does have basePath in it, but the server is not accessible with the base path.
The generated swagger.json
My swaggerConfig.json is
Expected result: the api end points should be accessible at
http://localhost:3000/swagger-demo/cat
http://localhost:3000/swagger-demo/ping
If this problem relates to the
typescript-rest
module, I'm happy to move it.The text was updated successfully, but these errors were encountered: