Skip to content

[BUG] Unused basepath on services generated from typescript-nestjs template and missing parenthesis on Global decorator #8810

@rceron-chwy

Description

@rceron-chwy

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
  1. The template api.service.mustache is using a basePath property which was originally going to be passed as an optional argument. This bug is to remove the unused property as it causes TS error.
constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) {
  this.configuration = configuration;
  // this.basePath = basePath || configuration.basePath || this.basePath; 
  this.basePath = configuration.basePath || this.basePath; 
}
openapi-generator version

5.0.1

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

PR: #8811

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions