How to rename json keys to match your openapi spec field names
- Step 1Open the OpenAPI spec and note property names — For each resource, list the exact property names from the OpenAPI schema: the spec is the canonical source of truth for naming. Note every discrepancy between the source data field names and the spec property names.
- Step 2Build the rename mapping — Create pairs: source name →’ OpenAPI spec name. For example: UserName →’ username, ContactEmail →’ email, CreatedTimestamp →’ createdAt.
- Step 3Apply and validate the rename — Paste the source JSON and apply the mapping. Validate the output against the OpenAPI schema using the JSON Schema Generator to produce the schema, then confirm the field names match.
- Step 4Implement in your API transformation layer — Add the rename mapping to your API middleware, data adapter, or request handler. The JSON Key Renamer's mapping becomes the field_mapping constant used in your adapter class.
Frequently asked questions
Where in the request/response lifecycle should field renaming happen?+
On inbound requests: rename in middleware or a request adapter before the payload reaches your handler, so the handler always sees spec-compliant field names. On outbound responses: rename in a serializer or response adapter after the handler returns, before the response is sent. Keeping renaming at the boundary keeps your core logic clean.
How do I keep the rename mapping in sync with the OpenAPI spec as the spec evolves?+
Store the field mapping as a configuration file (e.g. field-mapping.json) that is reviewed as part of the OpenAPI spec update process. Add a CI step that runs a validation script confirming all OpenAPI property names in the spec exist in either the mapping target values or the direct source.
Is the payload data transmitted to JAD Apps?+
No. All renaming runs entirely in your browser. API payloads and internal field names are never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.