Skip to content
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

MODULE_PATH #1520

Closed
yantrab opened this issue Feb 3, 2019 · 8 comments
Closed

MODULE_PATH #1520

yantrab opened this issue Feb 3, 2019 · 8 comments

Comments

@yantrab
Copy link

yantrab commented Feb 3, 2019

Hi,

There is something like Reflect.getMetadata(MODULE_PATH, metatype) in routes-resolver.ts
but there is no Reflect.defineMetadata with this constant , so I wonder from where this metadata came from, there is an options to set the module path?

Thanks.

@BrunnerLivio
Copy link
Member

Maybe check out the source code of nest-router

The author set the module path in RouterModule#buildPathMap

@kamilmysliwiec
Copy link
Member

Worth adding - router module functionality should be very likely added to the core package and brought under official nestjs organization.

@yantrab
Copy link
Author

yantrab commented Feb 3, 2019

@BrunnerLivio thanks.

There is an options to get the path of all controllers ?

@kamilmysliwiec
Copy link
Member

We are tracking this functionality here #1030

@yantrab
Copy link
Author

yantrab commented Feb 3, 2019

@kamilmysliwiec i meant to file path. i wont to build client generator, according to the controller statements.
i don't wont to using swagger, the models locateted in shared folder, and i wont to use them directly.

@victordidenko
Copy link

Wanted to create an issue, but found this one.
I'm not sure, but shouldn't be there

path = path ? path + basePath : basePath;

path = path ? basePath + path : basePath;

instead of

path = path ? path + basePath : basePath;

? Because basePath is global prefix here

this.routesResolver.resolve(this.httpAdapter, basePath);

@victordidenko
Copy link

My last message was fixed in #1594

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants