json-property-names
Requires direct properties of component schemas to use lower camelCase names.
| Attribute | Value |
|---|---|
| Category | Schema |
| Maturity | Gold |
| OpenAPI | Swagger 2.0; OpenAPI 3.0, 3.1, 3.2 |
| Starter | Off |
| Lenient–Complete | Error |
Intent
One predictable JSON naming convention reduces client-side renaming and inconsistent payloads.
Flags
A direct property under components.schemas.*.properties unless its name starts with a lowercase letter and then contains only letters or digits.
Does not flag
Names such as createdAt and line2. Nested properties and properties outside component schemas are outside this rule's scope.
See it fail
components:
schemas:
Payment:
type: object
properties:
created_at:
type: string
Diagnostic: JSON property names should use camelCase.
Fix it
components:
schemas:
Payment:
type: object
properties:
createdAt:
type: string
Changing a published property name is an API compatibility change; coordinate the migration with consumers.
Configure
profiles:
default:
rules:
extends: [recommended]
override:
json-property-names: warn
Nearby: schema-definition-camel-case.