I’m working with RapidAPI to build an API and I’m facing an issue with how the endpoint names appear in the interface. When I upload my OpenAPI specification, RapidAPI uses the operationId field to create the names shown in the navigation menu. Unfortunately, operationId is often in camelCase, which isn’t very user-friendly.
For instance, here’s a sample of my API specification:
This results in a menu item displayed as “getAllBooks” instead of something more readable like “Get All Books” or “Retrieve All Books”. While I need to keep the operationId in camelCase for technical purposes, I would prefer if the user interface showed more friendly names with appropriate spacing.
I have noticed that some APIs on RapidAPI have much nicer names listed in their menus. I’m curious if there’s a way to use the description field or any other property in my OpenAPI spec to instruct RapidAPI on what text to display in the navigation, while leaving the operationId intact.
Is there a specific field or method that RapidAPI acknowledges for display purposes? Has anyone found a practical solution for this problem?
Here’s what worked for me: use the title field in your operation definition. RapidAPI prioritizes this over operationId when it’s there. I stumbled on this while documenting my endpoints and saw the interface started showing much cleaner names.
get:
title: Get All Books
description: Retrieve all books
operationId: getAllBooks
categories:
- library
The title field is standard OpenAPI spec, so it’s way more portable than vendor-specific extensions if you want to use your spec elsewhere. I’ve been doing this for months with zero issues, and it works fine with other API documentation tools that respect the title field too.
I hit this exact issue with my first RapidAPI publish. Here’s what worked: add a custom x-rapidapi-name field right in your OpenAPI spec next to the operationId. RapidAPI picks this up for display while leaving your technical operationId alone.
get:
description: Retrieve all books
operationId: getAllBooks
x-rapidapi-name: Get All Books
categories:
- library
This gives you full control over how endpoints show up in the nav menu. Found this after digging through their docs and trying different things. The x-rapidapi-name field overrides both operationId and summary for display.
try putting a clear summary in the summary field, instead of relying on operationId. RapidAPI often uses that for display names. I had a similar issue, and changing to more descriptive summaries made my api way more user-friendly. it works better than just using the description.