# `ApifyClient.Generator.Naming`
[🔗](https://github.com/social-growth-studio/apify-client-ex/blob/v1.0.0/dev/apify_client/generator/naming.ex#L1)

Naming rules shared by the generator plugins.

The Apify API uses `camelCase` for fields and parameters, `kebab-case` for path
segments and a few `UPPER_SNAKE` keys (usage services, run status counts). The
generated client uses `snake_case` everywhere and keeps the original names only
where they go over the wire.

> #### Generation-time only {: .neutral}
>
> Runs under `mix apify.gen` only; lives in `dev/` because the plugins depend on
> the dev-only `:oapi_generator`.

# `camel`

```elixir
@spec camel(String.t()) :: String.t()
```

Converts a path segment to a module name segment.

    iex> camel("key-value-stores")
    "KeyValueStores"

# `snake`

```elixir
@spec snake(String.t()) :: String.t()
```

Converts an API name to `snake_case`.

    iex> snake("defaultDatasetId")
    "default_dataset_id"
    iex> snake("isPPEPlatformUsagePaidByUser")
    "is_ppe_platform_usage_paid_by_user"
    iex> snake("publicActorRunStats30Days")
    "public_actor_run_stats30_days"
    iex> snake("TIMED-OUT")
    "timed_out"
    iex> snake("_id")
    "_id"

# `snake_map`

```elixir
@spec snake_map([String.t()], String.t()) :: %{required(String.t()) =&gt; String.t()}
```

Maps each name to its `snake_case` form, raising if two names collide.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
