hypercontract

Describing RESTful Web APIs using profiles written in RDF.

Namespace
https://hypercontract.org/

Classes

# EntryPoint

Instances of this class serve as entry points to the API. The URI of the instance is also the URL of the resource.

# Operation

Either an unsafe state transition or a safe state transition that expects certain query params or has a returned type different from the rdfs:range value of the propery describing the state transition.

Properties

constraint Precondition[]
The constraints defined for the Operation.
expectedBody rdfs:Class[]
The type of representation expected in the request body of the Operation request.
expectedQueryParams rdfs:Class[]
The type that describes the query parameters of the Operation request.
method xsd:string
The HTTP method of the Operation request (e.g. POST).
returnedType rdfs:Class[]
The type of representation returned as a result of the Operation. When the Operation redirects to another resource, this type may differ from the rdfs:range value of the property describing the state transition.

# Precondition

A precondition that needs to be met before the Operation can be performed.

# Profile

A profile describing a RESTful Web API using RDF and hypercontract.

# Schema

A schema that describes the serialization of a class instance or property value for a specified target format.

Properties

schemaType xsd:string
The media type of the schema definition (e.g. application/schema+json).
targetType xsd:string
The media type of the serialization that the Schema describes (e.g. application/json).

# StateTransition

A link relation type that describes a state transition. Unsafe state transitions must also be defined as an Operation.

Properties

# method

The HTTP method of the Operation request (e.g. POST).

Used by
Operation
Value Type
xsd:string

# schemaType

The media type of the schema definition (e.g. application/schema+json).

Used by
Schema
Value Type
xsd:string

# targetType

The media type of the serialization that the Schema describes (e.g. application/json).

Used by
Schema
Value Type
xsd:string

# constraint

The constraints defined for the Operation.

Used by
Operation
Value Type
Precondition[]

# expectedBody

The type of representation expected in the request body of the Operation request.

Used by
Operation
Value Type
rdfs:Class[]

# expectedQueryParams

The type that describes the query parameters of the Operation request.

Used by
Operation
Value Type
rdfs:Class[]

# instanceSchema

The Schemas that describe the serialization of a class instance.

Used by
rdfs:Class
Value Type
Schema[]

# returnedType

The type of representation returned as a result of the Operation. When the Operation redirects to another resource, this type may differ from the rdfs:range value of the property describing the state transition.

Used by
Operation
Value Type
rdfs:Class[]

# valueSchema

The Schemas that describe the serialization of a property value.

Used by
rdf:Property
Value Type
Schema[]