Skip to content

Casing snake_case rule, allow _links style SchemaProperties #2473

@onmomo

Description

@onmomo

Describe the bug

We did not expect that SchemaProperties defined as _links are not considered as snake_case. For the time being we added them to the lint-ignore file.

To Reproduce
we configure the following rule

  rule/schema-properties-snake-case:
    severity: error
    subject:
      type: SchemaProperties
    assertions:
      casing: snake_case

Expected behavior

Logs

OpenAPI description

_linksschema properties

"responses": {
      "200": {
        "description": "Successful search result.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "_links": {
                  "type": "object",
                  "properties": {
                    "last": {
                      "type": "object",
                      "properties": {
                        "href": {
                          "description": "The URL of the result page",
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "description": "The last result page"
                    }
                  "description": "Holds pagination metadata and navigation links for browsing through result pages."
                },                
                "total": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Total number of questions matching the request."
                }
              }
            }
          }
        }
      }
    }

Redocly version(s)

2.13.0

OS, environment

MacOS

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions