question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Name collision for /version endpoint

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bluenote10commented, Mar 27, 2020

Works perfectly, thanks!

0reactions
js2mecommented, Mar 26, 2020

Should be fixed in release 1.7.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Name Collision in the DNS - icann
The potential for name collision with proposed new gTLDs is substantial. ... there is no policy-mandated endpoint for risks resulting from.
Read more >
REST API: endpoint name conflicts and prefixes / namespaces ...
To change the endpoint name: /api/1/users /api/1/groups /api/1/items /api/1/item_groups. To modify path by adding some prefix or namespace ...
Read more >
When domain names attack: the WPAD name collision ...
Poorly configured networks and new rules on internet domain names are giving cybercriminals a powerful new attack tool.
Read more >
Conflict Detection and Sync - AWS AppSync
In this scenario, a conflict will be detected due to the version mismatch. Automerge adheres to its properties and rejects the name change...
Read more >
Rename Endpoint - Interface Refactoring Catalog
Instructions (Steps) · Discuss alternative new names and decide for one. · Apply code-level rename refactorings, for instance for the controller ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found