Skip to content

Commit

Permalink
Merge branch 'hd-naming-strategy-optimistic' of github.com:czechboy0/…
Browse files Browse the repository at this point in the history
…swift-openapi-generator into hd-naming-strategy-optimistic
  • Loading branch information
czechboy0 committed Nov 26, 2024
2 parents 6c0f05c + 4303842 commit 33ef5ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Introduce a new naming strategy as an opt-in feature, instructing the generator

The purpose of Swift OpenAPI Generator is to generate Swift code from OpenAPI documents. As part of that process, names specified in the OpenAPI document have to be converted to names in Swift code - and there are many ways to do that. We call these "naming strategies" in this proposal.

When Swift OpenAPI Generator 0.1.0 went open-source in May 2023, it had a simple naming strategy that produced relatively conventional Swift identifiers from OpenAPI names, however when tested on a large test corpus of around 3000 OpenAPI documents, it produced an unacceptably high number of non-compiling packages due to naming conflicts.
When Swift OpenAPI Generator 0.1.0 went open-source in May 2023, it had a simple naming strategy that produced relatively conventional Swift identifiers from OpenAPI names. However, when tested on a large test corpus of around 3000 OpenAPI documents, it produced an unacceptably high number of non-compiling packages due to naming conflicts.

The root cause of conflicts are the different allowed character sets for OpenAPI names and Swift identifiers. OpenAPI has a more flexible allowed character set than Swift identifiers.

Expand Down

0 comments on commit 33ef5ea

Please sign in to comment.