Closed
Description
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)