Schema: robos:APIEndpoint
Formal W3C SHACL constraint shape and OSLC JSON-LD specification for robos:APIEndpoint in the services package store.
Table of contents
- Specification Metadata
- Upstream Schema Basis (Refers From) & Global Standards Provenance
- Entity Relationship & Schema Context
- Property Constraints & SHACL Rules
- Canonical OSLC JSON-LD Example
- Programmatic SHACL Validation
Specification Metadata
- RDF / OWL Class:
robos:APIEndpoint - Aliases / Target Classes:
robos:APIEndpoint,robos:APIOperation - SHACL Shape ID:
urn:robos:shape:APIEndpointShape - Governing Package: Services & Contracts (robos.services) (
services) - Namespace:
robos.services - Schema.org Classification: https://schema.org/EntryPoint
- Domain De Facto Standard: https://spec.openapis.org/oas/v3.1.0
- Upstream Schema Basis (Refers From): https://schema.org/EntryPoint
Upstream Schema Basis (Refers From) & Global Standards Provenance
This RobOS schema is modeled after and directly aligns with two levels of global standards:
- Universal Schema.org Class: https://schema.org/EntryPoint (100% interoperability with search engines, web indexers, and general AI reasoning)
- Specialized Domain Standard: https://spec.openapis.org/oas/v3.1.0 (de facto standard for domain-specific ALM, BDD, or infrastructure operations)
- Canonical Reference: https://schema.org/EntryPoint
- Agent Guidelines: When autonomous agents generate, expand, or validate instances of
robos:APIEndpoint, they MUST adhere to and base their output on this referred schema object and universal Schema.org parent class, extending it with RobOS SDLC properties.
Entity Relationship & Schema Context
API Endpoint robos:APIEndpoint
Governed by W3C SHACL shape urn:robos:shape:APIEndpointShape within the Services & Contracts (robos.services) (robos.services) package store.
dcterms:title robos:pathPattern robos:httpMethod Property Constraints & SHACL Rules
| Property Path | Name | Multiplicity | Data Type | Constraint Rule / Validation Message |
|---|---|---|---|---|
dcterms:title | Title / Display Name | 1..* | xsd:string | API Endpoint must have a title or summary. |
robos:pathPattern | API Path Pattern | 1..* | xsd:string | API Endpoint must declare path pattern (e.g. /api/v1/orders). |
robos:httpMethod | HTTP Method | 1..* | xsd:string | API Endpoint must declare HTTP method (GET, POST, etc.). |
Canonical OSLC JSON-LD Example
{
"@id": "urn:robos:services:api-endpoint-sample",
"@type": [
"robos:APIEndpoint",
"robos:APIOperation",
"schema:EntryPoint",
"oslc:Resource"
],
"dcterms:title": "Sample API Endpoint",
"dcterms:description": "Canonical reference instance for robos:APIEndpoint.",
"robos:package": "services",
"robos:namespace": "robos.services",
"robos:pathPattern": "/api/v1/samples",
"robos:httpMethod": "GET",
"robos:schemaOrgType": "https://schema.org/EntryPoint",
"robos:domainStandard": "https://spec.openapis.org/oas/v3.1.0",
"robos:refersFrom": "https://schema.org/EntryPoint"
}
Programmatic SHACL Validation
const { SHACLValidator } = require('/usr/local/share/robos/robos-graph/lib/shacl-validator');
const { OSLCGraphParser, OSLC_CONTEXT } = require('/usr/local/share/robos/robos-graph/lib/oslc-parser');
const validator = new SHACLValidator();
const result = validator.validateGraph(new OSLCGraphParser({
"@context": OSLC_CONTEXT,
"robos:nodes": [
{
"@id": "urn:robos:services:api-endpoint-sample",
"@type": [
"robos:APIEndpoint",
"robos:APIOperation",
"schema:EntryPoint",
"oslc:Resource"
],
"dcterms:title": "Sample API Endpoint",
"dcterms:description": "Canonical reference instance for robos:APIEndpoint.",
"robos:package": "services",
"robos:namespace": "robos.services",
"robos:pathPattern": "/api/v1/samples",
"robos:httpMethod": "GET",
"robos:schemaOrgType": "https://schema.org/EntryPoint",
"robos:domainStandard": "https://spec.openapis.org/oas/v3.1.0",
"robos:refersFrom": "https://schema.org/EntryPoint"
}
],
}));
console.log("Conforms:", result.conforms); // Expected: true