Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

OpenAgriNet Network Specifications

Purpose

This repository contains the versioned OpenAgriNet contracts used to describe agricultural information in Beckn catalogs, Discovery results, and Provider responses. Domain contracts say what a thing is; provider API contracts say what one named Provider's API takes and returns.

The contracts add agriculture-specific fields to Beckn Resource.resourceAttributes. Beckn continues to define Catalog, Provider, Resource identity, Resource descriptor, and protocol envelopes. Registry records, onboarding APIs, transport, signatures, authentication, deployment, and network federation remain separate specifications.

Start here

Entry point Use it for
Schema Pack See every active schema pack, the fields it declares, the field sets it reuses, and where it is used
Complete Examples See OAN attributes composed inside complete Beckn Catalog, Provider, and Resource objects

Active version

The current version line is v0.1; pack metadata uses semantic version 0.1.0. The singular schema/ directory is authoritative for both kinds of pack; profile.json records which kind a pack is, in semantic_model.

Repository layout

Path Contents
schema/ Versioned schema packs, domain and provider API alike, with examples that validate directly against each pack

Each versioned schema pack contains:

  • vocab.jsonld: governed classes and properties;
  • context.jsonld: compact JSON-LD term mappings;
  • attributes.yaml: OpenAPI 3.1 and JSON Schema validation;
  • profile.json: discovery and indexing hints;
  • renderer.json: optional presentation hints;
  • README.md: purpose, composition, fields, and boundaries;
  • examples/: complete JSON instances that validate against the pack.

Examples that demonstrate a single contract live with that schema pack. Complete composition examples live in schema/examples/ and show those attributes inside Beckn-owned objects.

Beckn dependencies

OAN does not redefine the Beckn objects that carry its domain attributes. The links below point to the current Beckn schema source. The OAN schemas pin the applicable version in each $ref.

Beckn definition Use in OAN
Catalog 2.2 Groups a Provider's advertised Resources
Provider 2.1 Identifies the entity offering the Resources in a Catalog
Resource 2.0 Carries OAN data in resourceAttributes
Attributes 2.0 Provides the JSON-LD extension container used by resourceAttributes
Descriptor 2.1 Supplies names, codes, and human-readable descriptions
GeoJSONGeometry 2.0 Represents coordinate-defined coverageAreas directly and geometry inside Location.geo
Location 2.0 Represents resolved pack-specific locations with geometry under geo and an optional address
Participant Defines the Beckn participant boundary; OAN does not introduce OANParticipant
Consumer Defines the Beckn consumer object where a protocol interaction requires one

Composition model

The domain schema packs are composable field sets. A selected contract uses JSON Schema allOf to validate one resourceAttributes object against every referenced field set. Pack relationships are composition-only. A provider API pack composes differently: its root is a oneOf over one leaf per scheme and call, and x-oan-schema-by-action names the schema that serves each action.

For example, the effective WeatherAdvisory contract combines the shared Agriculture Resource fields with Weather Advisory fields. This composition does not make one runtime object a child of another, and it does not require an intermediate Domain payload.

Each domain pack supports OnDemand and Direct information. An OnDemand Resource describes information that requires a Provider invocation and may also contain current or representative values. A Direct Resource contains or directly references specific information that is usable without another Provider invocation. These modes define minimum requirements rather than mutually exclusive field sets. The mode does not indicate freshness; timestamps and validity express when the information applies.

The selected domain pack is also the capability type. OnDemand advertises what the Provider can supply, and Direct carries the supplied information. OAN does not define parallel *Capability schema packs.

The canonical OAN @type is required. A Provider extension may use a JSON-LD type array only when that array retains the canonical OAN type. A pack-local @context is optional inside resourceAttributes when the enclosing Beckn document already establishes the same context; standalone JSON-LD documents include it explicitly.

Validation boundary

Each pack validates a complete Resource.resourceAttributes object when that object is present. It does not validate a Beckn discovery Intent, a JSONPath filter, or an identifier-only reference to a previously discovered Resource.

Required fields in a pack describe a conforming Resource, not every protocol request. OnDemand requirements apply to a Resource that advertises what a Provider can supply. Direct requirements apply to a Resource that contains or directly references the supplied information. An adapter that accepts a partial Provider-specific input must validate that input separately before mapping the completed result to an OAN Resource.

Canonical identifiers

OAN-governed terms use the openagrinet: prefix:

https://openagrinet.github.io/network-specs/vocab#

Versioned schema artifacts are published below:

https://openagrinet.github.io/network-specs/schema/

Taxonomy identifiers use separately governed taxonomy URLs. They are references from the schema, not schema-host aliases.

Contract boundary

These specifications define portable domain data. They do not define:

  • protocol request and response envelopes;
  • synchronous or asynchronous interaction behavior;
  • Registry or Provider-onboarding interfaces;
  • network endpoints, signing keys, or authentication;
  • protected-data or consent artifacts;
  • channel adapters, observability, or deployment topology.

Those contracts may reference the domain types defined here without duplicating their fields.

Conventions

  • OpenAPI 3.1.1 with JSON Schema 2020-12 semantics
  • JSON-LD 1.1 context and vocabulary per pack
  • one openagrinet: namespace for OAN-governed terms
  • lowerCamelCase property names
  • UpperCamelCase governed values
  • semantic versions for schema packs and versioned Resources
  • composition through named allOf references
  • no personal profiles, credentials, transport addresses, prompts, embeddings, or model traces

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages