Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group API Clients by Path Structure #1437

Closed
Lirrrx opened this issue Dec 5, 2024 · 1 comment · Fixed by #1441
Closed

Group API Clients by Path Structure #1437

Lirrrx opened this issue Dec 5, 2024 · 1 comment · Fixed by #1441

Comments

@Lirrrx
Copy link

Lirrrx commented Dec 5, 2024

What is the problem this feature would solve?

Currently, Kubb.js supports grouping API clients using tags as the default option. While this works for many use cases, tags in our OpenAPI schemas often contain repetitive or inconsistent words that aren't ideal for folder names. Instead, the structure of paths in our schemas provides a more logical and meaningful way to group generated clients.

External documents/projects?

No response

What is the feature you are proposing to solve the problem?

Introduce a path-based grouping option in Kubb.js. This would allow users to group generated API clients based on segments of the OpenAPI paths rather than tags.

Example:

group: {
  type: 'path',
  name: (ctx) => {
    const firstSegment = ctx.path.split('/')[1];
    return firstSegment;
  }
}

What alternatives have you considered?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants