Skip to content

Name collision for /version endpoint #41

Closed
@bluenote10

Description

@bluenote10

Another small issue I encountered: It is currently not possible to have a /version endpoint, because of a name collision with the internal version variable. For example:

---
openapi: 3.0.0
info:
  title: SomeAPI
paths:
  "/version":
    get:
      responses:
        '200':
          description: 
          content:
            application/json:
              schema:
                type: string

Relevant parts of generated code:

export class Api<SecurityDataType> {
  public baseUrl = "";
  public title = "SomeAPI";
  public version = "";

  // and later

  version = {
    /**
     * @name versionList
     * @request GET:/version
     */
    versionList: (params?: RequestParams) => this.request<string, any>(`/version`, "GET", params, null),
  };

Error:

Duplicate identifier 'version'.ts(2300)

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem rightnext major releaseThis changes of code will added at next major release (*.0.0)questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions