Skip to content

Is there a way to add keepChars param for schema casing formatting? #204

@dlohvinov

Description

@dlohvinov

Hi!

I use openapi-format to convert schema from snake_case to camelCase, but i struggle with a parameter names which include . in it.

For instance, there are some parameters with the names like cursor.created_at which represent an object-like formatting:

cursor: {
  created_at,
}

and those parameter names are formatted to cursorCreatedAt, using dot notation as a separator.

I see, in case-anything casing converter there is a second config parameter with keep property.
More over, I assume that this param is supposed to be supported in casing.js util function, but I don't get it how can I pass this param in my openapi-format config file (or programmatic usage).

my .openapiformatrc looks like this:

{
  "casingSet": {
      "parametersQuery": "camelCase",
      "properties": "camelCase",
  },
  "filterSet": {
    "tags": ["Roles", "UserSettings"]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions