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

Add a CLI option for selecting the naming strategy #708

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

czechboy0
Copy link
Contributor

Motivation

The recently introduced naming strategy is only configurable in the config file, but pure CLI users might also want to use it without creating a config file.

Modifications

Add a --naming-strategy option to the swift-openapi-generator CLI.

Result

Users can use the new naming strategy without creating a config file, if they didn't have one before.

Test Plan

Tested manually on a sample project.

@czechboy0 czechboy0 added the 🆕 semver/minor Adds new public API. label Dec 21, 2024
Copy link
Collaborator

@simonjbeaumont simonjbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this is a useful addition!

Added some feedback for some inconsistency that's crept in (but not just in this PR). We can address it out of band if you prefer.

@czechboy0 czechboy0 enabled auto-merge (squash) January 6, 2025 09:34
@czechboy0 czechboy0 merged commit 6593b1b into apple:main Jan 6, 2025
32 checks passed
@czechboy0 czechboy0 deleted the hd-naming-strategy-cli-option branch January 6, 2025 11:40
czechboy0 added a commit that referenced this pull request Jan 6, 2025
…istent (#713)

### Motivation

A missed fixup from #708:
#708 (comment)

### Modifications

Removed the default from Config.init and forced all callers to make a
choice on the naming strategy, just like for accessModifier.

### Result

Consistent handling of these two parameters.

### Test Plan

Tests passed locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants