add-endpoint
БесплатноБез исполняемых скриптовНе проверенAdd a new ADT endpoint call (schema + contract + fixture). USE WHEN the user wants to add support for a new SAP ADT REST endpoint, add a new schema, or add a…
от abapify★ 20 звёзд на GitHubОб этом скилле
Add a New ADT Endpoint
This skill guides adding support for a new SAP ADT REST endpoint. It covers schema definition, contract creation, fixture registration, and integration into the contract index.
Overview of the Layers
SAP ADT endpoint (HTTP)
↓
adt-schemas packages/adt-schemas/src/schemas/generated/
• Schema literal (TypeScript `as const` object from XSD)
• Typed wrapper in typed.ts
↓
adt-contracts packages/adt-contracts/src/
• generated/schemas.ts (toSpeciSchema wrapper)
• adt/{module}/{file}.ts (contract definition)
• adt/{module}/index.ts (module exports + aggregate)
↓
adt-fixtures packages/adt-fixtures/src/
• fixtures/{module}/{name}.xml (real SAP XML sample)
• fixtures/registry.ts (path registration)
Step 1: Gather Endpoint Information
Before writing any code, obtain the endpoint's HTTP details and XML payload structure.
Tip: If the endpoint is undocumented or you need to research it first, use
$adt-reverse-engineeringfor systematic discovery via live system, open source projects, and Sourcegraph code search.
Option A: Live System Available
If you have a running SAP system connection:
- Make a real HTTP request to the endpoint and capture the response XML:
# Example using curl or adt-cli: # GET /sap/bc/adt/{path}/{objectname} - Save the raw response to
tmp/for reference (see tmp-folder-testing):# adt get ZOBJECT_NAME -o tmp/response.xml - Use the actual XML to design the schema and write the fixture.
Option B: No Live System — Web Research
If no system connection is available, research the endpoint:
Search SAP ADT documentation and community resources:
- SAP Help Portal: https://help.sap.com/docs/abap-cloud/abap-development-tools-user-guide
- abapGit source (has XSD/schema reference implementations): https://github.com/abapGit/abapGit
- SAP ADT API examples: search GitHub for
sap/bc/adt/{your-path} - Eclipse ADT plugin source: https://github.com/SAP/abap-adt-api
Search for XSD schema definitions:
- Look in the existing XSD files under
packages/adt-schemas/for similar patterns - Search the abapGit repository for matching serializer names or object types
- Look in the existing XSD files under
Look at similar existing schemas in
packages/adt-schemas/src/schemas/generated/schemas/sap/for structural patterns.Construct a representative XML fixture based on research, clearly marked as synthesized:
<?xml version="1.0" encoding="UTF-8"?> <!-- Source: GET /sap/bc/adt/{your-path}/{name} --> <!-- Note: Synthesized from documentation/research - verify against live system -->
Step 2: Create the Schema in adt-schemas
Schemas live in packages/adt-schemas/src/schemas/generated/schemas/.
2a: Add the schema literal
Create packages/adt-schemas/src/schemas/generated/schemas/sap/{schemaName}.ts:
Note on the
Source:comment: Existing generated files referencexsd/sap/{name}.xsdpointing to XSD sources inpackages/adt-schemas/.xsd/. For manually created schemas (derived from a live system response or research), use a descriptive comment instead.
/**
* Schema for {description}
*
* Manually created — derived from live system response / research
* Reference: GET /sap/bc/adt/{your-path}
*/
// Import dependencies (only schemas you actually use)
import adtcore from './adtcore';
export default {
$xmlns: {
adtcore: 'http://www.sap.com/adt/core',
xsd: 'http://www.w3.org/2001/XMLSchema',
myns: 'http://www.sap.com/adt/my-namespace', // ← your namespace
},
$imports: [adtcore],
targetNamespace: 'http://www.sap.com/adt/my-namespace',
attributeFormDefault: 'qualified',
elementFormDefault: 'qualified',
element: [
{
name: 'myRootElement', // ← root element name (camelCase)
type: 'myns:MyRootType',
},
],
complexType: [
{
name: 'MyRootType',
complexContent: {
extension: {
base: 'adtcore:AdtMainObject', // ← extend appropriate base type
sequence: {
element: [
{
name: 'myChild',
type: 'xsd:string',
minOccurs: '0',
},
],
},
attribute: [
{
name: 'myAttr',
type: 'xsd:string',
},
],
},
},
},
],
} as const;
Key rules for schema literals:
See xsd-best-practices for XSD validity rules and edge cases.
- Must end with
} as const - One root element per schema document
- Use
$importsfor schemas you depend on (adtcore, abapoo, abapsource, etc.) - Names follow XSD conventions:
complexTypenames are PascalCase - Look at
Установить add-endpoint в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-endpoint?
Add a new ADT endpoint call (schema + contract + fixture). USE WHEN the user wants to add support for a new SAP ADT REST endpoint, add a new schema, or add a new API contract. Trigger words - new endpoint, add endpoint, new schema, add contract, support endpoint, SAP ADT API.
Как установить скилл add-endpoint?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-endpoint запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic