CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

sap-cap-validator-plugin

A CAP plugin that checks incoming data against JSON Schema rules written as @Validator annotations on model elements, evaluated by Ajv, with no handler to register.

Puts the rule next to the element it guards: @Validator: {format: 'email'} on a field, and data that does not match is rejected. The rules are evaluated by Ajv, so any draft-07 keyword Ajv implements can be used, which is how it reaches formats a CDS model has no assertion of its own for: duration, uri, url, email, hostname, ipv4, ipv6 and a date-time string. Installing the package and annotating the entities is the whole setup, with no handler to register and nothing to call from a service implementation.

Facts

Latestv0.0.2ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
Input validationCAPInput validationcapabilityRejecting bad input before it reaches the database. While this can be done manually inside a handler, there are solutions in place to derive type, range, enum and mandatory checks from the model definitions.
Flavors
Node.jsfrom its runtime
Requires
@sap/cds≥ 7@sap/cdsartifactThe peer range, as published.AjvAjvoutside the atlasThe validator that compiles and evaluates the annotated rules; the vocabulary the plugin accepts is whatever Ajv's draft-07 implementation does.

Who is behind it

Mauricio LaufferMauricio LaufferPersonMaintains this
In the atlas: maintains 16, contributes to 41, wrote 4
@mauriciolauffer
maintainer

Before choosing this

Signals

ActivityQuietRelease and repository quiet for 30 months

Both observable publication channels have been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →
PracticalFunctional boundary

The annotation sits on a single element, so a rule that spans two fields, or one that needs a lookup, has nowhere in it to go.

What it declares

Every artifact

Type
CDS plugin
Origin
Independently maintained
Runtime
Node.js

As a CDS plugin

Declared for
>=7
Distributed through
npm

Connections2

Install

npm add sap-cap-validator-plugin

Derived from the package name. No recipe recorded; the README has the configuration.

Where it sits in your app

Download
Your CAP applicationdocumentedrequiresAjv, systemAjvsystemsap-cap-validator-plugin, modulesap-cap-validator-pl…
SAPnot SAP's, or the project's owndocumented only

README

quoted from mauriciolauffer/sap-cap-validator-plugin under MIT, read
mauriciolauffer/sap-cap-validator-plugin/README.mdOn GitHub

SAP CAP Validator Plugin

npm test

A SAP CAP plugin to validate incoming data.

This plugin uses Ajv, a JSON schema validator. All validation keywords available in Ajv (draft-07) can be used.

Setup

All you need to do is to install the plugin and add the @Validator annotations to your entities.

Installation

Install the plugin as an npm module:

npm install sap-cap-validator-plugin
Annotation

The annotation tag is @Validator. You can add and combine valid rules from JSON Schema such as types and formats

using {myService as service} from './services';

annotate service.myEntity with {
  field_duration            @Validator: {format: 'duration'};
  field_uri                 @Validator: {format: 'uri'};
  field_url                 @Validator: {format: 'url'};
  field_email               @Validator: {format: 'email'};
  field_hostname            @Validator: {format: 'hostname'};
  field_ipv4                @Validator: {format: 'ipv4'};
  field_ipv6                @Validator: {format: 'ipv6'};
  field_datetime            @Validator: {
    type: 'string',
    format: 'date-time'
  };
};
MIT, read

History

Latest

v0.0.2

1downloads per week, npm
Weekly downloads for sap-cap-validator-plugin26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 1.27 Apr – 3 May: 154 May – 10 May: 1011 May – 17 May: 718 May – 24 May: 225 May – 31 May: 61 Jun – 7 Jun: 78 Jun – 14 Jun: 215 Jun – 21 Jun: 422 Jun – 28 Jun: 429 Jun – 5 Jul: 36 Jul – 12 Jul: 813 Jul – 19 Jul: 020 Jul – 26 Jul: 527 Jul – 2 Aug: 83 Aug – 9 Aug: 310 Aug – 16 Aug: 317 Aug – 23 Aug: 1024 Aug – 30 Aug: 231 Aug – 6 Sept: 27 Sept – 13 Sept: 714 Sept – 20 Sept: 821 Sept – 27 Sept: 1128 Sept – 4 Oct: 125 Oct – 11 Oct: 2212 Oct – 18 Oct: 419 Oct – 25 Oct: 1
Input validation
  1. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
  2. cap-toolkitUtility bundle for CAP handlers: builder, roles, validation, queries
  3. capvalCustom messages and handler classes for CAP input validation
  4. cds-validateZod schemas as CAP validation middleware
  5. @sap/cdsCAP Node.js runtime

Details

Sources5
The discovery passdiscovered herechecked
npm registrydiscovered herechecked
npm registry, sap-cap-validator-pluginversion, releases, installschecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for>=7
latestv0.0.2
first release
releases and cadence1
discovered viaThe discovery pass, npm registry
first seen in the atlas
ecosystem and domaincap, security-and-compliance
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:mauriciolauffer-sap-cap-validator-plugin
JSON
/artifacts/mauriciolauffer-sap-cap-validator-plugin.json
MCP
Connecting an agent