secondsky/sap-api-style
| This skill provides comprehensive guidance for documenting SAP APIs following the SAP API Style Guide standards. It should be used when creating or reviewing API documentation for REST, OData, Java, JavaScript, .NET, or C/C++ APIs. The skill covers naming conventions, documentation comments, OpenAPI specifications, quality checklists, deprecation policies, and manual documentation templates. It ensures consistency with SAP API Business Hub standards and industry best practices. API deprecation, x-sap-stateInfo, Entity Data Model, EDM, documentation tags, API quality, API templates
npx skills add https://github.com/secondsky/sap-skills --skill sap-api-style
10. External Resources
11. Updates and Maintenance
12. Common Issues
This skill provides comprehensive guidance for documenting SAP APIs according to official SAP API Style Guide standards. It covers all major API types and documentation approaches used across the SAP ecosystem.
Documentation Source: https://github.com/SAP-docs/api-style-guide (76 files extracted)
Use this skill when:
REST/OData API
├─ Auto-generated (OpenAPI/Swagger)?
│ └─ references/rest-odata-openapi-guide.md
│ • OpenAPI specification standards
│ • Package, API, operation descriptions
│ • Parameters, responses, components
│ • SAP API Business Hub requirements
│
└─ Manually written?
└─ references/manual-templates-guide.md
• REST templates (2-level: overview → method)
• OData templates (3-level: service → resource → operation)
• Complete field requirements
• templates/ directory for ready-to-use files
Native Library API
├─ Java → references/java-javascript-dotnet-guide.md
├─ JavaScript → references/java-javascript-dotnet-guide.md
├─ .NET (C#) → references/java-javascript-dotnet-guide.md
└─ C/C++ → references/java-javascript-dotnet-guide.md
• Documentation comments structure
• Language-specific tags
• Templates for classes, methods, enums
• Complete code examples
Naming
└─ references/naming-conventions.md
• REST/OData naming (resources, parameters, URIs)
• Native library naming (classes, methods, constants)
• Common mistakes to avoid
Writing Descriptions
└─ references/rest-odata-openapi-guide.md
• Package descriptions
• API details (info object)
• Operations, parameters, responses
Quality Assurance
└─ references/quality-processes.md
• Complete API Quality Checklist
• Review workflows
• Development team guidelines
Deprecating APIs
└─ references/deprecation-policy.md
• Lifecycle states (beta, active, deprecated, decommissioned)
• Timeline requirements (12+ months support)
• Required metadata (x-sap-stateInfo)
Developer Guides
└─ references/developer-guides.md
• Structure guidelines
• Content selection
• Code sample standards
All SAP API documentation follows consistent conventions:
| API Type | Standard | Tool | Documentation |
|----------|----------|------|---------------|
| REST | OpenAPI 3.0.3 | Swagger | Spec |
| OData | v4.01, v3.0, v2.0 | Various | OData.org |
| Java | Javadoc | javadoc | Oracle |
| JavaScript | JSDoc 3 | jsdoc | JSDoc.app |
| .NET | XML Comments | DocFX | Microsoft |
| C/C++ | Doxygen | doxygen | Doxygen.nl |
Documentation organized hierarchically:
All documentation must:
| Element | Limit | Use Case |
|---------|-------|----------|
| API Title | 80 | info.title in OpenAPI |
| API Short Text | 180 | x-sap-shortText |
| Package Short Desc | 250 | Package tile description |
| Operation Summary | 255 | Operation summary line |
| Description | 1024 | General descriptions |
General Rules (all API types):
See references/naming-conventions.md for complete language-specific rules.
Java/JavaScript:
@param <name> <description> - Parameter documentation@return <description> - Return value@throws <class> <description> - Exception@deprecated <description> - Deprecation notice.NET:
<summary> - Brief description<param name=""> - Parameter<returns> - Return value<exception cref=""> - ExceptionSee references/java-javascript-dotnet-guide.md for complete tag reference.
| State | Definition | Support | Metadata Required |
|-------|-----------|---------|-------------------|
| Beta | Pre-production testing | No guarantees | state: beta |
| Active | Production-ready (default) | Full support | Optional |
| Deprecated | Replaced by successor | 12+ months | state, deprecationDate, successorApi |
| Decommissioned | Fully retired | None | Document removal |
See references/deprecation-policy.md for complete timeline and process requirements.
Search large references before loading them. Use rg -n "<resource|operation|parameter|description|template|deprecation|x-sap-stateInfo>" references/*.md to locate the exact rule, then open only the relevant excerpt.
references/manual-templates-guide.md for manually written REST/OData documentation templates. Search for REST API Template, OData Operation Template, field requirements, method, or the resource name.references/rest-odata-openapi-guide.md for OpenAPI, OData, operation descriptions, responses, parameters, and SAP API Business Hub publication checks.references/naming-conventions.md for resource, operation, package, class, method, parameter, enum, and constant naming.references/java-javascript-dotnet-guide.md for Javadoc, JSDoc, XML doc comments, and native SDK documentation tags.references/deprecation-policy.md for lifecycle state, migration guidance, and x-sap-stateInfo.references/quality-processes.md for review checklists, gates, and documentation quality workflows.Ready-to-use templates in templates/ directory:
All templates include:
This skill includes comprehensive documentation and templates organized for optimal use:
references/)templates/)Total: 2,343 lines of ready-to-use templates
Determine if you're documenting REST, OData, Java, JavaScript, .NET, or C/C++ API.
Auto-Generated: Write documentation comments in source code → Use appropriate tags → Submit for review
Manual: Select template from templates/ → Customize [placeholders] → Follow hierarchy → Validate with checklist
Consult appropriate reference file:
naming-conventions.mdrest-odata-openapi-guide.md or java-javascript-dotnet-guide.mdquality-processes.mddeprecation-policy.mdBefore publishing:
quality-processes.md)naming-conventions.md)Naming:
Descriptions:
Documentation:
See individual reference files for complete anti-patterns and fixes.
| Issue | Correction |
|-------|------------|
| API names use verbs or redundant "API" suffixes | Apply the naming rules in references/naming-conventions.md before writing descriptions. |
| OpenAPI descriptions are too generic | Use operation-specific outcomes, error cases, and state information from references/rest-odata-openapi-guide.md. |
| Documentation contains sensitive sample data | Replace tenant, user, token, and customer data with neutral examples before publishing. |
| Deprecation metadata is missing | Add x-sap-stateInfo and migration guidance from references/deprecation-policy.md. |
Source Version: SAP API Style Guide 2025.01 (verified against commit 902247f)
Recent Changes:
To Update This Skill:
Quarterly Review Recommended: Check for updates every 3 months
Next Review: 2026-02-27
Skill Version: 2.4.0
Last Updated: 2026-06-14
License: GPL-3.0
Maintainer: Eduard Jiglau | [email protected] | sap-ai-skills.com | https://github.com/secondsky/sap-skills
Take secondsky/sap-api-style from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.