Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow specifying
additional-initialisms
(oapi-codegen#1733)
As well as the inbuilt initialisms that are found in `oapi-codegen`, there are additional initialisms that shouldn't exist upstream as they are either contentious in the community or that are user- or organisation-specific. To handle this, we can introduce a new configuration option, `additional-initialisms`, for user-provided initialisms. We need to make sure that this provides an early indication of these settings being set incorrectly by failing early to indicate that the configuration isn't valid without using the `name-normalizer: ToCamelCaseWithInitialisms`. This also requires that we refactor the `initalismsMap` to pull this into the `globalState`, as it's now dependent on the configuration used, and this ensures that the settings are isolated. Co-authored-by: Jamie Tanna <[email protected]>
- Loading branch information