api-naming-conventions

Enforces snake_case naming in OpenAPI paths, parameters, and schema properties.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/heiherilala-vawd/ompany-Management --skill api-naming-conventions-heiherilala-vawd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-naming-conventions
Source: https://github.com/heiherilala-vawd/ompany-Management/tree/main/.agents/skills/api-naming-conventions
Command: npx skills add https://github.com/heiherilala-vawd/ompany-Management --skill api-naming-conventions-heiherilala-vawd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent naming in REST APIs (mixing hyphens and underscores in endpoint paths, query parameters, and schema properties) creates confusion for API consumers and breaks generated client code. This Skill enforces a single convention: always use snake_case with underscores, never hyphens. ## Core Features & Use Cases - Endpoint Path Rules: Ensures all URL paths and @PathVariable names use snake_case (e.g., /companies/{comp_id}/equipment_usage/{id}). - Query Parameter & Schema Rules: Verifies @RequestParam names and OpenAPI schema properties use snake_case (e.g., page_size, company_id). - OperationId Convention: Confirms operationId values follow lowerCamelCase for OpenAPI Generator compatibility. - Use Case: When editing api.yml or a Spring @RestController, trigger this Skill to audit the file for hyphenated paths and fix naming violations before committing. ## Quick Start Review the OpenAPI spec in src/main/resources/api/api.yml and fix any endpoint paths or parameters that use hyphens instead of underscores.

Frequently Asked Questions about api-naming-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce snake_case in REST API endpoint paths?

Use underscores instead of hyphens in all URL path segments and path variables, such as /companies/{comp_id}/equipment_usage/{id}. Audit the OpenAPI spec with grep for hyphenated path segments and update @PathVariable names in controllers to match.

What naming convention should OpenAPI operationId use?

OperationId values should use lowerCamelCase, such as getEquipmentUsageById or crupdateEquipmentUsages. This follows the OpenAPI Generator convention so generated Java and TypeScript client methods have idiomatic names.

Should query parameters use snake_case or camelCase in Spring Boot?

Query parameters should use snake_case, for example @RequestParam(name = "page_size"). The Java variable can remain camelCase while the external parameter name stays snake_case via the name attribute.

How do I check an OpenAPI spec for naming convention violations?

Run grep for hyphenated path segments, such as searching for '-{' in api.yml, to find non-compliant paths. Then manually verify that all @PathVariable and @RequestParam names in controllers use snake_case and operationIds use camelCase.

When are hyphens allowed instead of underscores in API naming?

Hyphens are only acceptable where external standards require kebab-case, such as certain file names. Within the project's REST paths, query parameters, and schema properties, underscores are mandatory with no exceptions.