cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
403 stars 134 forks source link

Many "Overwriting variant method part '' for media type '...' by media type '...'" Warnings #329

Open JMS-1 opened 2 months ago

JMS-1 commented 2 months ago

After updating this morning the generator produces quite a bit of warnings of the indicated type. This relates to the change

            const part = this.variantMethodPart(type);

            if (map.has(part)) {
              this.logger.warn(`Overwriting variant method part '${part}' for media type '${map.get(part)?.mediaType}' by media type '${type.mediaType}'.`);
            }

            map.set(part, type);

in operation.ts. I'm not quite sure if it's necessary to have the empty type in the map at all or if it may be desirable to suppress this specific warning on !part or event with a new setting.

But since we have a quite large API this warnings mess with the build and make it hard to find real problems.

Could you please check on this (should be https://github.com/cyclosproject/ng-openapi-gen/pull/317).

Thanks

Jochen