samchon / nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
https://nestia.io/
MIT License
1.71k stars 87 forks source link

[Question or Bug Report] decompose option's bug on swagger generator with special tags, defined anonymous interface. #908

Closed rojiwon123 closed 3 weeks ago

rojiwon123 commented 1 month ago

Description

When I build a swagger document in decompose mode, the special tag information I defined in the query's attributes is not applied to the swagger document. Is this the intended behavior? If not, I think I have found a bug.

 @core.TypedRoute.Get()
    async getList(
        @core.TypedQuery()
        query: { start_date: string & typia.tags.Format<"date-time">, end_date: string & typia.tags.Format<"date-time"> },
    ): Promise<IUser[]> {
        return this.usecase.getList(query.start_date, query.end_date);
    }
{
    "name": "start_date",
    "in": "query",
    "schema": {},
    "required": true
},

version info.

"@nestia/sdk": "^3.2.0", "@nestia/core": "^3.2.0", "typescript": "^5.4.5",

rojiwon123 commented 1 month ago

This only happens when using an anonymous interface.

samchon commented 3 weeks ago

It's because nestia does not allow unnamed type (literal expression type).