# Documenting conventions

**URL:** <https://farmos.discourse.group/t/documenting-conventions/1263>\
**Category:** Conventions\
**Created:** [June 7, 2022, 8:21pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263 "2022-06-07T20:21:52Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 21, 2023, 9:39pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/21 "2023-02-21T21:39:58Z")

</div>

> **[Propose a way to centralize schemas for reference and validation. (#6) ·...](https://gitlab.com/OpenTEAMAg/ag-data-wallet/openteam-convention/-/issues/6)**
>
> A functional reference repository for schemata Greg and I have been discussing some of the things we believe we can achieve...

---

<div class="post-metadata">

**Author:** ![jgaehring](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/jgaehring/32/927_2.png) [@jgaehring](https://farmos.discourse.group/u/jgaehring)\
**Post date:** [July 28, 2023, 3:44pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/22 "2023-07-28T15:44:30Z")

</div>

Dunno if this would be of interest to anyone here, but came across this documentation on Solid Project “conventions” while digging through some of the [recent work DFC is doing with Solid](https://forum.solidproject.org/t/client-to-client-standard-resources-and-guidelines/6124):

> **[conventions](https://pdsinterop.org/conventions/)**
>
> Conventions around how apps and services store data on your personal data store

And I’m not sure how much the shared use of the term “convention” is just serendipity, not necessarily denoting the same thing, but seemed like it was at least worth exploring given the two projects share an ultimate aim as well.

---

<div class="post-metadata">

**Author:** ![gbathree](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/gbathree/32/286_2.png) [@gbathree](https://farmos.discourse.group/u/gbathree)\
**Post date:** [September 5, 2023, 4:24pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/23 "2023-09-05T16:24:26Z")

</div>

Oh I wanted to post this somewhere also.

I was talking to chatGPT about the benefits of JSON Schema versus JSON-LD and RDF. It was a very very helpful conversation I’d suggest anyone read who’s trying to understand this stuff:

[https://chat.openai.com/share/13d15bc9-c30e-4fb9-a960-6ecdf2e5ddbb](https://chat.openai.com/share/13d15bc9-c30e-4fb9-a960-6ecdf2e5ddbb)

---

<div class="post-metadata">

**Author:** ![gbathree](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/gbathree/32/286_2.png) [@gbathree](https://farmos.discourse.group/u/gbathree)\
**Post date:** [October 16, 2023, 7:24pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/24 "2023-10-16T19:24:11Z")

</div>

Don’t want this to get buried, but this is the appropriate place.

We talked to Ben Hutton, one of the JSON Schema maintainers, and also asked on their Slack channel a few questions. They were super helpful in supplying some reference examples of those linking JSON Schema to JSON-LD definitions.

Just pasting the discussion here directly, I think it’s worth it. I think the Swagger link is especially compelling.

[6 hours ago](https://json-schema.slack.com/archives/C5CF75URH/p1697463898747339)

Hey all, just chatted with [@relequestual (Ben Hutton)](https://json-schema.slack.com/team/U5CJT43D2) and discussed use annotations to extract out JSON LD contexts. In short, we have a community (agricultural technology developers) who are interested in having common vocabulary terms so that we have better data comparability emerging from the many data sources.Has anyone used annotations to extract out JSON LD contexts before, and if so is there an implementation to share?

## 7 replies

Jason mentioned a draft spec for adding keywords to JSON Schema to allow you to build JSON-LD context (if I understand correctly)…  
Tracker: [draft-polli-restapi-ld-keywords-07 - REST API Linked Data Keywords](https://datatracker.ietf.org/doc/draft-polli-restapi-ld-keywords/)  
This example from the latest draft: [REST API Linked Data Keywords](https://www.ietf.org/archive/id/draft-polli-restapi-ld-keywords-02.html#name-schema-with-semantic-inform)  
Shows how, using additional keywords in the schema, you can attach the context to the instance, and then use JSON-LD tooling to transform.I think there could be a different but similar approach to achieve the same result using just the annotations mechanic.

![IETF Datatracker](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/d/dd48e8cb4097d64b71418c6233725e9f419ef198.png)IETF Datatracker

[REST API Linked Data Keywords](https://datatracker.ietf.org/doc/draft-polli-restapi-ld-keywords/)

This document defines two keywords to provide semantic information in OpenAPI Specification and JSON Schema documents, and support contract-first semantic schema design.

![ietf.org](https://slack-imgs.com/?c=1&o1=wi32.he32.si&url=https%3A%2F%2Fwww.ietf.org%2Ffavicon.ico)[ietf.org](http://ietf.org)

[REST API Linked Data Keywords](https://www.ietf.org/archive/id/draft-polli-restapi-ld-keywords-02.html#name-schema-with-semantic-inform)

This document defines two  
keywords to provide semantic information in  
OpenAPI Specification and JSON Schema documents,  
and support contract-first semantic schema design.

[2 hours ago](https://json-schema.slack.com/archives/C5CF75URH/p1697477784846859?thread_ts=1697463898.747339&cid=C5CF75URH)

[@Roberto Polli](https://json-schema.slack.com/team/U030TT62DCY) is the author of that I-D. He might have some practical experience and/or tooling he can share.

[1 hour ago](https://json-schema.slack.com/archives/C5CF75URH/p1697479903400969?thread_ts=1697463898.747339&cid=C5CF75URH)

Hi [@Greg Austic](https://json-schema.slack.com/team/U05RH5ZL4GM), you can see this simple OAS editor that resolves reference using the Italian sparql endpoint [https://italia.github.io/swagger-editor/](https://italia.github.io/swagger-editor/)

[1 hour ago](https://json-schema.slack.com/archives/C5CF75URH/p1697480277917539?thread_ts=1697463898.747339&cid=C5CF75URH)

While the repo [GitHub - ioggstream/draft-polli-restapi-ld-keywords: OpenAPI keywords for Linked Data](https://github.com/ioggstream/draft-polli-restapi-ld-keywords) contains a basic python implementation

ioggstream/draft-polli-restapi-ld-keywords

OpenAPI keywords for Linked Data

Website

> **[REST API Linked Data Keywords](https://ioggstream.github.io/draft-polli-restapi-ld-keywords/draft-polli-restapi-ld-keywords.html)**
>
> This document defines two
> keywords to provide semantic information in
> OpenAPI Specification and JSON Schema documents,
> and support contract-first semantic schema design.

Stars

15

Added by [GitHub](https://json-schema.slack.com/services/B01UR8J8BDJ)

[1 hour ago](https://json-schema.slack.com/archives/C5CF75URH/p1697480354673599?thread_ts=1697463898.747339&cid=C5CF75URH)

PS. Thanks [@Jason Desrosiers](https://json-schema.slack.com/team/UB047CD47) for the ping 😉

[36 minutes ago](https://json-schema.slack.com/archives/C5CF75URH/p1697481939849589?thread_ts=1697463898.747339&cid=C5CF75URH)

[@relequestual (Ben Hutton)](https://json-schema.slack.com/team/U5CJT43D2) Yeah, I worked on basic JSON-LD extraction through annotations at some point. It is not complete, but it was also very simple: extract annotations using the standard output formats and have a small program that parses that, gets the JSON-LD annotations, and puts it back at the right places of the instance

[1 minute ago](https://json-schema.slack.com/archives/C5CF75URH/p1697484072758779?thread_ts=1697463898.747339&cid=C5CF75URH)

Wow [@Roberto Polli](https://json-schema.slack.com/team/U030TT62DCY) I love that documentation! [@Octavio](https://json-schema.slack.com/team/U05TLE0GS9G) look at the swagger docs - it can nicely interpret and present both JSON LD and JSON Schema all in one go. Thanks everyone for your feedback.

[20 minutes ago](https://json-schema.slack.com/archives/C5CF75URH/p1697486523168759?thread_ts=1697463898.747339&cid=C5CF75URH)

[@Greg Austic](https://json-schema.slack.com/team/U05RH5ZL4GM) Yes, and it’s still a preliminary implementation. We expect to integrate - at a certain point - the OAS editor we have here [Italian API Guidelines Checker](https://italia.github.io/api-oas-checker/) with the semantic viewer that queries the sparql endpoint.

[19 minutes ago](https://json-schema.slack.com/archives/C5CF75URH/p1697486555573399?thread_ts=1697463898.747339&cid=C5CF75URH)

If you are interested in contributing implementations or PR repos, let me know!

[12 minutes ago](https://json-schema.slack.com/archives/C5CF75URH/p1697486995795479?thread_ts=1697463898.747339&cid=C5CF75URH)

That would be great. Let me read through everything to see yo which event we can unify efforts.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [March 21, 2024, 3:51pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/25 "2024-03-21T15:51:04Z")

</div>

FYI: [farmOS Conventions module](https://farmos.discourse.group/t/farmos-conventions-module/1950)

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 23, 2026, 12:01pm UTC](https://farmos.discourse.group/t/documenting-conventions/1263/26 "2026-08-23T12:01:50Z")

</div>

> [@Declarative data entry conventions](https://farmos.discourse.group/t/declarative-data-entry-conventions/2591):
>
> (Quite the obtuse topic name, but we have to start somewhere! laughing) Spinning this off as a dedicated topic from: This is a fun (and functional) idea that relates to the “Documenting Conventions” discussion. The first step to exploring this might be brainstorming what the YML might look like for representing a “data entry pattern” (aka a “declarative data entry convention”)… This is essentially an ETL ([Extract, transform, load - Wikipedia](https://en.wikipedia.org/wiki/Extract%2C_transform%2C_load)) specification. We are starting with some sem…

[Previous page](https://farmos.discourse.group/t/documenting-conventions/1263.md?page=1)
