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

Problems that are always registered at the highest level when registering through RouterModule #63

Closed
hmmhmmhm opened this issue Apr 25, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@hmmhmmhm
Copy link

스크린샷 2022-04-25 오전 11 23 46
스크린샷 2022-04-25 오전 11 26 21

When registering through RouterModule
It would be good to use path information in nestia.

@samchon samchon added the help wanted Extra attention is needed label May 7, 2022
@samchon
Copy link
Owner

samchon commented May 7, 2022

As the @Module decorator function comes with the main program who really opens the backend server, it seems dangerous for the nestia to analyze it in the runtime level.

If someone has a good idea to solve this issue, please help me.

@TheYarin
Copy link
Contributor

I don't think you can go around this one, you have to analyze the module tree (including RouterModule) the same way Nest does.

@samchon samchon closed this as completed Mar 16, 2023
@samchon
Copy link
Owner

samchon commented Oct 19, 2023

https://nestia.io/docs/sdk/sdk/#configuration

@hmmhmmhm, @TheYarin Upgrade to v2.3, then you can do it.

import { INestiaConfig } from "@nestia/sdk";
import { Module, VersioningType } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";

const NESTIA_CONFIG: INestiaConfig = {
    input: async () => {
        const app = await NestFactory.create(MyModule);
        app.setGlobalPrefix("api");
        app.enableVersioning({
            type: VersioningType.URI,
            prefix: "v",
        });
        return app;
    },
    output: "src/api",
    e2e: "src/test",
    swagger: {
        output: "swagger.json",
        security: {
            bearer: {
                type: "apiKey",
            },
        },
    },
};
export default NESTIA_CONFIG;

@samchon samchon reopened this Oct 19, 2023
@samchon samchon closed this as completed Oct 19, 2023
@samchon samchon reopened this Oct 19, 2023
@samchon samchon closed this as completed Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants