Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b0ef652
Initial plan
Copilot Mar 6, 2026
6bdb0c8
feat(adt-auth): add service-key auth plugin and env resolver
Copilot Mar 6, 2026
9f6710a
feat: add --service-key CLI option, Bearer token support, and CI e2e …
Copilot Mar 6, 2026
23d1769
ci: remove copilot/** push trigger and move BTP e2e to separate workflow
Copilot Mar 6, 2026
bd8c96a
Merge branch 'main' into copilot/add-service-key-auth-plugin
ThePlenkov Mar 6, 2026
d84c4b2
ci: add workflow_dispatch trigger to e2e-btp workflow
Copilot Mar 6, 2026
012edaa
ci: always run e2e-btp job so it appears as a PR check
Copilot Mar 6, 2026
fac173a
ci: remove pull_request trigger from e2e-btp workflow (manual only)
Copilot Mar 6, 2026
af43377
ci: auto-trigger on feature branch + fix npx adt invocation to node d…
Copilot Mar 6, 2026
0a66356
ci: write service key secret to temp file before passing as --service…
Copilot Mar 6, 2026
664d857
fix: readServiceKey only accepts file paths; clear error when raw JSO…
Copilot Mar 6, 2026
d72de44
fix: --service-key must point to a file path, not raw JSON
Copilot Mar 6, 2026
f276b10
fix: remove inlinedDependencies and alwaysBundle from adt-cli tsdown …
Copilot Mar 6, 2026
fd681a7
refactor: consolidate agent skills to .agents/skills with symlinks fr…
ThePlenkov Mar 9, 2026
aad40f7
style: format markdown tables and code blocks consistently across ski…
ThePlenkov Mar 9, 2026
c15af32
ci: remove e2e-btp workflow (moved to separate testing strategy)
ThePlenkov Mar 9, 2026
df5a0f1
style: format transport URI construction consistently with project style
ThePlenkov Mar 9, 2026
f7de5a7
fix: restore package-lock.json tracking, switch CI to npm ci to fix e…
Copilot Mar 9, 2026
c7b1ce8
fix(ci): restore ci.yml (bun install), set nx.json cli.packageManager…
Copilot Mar 9, 2026
c7b856c
fix(lint): fix 3 CI failures: ts-xsd lint, adt-cli lazy-load error, a…
Copilot Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ 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
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)
name: 'myRootElement', // ← root element name (camelCase)
type: 'myns:MyRootType',
},
],
Expand All @@ -114,7 +114,7 @@ export default {
name: 'MyRootType',
complexContent: {
extension: {
base: 'adtcore:AdtMainObject', // ← extend appropriate base type
base: 'adtcore:AdtMainObject', // ← extend appropriate base type
sequence: {
element: [
{
Expand All @@ -138,6 +138,7 @@ export default {
```

**Key rules for schema literals:**

- Must end with `} as const`
- One root element per schema document
- Use `$imports` for schemas you depend on (adtcore, abapoo, abapsource, etc.)
Expand All @@ -160,6 +161,7 @@ export const mySchemaName: TypedSchema<MySchemaNameSchema> =
```

> **Note on types**: The `types/` files are auto-generated from XSD schemas by the codegen tool. For manually created schemas, you can either:
>
> - Run `npx nx build adt-schemas` to trigger codegen (if XSD source exists)
> - Or manually create a minimal types file at `packages/adt-schemas/src/schemas/generated/types/sap/mySchemaName.types.ts` following the pattern of existing types files.

Expand Down Expand Up @@ -213,10 +215,13 @@ export const myObjectContract = {
* in URLs, and SAP conventionally normalizes to lowercase in the URL path).
*/
get: (name: string) =>
http.get(`/sap/bc/adt/{your-path}/${encodeURIComponent(name.toLowerCase())}`, {
responses: { 200: mySchemaName },
headers: { Accept: 'application/vnd.sap.adt.{mimetype}.v1+xml' },
}),
http.get(
`/sap/bc/adt/{your-path}/${encodeURIComponent(name.toLowerCase())}`,
{
responses: { 200: mySchemaName },
headers: { Accept: 'application/vnd.sap.adt.{mimetype}.v1+xml' },
},
),
};

export type MyObjectContract = typeof myObjectContract;
Expand Down Expand Up @@ -273,14 +278,14 @@ import { myObjectContract } from './myObject';
export interface OoContract {
classes: typeof classesContract;
interfaces: typeof interfacesContract;
myObject: typeof myObjectContract; // ← add here
myObject: typeof myObjectContract; // ← add here
}

// Update the module aggregate:
export const ooContract: OoContract = {
classes: classesContract,
interfaces: interfacesContract,
myObject: myObjectContract, // ← add here
myObject: myObjectContract, // ← add here
};
```

Expand Down Expand Up @@ -334,6 +339,7 @@ Create `packages/adt-fixtures/src/fixtures/{module}/{name}.xml`:
```

**Tips for realistic fixtures:**

- Use `ZTEST_` or `$TMP` names (standard test object convention in SAP)
- Include all namespace declarations (`xmlns:`)
- Match the exact XML structure the schema expects
Expand All @@ -353,7 +359,7 @@ export const registry = {
oo: {
class: 'oo/class.xml',
interface: 'oo/interface.xml',
myObject: 'oo/myObject.xml', // ← add here
myObject: 'oo/myObject.xml', // ← add here
},
} as const;
```
Expand Down Expand Up @@ -406,22 +412,22 @@ describe('mySchemaName schema', () => {

### Base types to extend (from adtcore.ts)

| Base type | Purpose |
|-----------|---------|
| `adtcore:AdtObject` | Any ADT object (name, type, description, version, links) |
| `adtcore:AdtMainObject` | Repository object (+ package, responsible, masterLanguage) |
| `abapoo:AbapOoObject` | OO base (+ modeled, syntaxConfiguration) |
| `abapsource:AbapSourceObject` | Source-enabled object (+ sourceUri, fixPointArithmetic) |
| Base type | Purpose |
| ----------------------------- | ---------------------------------------------------------- |
| `adtcore:AdtObject` | Any ADT object (name, type, description, version, links) |
| `adtcore:AdtMainObject` | Repository object (+ package, responsible, masterLanguage) |
| `abapoo:AbapOoObject` | OO base (+ modeled, syntaxConfiguration) |
| `abapsource:AbapSourceObject` | Source-enabled object (+ sourceUri, fixPointArithmetic) |

### Namespace URIs (for `$xmlns`)

| Prefix | URI |
|--------|-----|
| `adtcore` | `http://www.sap.com/adt/core` |
| Prefix | URI |
| ------------ | ----------------------------------- |
| `adtcore` | `http://www.sap.com/adt/core` |
| `abapsource` | `http://www.sap.com/adt/abapsource` |
| `abapoo` | `http://www.sap.com/adt/oo` |
| `atom` | `http://www.w3.org/2005/Atom` |
| `xsd` | `http://www.w3.org/2001/XMLSchema` |
| `abapoo` | `http://www.sap.com/adt/oo` |
| `atom` | `http://www.w3.org/2005/Atom` |
| `xsd` | `http://www.w3.org/2001/XMLSchema` |

### Content-Type patterns for SAP ADT

Expand Down
Loading