### Initial CAP Project Setup Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cap-capire/skills/sap-cap-capire/references/cli-complete.md Sets up a new CAP project with initial configurations and sample data. This includes creating the project structure, installing dependencies, and starting the development server with live reload. ```sh # Create new project cds init my-bookshop --add sample,hana # Install dependencies npm install # Start development cds watch ``` -------------------------------- ### REST API Quick Start Guide Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/README.md A step-by-step guide for creating REST APIs, from template selection and customization to method creation, review, and publishing. ```text 1. Choose template: REST API Overview (Level 1) 2. Customize: Replace [placeholders] with your API info 3. Create methods: Use REST API Method template (Level 2) 4. Review: Check against API Quality Checklist 5. Publish: Submit to SAP API Business Hub ``` -------------------------------- ### Development Setup: Node.js + SQLite CLI Commands Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cap-capire/agents/cap-project-architect.md Scaffolds a new SAP CAP project with a tiny sample, installs dependencies, and starts the development server with watch mode. This configuration uses SQLite for local development. ```bash cds init my-project --add tiny-sample cd my-project npm install cds watch ``` -------------------------------- ### OData Service Quick Start Guide Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/README.md A step-by-step guide for creating OData services, including template selection, resource and operation documentation, EDM verification, and publishing. ```text 1. Choose template: OData Service Overview (Level 1) 2. Document resources: Use OData Resource template (Level 2) 3. Document operations: Use OData Operation template (Level 3) 4. Review: Verify Entity Data Model (EDM) 5. Publish: Submit with $metadata endpoint ``` -------------------------------- ### Install hyperfine benchmarking tool Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/benchmarking.md Commands to install the hyperfine benchmarking utility across various operating systems and package managers. Ensure the tool is installed before attempting to run performance benchmarks. ```bash brew install hyperfine ``` ```bash wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine_1.18.0_amd64.deb sudo dpkg -i hyperfine_1.18.0_amd64.deb ``` ```bash pacman -S hyperfine ``` ```bash scoop install hyperfine ``` ```bash cargo install hyperfine ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/commands/ui5-scaffold.md Provides commands to install project dependencies using npm and start the UI5 development server. These are common post-scaffolding steps for running and testing a UI5 application. ```bash cd {{name}} npm install npm start # or ui5 serve --port 8080 ``` -------------------------------- ### Authentication Quick Start Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-job-scheduling/skills/sap-btp-job-scheduling/SKILL.md Guides on how to authenticate API calls using OAuth 2.0. ```APIDOC ## Authentication Quick Start ### Standard Plan (OAuth 2.0) #### Get access token ```bash curl -X POST "/oauth/token" \ -H "Authorization: Basic $(echo -n ':' | base64)" \ -d "grant_type=client_credentials" ``` #### Use token in API calls ```bash curl -X GET "[https://jobscheduler-rest./scheduler/jobs](https://jobscheduler-rest./scheduler/jobs)" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" ``` ### xs-security.json Configuration ```json { "xsappname": "", "scopes": [{ "name": "$XSAPPNAME.JOBSCHEDULER", "description": "Job Scheduler Scope", "grant-as-authority-to-apps": ["$XSSERVICENAME()"] }] } ``` ``` -------------------------------- ### Create UI5 App Scaffolding Example (Conceptual) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/mcp-integration.md Conceptual example demonstrating how an agent might invoke the 'create_ui5_app' tool with specific parameters to scaffold a new UI5 application. ```text Create a TypeScript Fiori Elements List Report app with CAP backend → Agent invokes: create_ui5_app(projectName="my-app", template="fiori-elements-list-report", language="typescript", capBackend=true) ``` -------------------------------- ### Install and Run MCP Server (Bash) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/mcp-integration.md Commands to install and run the @ui5/mcp-server. It can be installed globally or run directly using npx. The --help flag verifies the installation. ```bash npx -y @ui5/mcp-server ``` ```bash npm install -g @ui5/mcp-server ``` ```bash npx @ui5/mcp-server ``` ```bash npx @ui5/mcp-server --help ``` -------------------------------- ### Setup UI5 test project environment Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/benchmarking.md Steps to clone a sample UI5 application and verify the build process. This prepares the environment for accurate performance measurements. ```bash git clone https://github.com/SAP/openui5-sample-app.git cd openui5-sample-app npm install ui5 build --all ``` -------------------------------- ### TypeScript Project Setup CLI Commands Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cap-capire/agents/cap-project-architect.md Scaffolds a new SAP CAP project with TypeScript, HANA, and MTA support, then installs dependencies. This sets up the project for development using TypeScript. ```bash cds init my-project --add typescript,hana,mta cd my-project npm install ``` -------------------------------- ### SAPUI5 QUnit Controller Test Example (JavaScript) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/testing.md Shows how to write unit tests for SAPUI5 controllers using QUnit and Sinon.js for mocking. It includes setup and teardown for the controller instance and tests controller methods. ```javascript sap.ui.define([ "com/mycompany/myapp/controller/Main.controller", "sap/ui/thirdparty/sinon", "sap/ui/thirdparty/sinon-qunit" ], function(MainController) { "use strict"; QUnit.module("Main Controller", { beforeEach: function() { this.oController = new MainController(); }, afterEach: function() { this.oController.destroy(); } }); QUnit.test("Should initialize correctly", function(assert) { // Arrange - spy on method var oSpy = sinon.spy(this.oController, "_loadData"); // Act this.oController.onInit(); // Assert assert.ok(oSpy.calledOnce, "Load data called on init"); }); }); ``` -------------------------------- ### Setup TypeScript Dependencies and Configuration Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/migration-patterns.md Installs necessary TypeScript development dependencies and configures the tsconfig.json file for a UI5 project. This includes setting compiler options, module resolution, and type definitions for UI5 and QUnit. ```bash npm install --save-dev typescript @ui5/ts-types npm install --save-dev @types/qunit # For testing ``` ```json { "compilerOptions": { "target": "ES2022", "module": "ES2022", "moduleResolution": "node", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "resolveJsonModule": true, "types": ["@ui5/ts-types", "@types/qunit"], "lib": ["ES2022", "DOM"] }, "include": ["webapp/**/*"], "exclude": ["node_modules"] } ``` -------------------------------- ### UI5 Build Command Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/project-structures.md Provides an example of a UI5 build command. The `--all` flag builds all targets, and `--clean-dest` ensures the output directory is cleaned before building. ```bash ui5 build --all --clean-dest ``` -------------------------------- ### Production Re-testing Environment Setup Source: https://github.com/secondsky/sap-skills/blob/main/docs/reference/sap-development-patterns.md Steps to set up a fresh environment for re-testing skills after updating SAP packages. This includes creating a new directory, initializing npm, and installing specific versions of SAP CDS packages. ```bash mkdir test-sap-cap-capire cd test-sap-cap-capire npm init -y npm install @sap/cds@9.5 npm install -D @sap/cds-dk@9.5 ``` -------------------------------- ### JavaScript: Complete Parameter Documentation Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/quality-processes.md Demonstrates the structure for complete parameter documentation, including type, requirement status, description, example usage, and constraints. This helps developers understand and use parameters correctly. ```javascript Parameter: userID (string, required) Description: The unique identifier for the user in format "USER-12345" Example: "USER-00789" Constraints: Alphanumeric, 10 characters maximum, case-sensitive ``` -------------------------------- ### Verify Development Tools Versions Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-business-application-studio/skills/sap-btp-business-application-studio/templates/dev-space-setup.md Checks the installed versions of essential development tools like Node.js, npm, Cloud Foundry CLI, and the MTA Build Tool. These are crucial for building and deploying applications. ```bash # Check Node.js (for CAP/Fiori) node --version # Check npm npm --version # Check CF CLI cf --version # Check MBT (MTA Build Tool) mbt --version ``` -------------------------------- ### Production Setup: Node.js + HANA CLI Commands Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cap-capire/agents/cap-project-architect.md Initializes a new SAP CAP project with HANA, MTA, and XSUAA support, installs dependencies, and adds multitenancy if it's a SaaS application. This prepares the project for production deployment. ```bash cds init my-project --add hana,mta,xsuaa cd my-project npm install cds add multitenancy # If SaaS ``` -------------------------------- ### Define Tools with Spring AI Annotations Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cloud-sdk-ai/skills/sap-cloud-sdk-ai/references/spring-ai-guide.md Defines tools for AI interaction using Spring AI's annotation-based approach. This example shows how to define functions for getting weather and restaurant recommendations, including parameter descriptions. ```java import org.springframework.ai.tool.annotation.Tool; import org.springframework.ai.tool.annotation.ToolParam; public class WeatherTools { @Tool(description = "Get current weather for a city") public String getWeather( @ToolParam(description = "City name") String city, @ToolParam(description = "Unit: celsius or fahrenheit") String unit ) { // Implement weather lookup return String.format("Weather in %s: 20°C, sunny", city); } @Tool(description = "Get restaurant recommendations") public String getRestaurants( @ToolParam(description = "City name") String city ) { return "Restaurant A, Restaurant B"; } } ``` -------------------------------- ### Initialize and Run CAP Project Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-developer-guide/skills/sap-btp-developer-guide/SKILL.md Initializes a CAP project, adds SAP HANA and authentication support, and starts the development server for local testing. This is a foundational step for CAP development. ```bash # Initialize CAP project cds init my-project cd my-project # Add SAP HANA support cds add hana # Add authentication cds add xsuaa # Run locally cds watch ``` -------------------------------- ### Perform HTTP API Requests Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/manual-templates-guide.md Examples of various HTTP requests including simple GET, filtered GET, POST with JSON body, and PATCH for partial updates. These examples include necessary headers like Authorization and Content-Type. ```http GET /Employees('E12345') HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Accept: application/json ``` ```http GET /Employees?$filter=Status eq 'ACTIVE' and Department eq 'SALES'&$select=EmployeeID,FirstName,LastName HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Accept: application/json ``` ```http POST /Employees HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Content-Type: application/json { "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Department": "ENGINEERING", "HireDate": "2024-01-15", "Salary": 95000.00 } ``` ```http PATCH /Employees('E12345') HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Content-Type: application/json If-Match: "abc123def456" { "Department": "SALES", "Salary": 105000.00 } ``` -------------------------------- ### Datasphere CLI Core Commands and CI/CD Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-datasphere/skills/sap-datasphere/SKILL.md Provides examples of common datasphere CLI commands for managing spaces, objects, and tasks. It also illustrates a typical CI/CD workflow for exporting and importing objects between development and production environments. ```bash # Core Commands: datasphere spaces list datasphere spaces create datasphere objects export datasphere objects import datasphere tasks run datasphere marketplace list # CI/CD Integration Example: datasphere objects export --space DEV --output-file package.zip datasphere objects import --space PROD --input-file package.zip --overwrite ``` -------------------------------- ### Start CAP Project Preview Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-fiori-tools/skills/sap-fiori-tools/references/preview.md Commands to initiate development servers for CAP projects based on the runtime environment. ```bash # Node.js CAP cds watch # Java CAP mvn spring-boot:run # Fiori Preview npm run start ``` -------------------------------- ### Timer API Methods for Scheduling and Control Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-sac-scripting/skills/sap-sac-scripting/references/api-calendar-bookmarks.md Provides examples of using the Timer API to control scheduled script execution. Methods include starting the timer with a specified interval, stopping it, checking its running status, and getting or setting the interval duration. ```javascript // Start timer (interval in milliseconds) Timer_1.start(1000); // Every 1 second // Stop timer Timer_1.stop(); // Check if running var isRunning = Timer_1.isRunning(); // Get interval var interval = Timer_1.getInterval(); // Set interval Timer_1.setInterval(2000); // Change to 2 seconds ``` -------------------------------- ### Run SAP MDC Tutorial Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/mdc-typescript-advanced.md Command line instructions to clone and initialize the official SAP MDC tutorial repository. ```bash git clone https://github.com/SAP-samples/ui5-mdc-json-tutorial.git cd ui5-mdc-json-tutorial/ex5 npm install npm start ``` -------------------------------- ### Get Cloud Foundry Space GUID Command Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-cloud-transport-management/skills/sap-btp-cloud-transport-management/SKILL.md This command retrieves the unique identifier (GUID) for a specific Cloud Foundry space. This GUID is often required when configuring destinations for MTA deployments. ```bash cf space --guid ``` -------------------------------- ### Configure Coverage Reporting with NYC and Coveralls Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-linter/skills/sapui5-linter/references/advanced-ci-cd.md This setup integrates code coverage reporting using 'nyc' and uploads the results to Coveralls. It includes installing 'nyc', configuring its reporters and included/excluded files in 'package.json', and a GitHub Actions step to run tests and upload coverage. ```bash npm install --save-dev nyc ``` ```json { "scripts": { "test": "ava", "coverage": "nyc npm test", "lint": "ui5lint" }, "nyc": { "reporter": ["lcov", "text"], "include": ["src/**/*.js"], "exclude": ["test/**"] } } ``` ```yaml - name: Run tests with coverage run: npm run coverage - name: Upload to Coveralls uses: coverallsapp/github-action@v2.3.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true ``` -------------------------------- ### Initialize CAP Node.js Project and Add Samples Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-business-application-studio/skills/sap-btp-business-application-studio/templates/dev-space-setup.md Creates a new CAP (Cloud Application Programming) project with Node.js as the runtime and adds sample data for initial development. Navigate into the project directory after initialization. ```bash # Create new CAP project cds init [project-name] # Add sample data cd [project-name] cds add samples ``` -------------------------------- ### Install UI5 CLI dependencies Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/migration-guides.md Commands for installing the UI5 CLI globally or as a project-specific dependency. ```bash # Global npm install --global @ui5/cli # Project npm install @ui5/cli@^1 ``` -------------------------------- ### Initialize Fiori Elements Sample Project Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-fiori-tools/skills/sap-fiori-tools/SKILL.md Clones the official SAP Fiori tools sample repository and initializes a local development environment. Requires Git and Node.js installed on the host machine. ```bash git clone https://github.com/SAP-samples/fiori-tools-samples cd fiori-tools-samples/V4/apps/salesorder npm install npm start ``` -------------------------------- ### Install UI5 CLI v3 Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/migration-guides.md Installs the latest version of the UI5 CLI as a development dependency in your project. ```bash npm install --save-dev @ui5/cli@^3 ``` -------------------------------- ### Initialize CAP Java Project and Build Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-business-application-studio/skills/sap-btp-business-application-studio/templates/dev-space-setup.md Creates a new CAP project with Java as the runtime and then builds the project using Maven. This command scaffolds the project and compiles it. ```bash # Create new CAP Java project cds init [project-name] --add java cd [project-name] mvn clean install ``` -------------------------------- ### REST API Request Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/manual-templates-guide.md A standard HTTP GET request example for retrieving a list of employees with query parameters, authorization headers, and content negotiation. ```HTTP GET /employees?limit=50&offset=0&status=ACTIVE HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Accept: application/json ``` -------------------------------- ### Project Piper Jenkinsfile Example for SAP CI/CD (Groovy) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-best-practices/skills/sap-btp-best-practices/references/templates-and-examples.md This Groovy script demonstrates a Jenkinsfile for a Project Piper CI/CD pipeline. It outlines stages for checking out code, setting up the environment, building an MTA application, running unit tests, and deploying to development and production environments on Cloud Foundry. ```groovy @Library('piper-lib-os') _ node { stage('Prepare') { checkout scm setupCommonPipelineEnvironment script: this } stage('Build') { mtaBuild script: this } stage('Unit Tests') { npmExecuteScripts script: this, runScripts: ['test'] } stage('Deploy to Dev') { cloudFoundryDeploy script: this, deployTool: 'mtaDeployPlugin', cfOrg: 'my-org', cfSpace: 'dev' } stage('Integration Tests') { // Add integration test execution } stage('Deploy to Prod') { cloudFoundryDeploy script: this, deployTool: 'mtaDeployPlugin', cfOrg: 'my-org', cfSpace: 'prod' } } ``` -------------------------------- ### Initialize SAPUI5 Project with UI5 CLI Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/SKILL.md Commands to set up a new SAPUI5 project environment using the official UI5 CLI. This process includes installing the CLI, creating the project directory, and initializing the project structure. ```bash # Install UI5 CLI npm install -g @ui5/cli # Create new project mkdir my-sapui5-app && cd my-sapui5-app npm init -y # Initialize UI5 project ui5 init # Add UI5 dependencies npm install --save-dev @ui5/cli ``` -------------------------------- ### Successful Response Body Examples (JSON) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/templates/odata-operation-template.md Demonstrates the structure of successful JSON response bodies for different API operations like GET single employee, GET collection of employees, and POST new employee. These examples show the expected properties and data types for each scenario. ```json { "[property]": "[value or type]", "[property]": "[value or type]" } ``` ```json { "EmployeeID": "E12345", "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Department": "ENGINEERING", "HireDate": "2020-06-01", "Salary": 120000.00, "Status": "ACTIVE", "CreatedAt": "2020-06-01T09:00:00Z", "LastModified": "2024-01-15T14:30:00Z" } ``` ```json { "value": [ { "EmployeeID": "E12345", "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Status": "ACTIVE" }, { "EmployeeID": "E12346", "FirstName": "Jane", "LastName": "Smith", "Email": "jane.smith@company.com", "Status": "ACTIVE" } ] } ``` ```json { "EmployeeID": "E12346", "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Department": "ENGINEERING", "HireDate": "2024-01-15", "Salary": 95000.00, "Status": "ACTIVE", "CreatedAt": "2024-01-15T10:30:00Z", "LastModified": "2024-01-15T10:30:00Z" } ``` -------------------------------- ### JavaScript Example Documentation (@example) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/java-javascript-dotnet-guide.md Inserts code examples into documentation comment blocks. It supports optional titles, requires strategic whitespace for readability, and can be repeated multiple times within a single comment. Best practices include using whitespace, inline comments, realistic use cases, and consistent indentation for multi-line objects. ```javascript /** * Searches for matching records * * @example Using simple search * var results = find("John"); * * @example Using advanced filters * var results = find("John", {exact: true, sortBy: "name"}); */ ``` -------------------------------- ### Install Fiori Tools CLI Source: https://github.com/secondsky/sap-skills/blob/main/docs/reference/sap-development-patterns.md Installs the necessary global npm packages to enable Fiori application generation and UI5 development workflows. ```bash npm install -g @sap/generator-fiori npm install -g @ui5/cli ``` -------------------------------- ### System Preparation for Performance Benchmarking Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/benchmarking.md Provides essential steps to prepare a system for accurate performance benchmarking, including connecting to power, closing background applications, disabling swap, setting the CPU governor to 'performance', clearing caches, and avoiding user interaction. These steps minimize external factors that could affect benchmark results. ```bash # Linux sudo swapoff -a # Remember to re-enable: sudo swapon -a # Set to performance mode echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor # After benchmarking, restore: echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor # Clear UI5 cache rm -rf ~/.ui5/ # Clear npm cache npm cache clean --force ``` -------------------------------- ### Execute SQLScript Setup Script Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-sqlscript/commands/sqlscript-setup.md Runs the automated shell script to detect VS Code, install the LSP extension, and verify environment configurations. ```bash bash plugins/sap-sqlscript/scripts/setup-vscode.sh ``` -------------------------------- ### Initialize Custom UI5 Control Library Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/scaffolding-templates.md Command to initialize a new custom UI5 control library project using the Easy-UI5 generator. ```bash yo easy-ui5 library ``` -------------------------------- ### Manual VSIX Extension Installation Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-sqlscript/commands/sqlscript-setup.md Provides the command to package the SQLScript LSP extension for manual installation in VS Code if the automated script fails. ```bash npm pack @sap/hana-sqlscript-lsp ``` -------------------------------- ### Official Documentation Information Example Source: https://github.com/secondsky/sap-skills/blob/main/docs/contributor-guide/quality-assurance.md An example of how to record official documentation details for a package, including its official website, GitHub repository, and npm package page. This information is used for evidence citations. ```text Official: [https://better-auth.com](https://better-auth.com) GitHub: [https://github.com/better-auth/better-auth](https://github.com/better-auth/better-auth) npm: [https://www.npmjs.com/package/better-auth](https://www.npmjs.com/package/better-auth) Context7: (not available) ``` -------------------------------- ### Get Multiple Dimension Members with Pagination using JavaScript Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-sac-planning/skills/sap-sac-planning/references/analytics-designer-planning.md This JavaScript code retrieves a paginated list of dimension members using the PlanningModel_1 API. The example shows how to fetch members starting from the 5th member (offset 4) up to a total of 8 members (limit 8). This is essential for handling large datasets efficiently. ```javascript var members = PlanningModel_1.getMembers("LOCATION", { offset: "4", // 0-indexed, so 4 = 5th member limit: "8" // Return 8 members }); ``` -------------------------------- ### Cron Expression Examples Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-hana-cloud-data-intelligence/skills/sap-hana-cloud-data-intelligence/references/graphs-pipelines.md These examples illustrate various cron expressions for scheduling tasks. They cover hourly, daily, weekly, monthly, and interval-based scheduling. ```cron 0 0 * * * * # Every hour 0 0 0 * * * # Daily at midnight 0 0 0 * * 1 # Every Monday 0 0 6 1 * * # 6 AM on first of month 0 */15 * * * * # Every 15 minutes ``` -------------------------------- ### Query Parameter Examples Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/manual-templates-guide.md Examples of documenting optional query parameters for filtering and pagination, including 'limit', 'offset', 'department', 'status', and 'sortBy', with their respective types, descriptions, and constraints. ```markdown | Parameter Name | Requirement | Data Type | Description | Location | |---|---|---|---|---| | limit | Optional | Integer | Maximum results per page. Range: 1-100. Default: 20 | Query | | offset | Optional | Integer | Number of results to skip for pagination. Default: 0 | Query | | department | Optional | String | Filter by department code. Example: "SALES" | Query | | status | Optional | String | Filter by employee status. Valid: "ACTIVE", "INACTIVE", "LEAVE" | Query | | sortBy | Optional | String | Sort field. Valid: "name", "hireDate", "salary" | Query | ``` -------------------------------- ### UI5 Application Directory Structure Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/scaffolding-templates.md Illustrates a recommended directory organization for a UI5 application, emphasizing separation of concerns and feature-based grouping. This structure aids in maintainability and scalability. ```tree my-ui5-app/ ├── webapp/ # Application code (never change) │ ├── Component.js │ ├── manifest.json │ ├── controller/ # Group by feature │ │ ├── products/ │ │ │ ├── List.controller.js │ │ │ └── Detail.controller.js │ │ └── orders/ │ │ └── List.controller.js │ ├── view/ # Mirror controller structure │ │ ├── products/ │ │ │ ├── List.view.xml │ │ │ └── Detail.view.xml │ │ └── orders/ │ │ └── List.view.xml │ ├── model/ # Shared models │ │ ├── formatter.js │ │ ├── types.js │ │ └── Constants.js │ ├── i18n/ # Internationalization │ │ ├── i18n.properties # English (default) │ │ ├── i18n_de.properties # German │ │ └── i18n_fr.properties # French │ └── test/ │ ├── unit/ │ └── integration/ ├── ui5.yaml # Build configuration ├── package.json # Dependencies └── .eslintrc # Linting rules ``` -------------------------------- ### Install Missing Dependency Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/troubleshooting.md Installs a missing dependency using npm. This command should be used when the UI5 CLI reports a 'Dependency X not found' error due to the package not being listed in `package.json`. ```bash npm install --save my-dependency ``` -------------------------------- ### SAPUI5 CSP Configuration: Server-Side Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5/skills/sapui5/references/security.md Provides an example of configuring Content Security Policy (CSP) on the server-side. This is the recommended approach for controlling resource loading and execution to prevent XSS. ```http-header Content-Security-Policy: default-src 'self'; script-src 'self' [https://sapui5.hana.ondemand.com;](https://sapui5.hana.ondemand.com;) style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self' [https://api.mybackend.com;](https://api.mybackend.com;) ``` -------------------------------- ### Utilize Fiori Tools CLI for App Development Source: https://github.com/secondsky/sap-skills/blob/main/docs/contributor-guide/README.md This markdown example shows how to use the Fiori Tools Command Line Interface (CLI) for Fiori app development. It includes prerequisites for installing the necessary npm packages and common commands for generating, running, and building Fiori applications. ```markdown ## Fiori Tools CLI **Prerequisites**: ```bash npm install -g @sap/generator-fiori npm install -g @ui5/cli ``` **Common Commands**: ```bash fiori generate app # Create new Fiori app fiori run --open # Run with live reload fiori build # Build for deployment ``` **Cross-Reference**: See **sap-fiori-tools** skill for detailed patterns ``` -------------------------------- ### Adding code examples with in .NET Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/java-javascript-dotnet-guide.md The tag provides a structured way to include code samples and usage context within documentation. ```csharp /// /// The following code sample demonstrates how to open a connection: /// /// SQLAConnection connection = new SQLAConnection(); /// connection.Open("server=localhost"); /// /// This establishes a connection to the local database server. /// ``` -------------------------------- ### SQLScript Exception Handler Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-sqlscript/skills/sap-sqlscript/SKILL.md An example of an EXIT HANDLER within a stored procedure that catches any SQLEXCEPTION. It then selects the error code and message using system variables ::SQL_ERROR_CODE and ::SQL_ERROR_MESSAGE. ```sql CREATE PROCEDURE safe_insert (IN iv_id INTEGER, IN iv_name NVARCHAR(100)) LANGUAGE SQLSCRIPT AS BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN SELECT ::SQL_ERROR_CODE AS err_code, ::SQL_ERROR_MESSAGE AS err_msg FROM DUMMY; END; INSERT INTO "MYTABLE" VALUES (:iv_id, :iv_name); END; ``` -------------------------------- ### OData Paging Example Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/templates/odata-service-overview-template.md Shows how to implement pagination using $top and $skip query options. Note the limitation of 1000 records per request and a recommended page size of 10-100. ```odata $top=50&$skip=100 ``` -------------------------------- ### Install SAP AI SDK for LangChain Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cloud-sdk-ai/skills/sap-cloud-sdk-ai/references/langchain-guide.md Commands to install the necessary SAP AI SDK packages and LangChain dependencies for standard applications or LangGraph-based agents. ```bash npm install @sap-ai-sdk/langchain @langchain/core langchain ``` ```bash npm install @sap-ai-sdk/langchain @langchain/core @langchain/langgraph langchain zod ``` -------------------------------- ### Initialize and Configure UI5 Project Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/SKILL.md Commands to initialize a new UI5 project, install the CLI, and configure the framework. These steps are essential for setting up the environment for both new and existing applications. ```bash npm init --yes npm install --save-dev @ui5/cli ui5 init ui5 use sapui5@latest ui5 add sap.ui.core sap.m themelib_sap_fiori_3 ui5 serve ``` -------------------------------- ### Install and Configure SAP Datasphere CLI Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-datasphere/commands/datasphere-cli.md Commands to install the CLI globally via npm and perform initial authentication and configuration. Supports interactive setup or direct flag-based configuration. ```bash npm install -g @sap/datasphere-cli datasphere --version datasphere configure datasphere configure set tenant-url https://your-tenant.eu10.hcs.cloud.sap datasphere login ``` -------------------------------- ### Install Foundation Models SDK Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-cloud-sdk-ai/skills/sap-cloud-sdk-ai/references/foundation-models-guide.md Installs the SAP AI Core Foundation Models SDK using npm for JavaScript/TypeScript projects or adds the Maven dependency for Java projects. ```bash npm install @sap-ai-sdk/foundation-models ``` ```xml com.sap.ai.sdk.foundationmodels openai ${ai-sdk.version} ``` -------------------------------- ### Marketplace Source Path Example (JSON) Source: https://github.com/secondsky/sap-skills/blob/main/docs/contributor-guide/README.md Illustrates the correct JSON structure for the 'source' field within the marketplace generation process. Emphasizes using individual plugin paths to prevent cache duplication, contrasting it with an incorrect example that leads to significant cache bloat. ```json { "source": "plugins/sap-cap-capire" // ✅ Correct: individual plugin } NOT: { "source": "./" // ❌ Wrong: causes 18× cache bloat } ``` -------------------------------- ### Install Cloud Connector on Linux (DEB) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-connectivity/skills/sap-btp-connectivity/references/cloud-connector.md Installs the SAP Cloud Connector on Linux using the DEB package manager. It registers the service as 'scc_daemon', which is then started and enabled to run on boot. ```bash sudo dpkg -i sapcc--linux-x64.deb sudo systemctl start scc_daemon sudo systemctl enable scc_daemon ``` -------------------------------- ### Install Cloud Connector on Linux (RPM) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-btp-connectivity/skills/sap-btp-connectivity/references/cloud-connector.md Installs the SAP Cloud Connector on Linux using the RPM package manager. It registers the service as 'scc_daemon', which is then started and enabled to run on boot. ```bash sudo rpm -i sapcc--linux-x64.rpm # Service: scc_daemon sudo systemctl start scc_daemon sudo systemctl enable scc_daemon ``` -------------------------------- ### Build Themes and Experimental CSS Variables Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sapui5-cli/skills/sapui5-cli/references/build-process.md Compiles LESS files into CSS and demonstrates how to enable experimental CSS variable support via the CLI. ```bash ui5 build --experimental-css-variables ``` -------------------------------- ### Complete Response Examples (HTTP) Source: https://github.com/secondsky/sap-skills/blob/main/plugins/sap-api-style/skills/sap-api-style/references/manual-templates-guide.md These examples demonstrate complete HTTP responses for different OData operations, including headers and body content for POST (201 Created), GET (200 OK), and a 400 Bad Request error. ```http HTTP/1.1 201 Created Content-Type: application/json Location: https://api.example.com/odata/v4/Employees('E12346') ETag: "abc123def456" OData-Version: 4.0 { "EmployeeID": "E12346", "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Department": "ENGINEERING", "HireDate": "2024-01-15", "Status": "ACTIVE", "Salary": 95000.00, "CreatedAt": "2024-01-15T10:30:00Z" } ``` ```http HTTP/1.1 200 OK Content-Type: application/json ETag: "abc123def456" OData-Version: 4.0 { "EmployeeID": "E12345", "FirstName": "John", "LastName": "Doe", "Email": "john.doe@company.com", "Department": "ENGINEERING", "Salary": 95000.00, "Status": "ACTIVE" } ``` ```http HTTP/1.1 400 Bad Request Content-Type: application/json { "error": { "code": "INVALID_DATA", "message": "Request body validation failed", "details": [ { "field": "Email", "issue": "Email already exists", "value": "john.doe@company.com" }, { "field": "Salary", "issue": "Minimum salary is 20000", "value": "15000" } ] } } ```