-
Notifications
You must be signed in to change notification settings - Fork 0
Schema test and raw-loader install #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Could be used to make schema json's renderable and downloadable through docs envisioning something like
|
Just updated to rc8 here: https://github.com/orcfax/fact-statements/tree/main/v3.rc/rc8 with the modification to fix the dex text to make it sound less like an API. What do you think the next steps are for this PR @Christian-MK? |
Well I should make sure I clearly understand what we want out of this. Going back to the vision I shared above, are we looking to add json files for each object in an archival packages with definitions for each of the schema.org types/properties? And once these are added, import them into a feed overview page where they can be downloaded? |
Mostly! To begin, I think we could satisfy this with a cer-schema description with:
Not sure they need to then also be in a feed overview/be downloadable, but I think they should be copy and pastable using the mechanism above. One of the goals is to support future development of the schema from a specification-first perspective -- rn we use code first to have a lot of these conversations. Once we have a specification first approach that should make it easier for ourselves and others to create conforming outputs. |
@ross-spencer Let me know what you think about the last two commits. I've added a page for each object and have added type/property descriptions to I've also added the resulting jsons (per rc8) so that it can be referenced from either the local or static directories depending on which way you want to go. |
@Christian-MK looks great, and then maybe something like this? Just adding the lines in this diff: diff --git a/docs/Feeds/CER/CEX/fact-statement.md b/docs/Feeds/CER/CEX/fact-statement.md
index b5cf1be..67f26ce 100644
--- a/docs/Feeds/CER/CEX/fact-statement.md
+++ b/docs/Feeds/CER/CEX/fact-statement.md
@@ -4,6 +4,9 @@ sidebar_position: 1
slug: /fact-statement
---
+import CodeBlock from '@theme/CodeBlock';
+import factStatement from '!!raw-loader!/schema/cer/cex/fact-statement.json';
+
# Fact Statement
A place for Orcfax to describe the types/properties relevant to a
@@ -70,3 +73,9 @@ understanding.
[prop-14]: https://schema.org/priceCurrency
[prop-15]: https://schema.org/text
[prop-16]: https://schema.org/url
+
+## Fact Statement Example
+
+<CodeBlock language="jsx">{factStatement}</CodeBlock>
+
+<a target="_blank" href="/schema/cer/cex/fact-statement.json" download="fact-statement.json">Download</a> |
On dates -- as this is to become a spec, when we have an approach, we might want to go through the dates and normalize them to something like `1970-01-01T00:00:00Z" so they become consistent across the examples. Might not be worth it? Open for discussion. |
Completely agree, but I just did a quick review of rc8 and didnt see a divergence. Are we representing dates inconsistently at present? |
@ross-spencer My current understanding
|
@Christian-MK sorry for the confusion, I don't think I really created I'd definitely vote to have specific json examples on their specific pages though rather than lots on one single page. |
^^ seems good
^^ not sure an overview.md and overview.mdx are needed (they satisfy the same need?) I wouldn't couple this with the explorer, this should be focused on specification/schema not the business systems we're running as a result. |
@ross-spencer
That example def I made up on the fly but I think it gets the point across. |
good question. is it easy enough to add another column with the title "canonical reference" or something, and link out to schema.org? |
I've done this for fact-statement-datum so that you can see how it looks. Let me know what you think. Also, markdownlint doesnt like import in the first line as it expects a heading-- whats that nifty trick for forcing markdownlint to ignore a line(s)? |
@Christian-MK looks good to me (I mean, I wish there were fewer blank cells, but it represents things correctly.) For the ignore, you can use diff --git a/.markdownlint.yaml b/.markdownlint.yaml
index 7aed438..28db018 100644
--- a/.markdownlint.yaml
+++ b/.markdownlint.yaml
@@ -10,3 +10,4 @@ MD033: false
MD013:
line_length: 80
tables: false
+MD041: false |
NB. we can resolve the conflicts on this branch before merging, let me know when it's ready to review and i can help. Looks like it's a bit of a persnickety one. |
Seems like you may have already done the work of sorting out the conflicts? |
re: conflicts @Christian-MK ^^ I anticipate reviewing and addressing this PR tomorrow The conflict is likely because of the merge of main into this branch -- instead it probably needed something like: fetch --all && git rebase origin/main To bring things into shape. The primary option forward is just to cherry-pick the content/config commits into a new branch made from main, or move things over manually. Not a huge task so happy to do this. |
Yikes, that's my bad. |
Great work @Christian-MK! And merged via #35 |
To run:
npm i && npm start
Example embedding JSON into a page and making it downloadable. Result is as follows.
Connected to: #24