Comments (12)
Still having the same issue:
router:
{
path: '/private',
module: PrivateModule,
},
{
path: '/public',
module: PublicModule,
children: [
{
path: '/notifications',
module: NotificationModule,
},
],
},
];
In swagger ui I have /notifications API instead of /public/notificatons
from nest-router.
Hi @mentos1386
the implementation of Nest RouterModule
was missing in Swagger
Package.
This PR nestjs/swagger#54 will solve the problem.
Thank again for reporting ❤️
from nest-router.
Thought this my be related.
I am having an issue with swagger generating routes with regards to nested resource, for example if I have the following routes:
export const routes: Routes = [
{
path: '/ninja',
module: NinjaModule,
children: [
{ path: ':ninjaId/cats', module: CatsModule },
],
},
];
The generated swagger document will generate the following route where ninjaId
is the parent id:
GET /ninja/:ninjaId/cats
In order to work correctly with the swagger UI what it should generate is the below route (Notice the curly brackets):
GET /ninja/{ninjaId}/cats
Any ideas?
My dependencies are:
"dependencies": {
"@nestjs/common": "^6.0.0",
"@nestjs/core": "^6.0.0",
"@nestjs/platform-express": "^6.0.0",
"@nestjs/platform-fastify": "^6.0.1",
"@nestjs/swagger": "^3.0.1",
"class-transformer": "^0.2.0",
"class-validator": "^0.9.1",
"fastify-swagger": "^2.3.2",
"nest-router": "^1.0.9",
"nestjs-config": "^1.3.21",
"reflect-metadata": "^0.1.12",
"rimraf": "^2.6.2",
"rxjs": "^6.3.3"
},
"devDependencies": {
"@types/express": "^4.16.0",
"@types/jest": "^23.3.13",
"@types/node": "^10.12.18",
"@types/supertest": "^2.0.7",
"@nestjs/testing": "^6.0.0",
"jest": "^23.6.0",
"nodemon": "^1.18.9",
"prettier": "^1.15.3",
"supertest": "^3.4.1",
"ts-jest": "^23.10.5",
"ts-node": "^7.0.1",
"tsconfig-paths": "^3.7.0",
"tslint": "5.12.1",
"typescript": "^3.2.4"
},
from nest-router.
it is ok now
closing.
from nest-router.
I'm facing the same problem as @alexvanzyl
from nest-router.
@Joel-Raju @alexvanzyl any minimal repository to reproduce that behavior?
I will reopen that issue.
from nest-router.
@shekohex checkout this example https://github.com/Joel-Raju/nest-router/tree/master/examples/heroes
see the endpoint generated by swagger for /heroes/:heroId/powers
from nest-router.
@Joel-Raju @alexvanzyl the hot fix is on its way nestjs/swagger#253 😃
from nest-router.
@Joel-Raju @alexvanzyl it dose not seem to be a hot fix at all 😂 , it just got merged now
please once a new version of @nestjs/swagger
package get published, give it another try, so i can close this issue.
thanks :)
from nest-router.
I have the same problem with DmytroMysak
from nest-router.
@shekohex this appears to still be an issue
from nest-router.
Hi @chriskuech
@shekohex this appears to still be an issue
I fix it by moving from the nest-router external package to the one included in @nestjs/core as explained in the readme of this project:
As of Nestjs v8.0.0 This module got added into the @nestjs/core. see the docs with that being said, this package is still maintained (for now).
from nest-router.
Related Issues (20)
- There is no such a word like childrens in english HOT 1
- Params in nested routes and swagger HOT 3
- Difference to nestjs RouterModule ? HOT 1
- How to use versioning in v7? HOT 1
- dynamic path intercepts static HOT 4
- Require controller and http method instead of module HOT 1
- Intercepter per route (module) HOT 3
- An in-range update of @nestjs/core is breaking the build 🚨 HOT 3
- An in-range update of @nestjs/core is breaking the build 🚨 HOT 1
- Route resolving fails when setGlobalPrefix() is used HOT 5
- Nest-Router Adding Additional Slash before Controller HOT 4
- An in-range update of @nestjs/core is breaking the build 🚨 HOT 1
- Route gets double slash when try to define root level routes; `//users` instead of `/users` HOT 6
- Add a name to the routes HOT 3
- Defining routes as both nested and top level HOT 3
- Lack of documentation HOT 1
- Nested modules does not retain prefixes. HOT 2
- Child routes with parent modules HOT 2
- Question : What are the drawbacks of having route prefix at controller level instead of module level ? HOT 2
- [Problem] Order of evaluation of routes is the other way round HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nest-router.