ventrad
The ventrad
package provides a JSON protocol for advertising HTTP endpoint
protocol versions.
Features
Description
ventrad
is a trivial protocol for announcing a set of protocols
exposed by a set of HTTP endpoints.
A client connecting to a root endpoint reads a JSON document delivered with
the content type application/ventrad+json
. The document details which
protocols are supported by the given server, and instructs the client on
where to go in order to use those protocols.
As an example:
$ curl https://api.example.com/
{
"%Schema" : "urn:com.io7m.ventrad:1",
"Protocols" : [ {
"Id" : "urn:com.io7m.cardant:inventory",
"VersionMajor" : 1,
"VersionMinor" : 0,
"Endpoint" : "/inventory/1/0/",
"Description" : "Cardant Inventory service v1.0"
}, {
"Id" : "urn:com.io7m.cardant:inventory",
"VersionMajor" : 1,
"VersionMinor" : 1,
"Endpoint" : "/inventory/1/1/",
"Description" : "Cardant Inventory service v1.1"
}, {
"Id" : "urn:com.io7m.cardant:inventory",
"VersionMajor" : 2,
"VersionMinor" : 0,
"Endpoint" : "/inventory/2/0/",
"Description" : "Cardant Inventory service v2.0"
} ]
}
The JSON document MUST
include a %Schema
property with a value of
urn:com.io7m.ventrad:1
.
The Protocols
property is a non-null array of Protocol
objects. A
Protocol
object contains a unique identifier for the protocol, a non-negative
major and minor protocol version, a URI
indicating the endpoint that uses
the protocol, and a humanly-readable description of the protocol and the
version. All fields are required and must be non-null.
Schema
The served document MUST
conform to the given schema:
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"VProtocol" : {
"type" : "object",
"properties" : {
"Description" : {
"type" : "string",
"description" : "A humanly-readable description of the protocol."
},
"Endpoint" : {
"type" : "string",
"format" : "uri",
"description" : "The endpoint to be used by clients for this protocol."
},
"Id" : {
"type" : "string",
"description" : "The protocol identifier."
},
"VersionMajor" : {
"type" : "integer",
"description" : "The protocol major version."
},
"VersionMinor" : {
"type" : "integer",
"description" : "The protocol minor version."
}
},
"required" : [ "Description", "Endpoint", "Id", "VersionMajor", "VersionMinor" ],
"description" : "A single version of a single protocol."
}
},
"type" : "object",
"properties" : {
"%Schema" : {
"type" : "string"
},
"Protocols" : {
"description" : "The protocols.",
"type" : "array",
"items" : {
"$ref" : "#/$defs/VProtocol"
}
}
},
"required" : [ "%Schema", "Protocols" ],
"description" : "A set of supported protocols in priority order."
}
Releases & Development Snapshots
Releases
You can subscribe to the atom feed to be notified of project releases.
The most recently released version of the package is 1.0.0.
1.0.0 Release (2025-04-15Z)
The compiled artifacts for the release (and all previous releases) are available on Maven Central.
Maven Modules
<dependency> <group>com.io7m.ventrad</group> <artifactId>com.io7m.ventrad.core</artifactId> <version>1.0.0</version> </dependency><dependency> <group>com.io7m.ventrad</group> <artifactId>com.io7m.ventrad.schema</artifactId> <version>1.0.0</version> </dependency><dependency> <group>com.io7m.ventrad</group> <artifactId>com.io7m.ventrad.tests</artifactId> <version>1.0.0</version> </dependency>
Development Snapshots
At the time of writing, the current unstable development version of the package is 1.0.1-SNAPSHOT.
Development snapshots may be available in the Central Portal Snapshots repository. Snapshots are published to this repository every time the project is built by the project's continuous integration system, but snapshots do expire after around ninety days and so may or may not be available depending on when a build of the package was last triggered.
Manual
This project does not have any user manuals or other documentation beyond what might be present on the page above.
Sources
This project uses Git to manage source code.
Repository: https://www.github.com/io7m-com/ventrad
$ git clone --recursive https://www.github.com/io7m-com/ventrad
Issues
This project uses GitHub Issues to track issues.
License
Copyright © 2025 Mark Raynsford <code@io7m.com> https://www.io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.