mittwald / mittwald/api-client-js

Inconsistent naming of "sshsftpUser" functions

Open
#154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
0
Avg merge
4d 16h
Merged PRs (30d)
4

Description

For all API operations, we strip the OpenAPI tag from the actual operation ID to determine the method name; for example, app-get-app becomes client.app.getApp.

This works for all operations, EXCEPT the "SSH/SFTP USER" tag; operations using this tags have their ID starting with either sftp-user or ssh-user, but not sshsftp-user. This leads to clunky method names that are inconsistent with the rest of the client:

https://github.com/mittwald/api-client-js/blob/937dcd43f513391235fa49b438bf47cfdad38e9d/packages/mittwald/src/generated/v2/client.ts#L1117-L1125

This could probably be easily fixed by adding a few substitution rules in the client generation; however, this would constitute a breaking change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated operations in packages/mittwald/src/generated/v2/client.ts at lines 1117-1125, then locate the client-generation substitution rules described in the issue. Verify how sftp-user and ssh-user operation IDs become method names, and define how the breaking naming change should be handled before confirming consistent SSH/SFTP method names.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.