ldexterldesign / buy-sell Goto Github PK
View Code? Open in Web Editor NEWπ΅ A schema (made from https://json-schema.org + https://schema.org) to help me record/reference when buying/selling things (and perhaps you too?)
π΅ A schema (made from https://json-schema.org + https://schema.org) to help me record/reference when buying/selling things (and perhaps you too?)
BUY Briki/cezve/ibrik
See latest podcast schema
E.g. priceSpecification.deliveryChargeSpecification.price
{
"dateCreated": "2022-07-19",
"datePurchased": "2019-09",
"priceSpecification": {
"deliveryChargeSpecification": {
"price": null // ?
},
"price": null, // ?
"priceCurrency": "eur",
"totalPrice": 74.38,
"totalPriceUnit": 7.438,
"unitPriceSpecification": {
"referenceQuantity": 10
},
"valueAddedTaxIncluded": null // ?
},
"product": {
"brand": "http://tricorp.com",
"model": "t190",
"name": "tricorp",
"size": "medium",
"url": "http://tricorp.com/en/all-products/t-shirts/101002-t190/190-gsm-t-shirt"
},
"seller": {
"agent": {
"url": "http://beschermkleding-shop.nl/t-shirt-rom88-t-190.html"
},
"agentType": "organization"
}
}
gtin covers most products
seller can be a person, organisation or both
Currently anyOf but should be oneOf?
Sorry for not getting to this sooner. I've been off the grid for a while.
I like the way the custom keywords are working out. The only issue is that $comment doesn't make sense in alias. alias is not a schema, so putting JSON Schema keywords in there doesn't make sense. I'd move that up a level.
The main problem I see is missing properties keywords in a few places. Mostly, I see this at the top level. For example, it looks like you intend the following to be top level properties: buyer, priceSpecification, product, seller, service. These need to be under a properties keyword.
Hi @jdesrosiers!
Thanks for feedback - very kind
I've deleted the gist and migrated it to this repo, which I created the other day - it's almost identical to the gist with the exception of some bits unrelated to your feedback
I'll implement your feedback in a commit shortly and hope you'd be kind enough to glance at it again so I can resolve this issue
Sincerely
https://github.com/ldexterldesign/BUY-SELL/blob/master/schema.json#L101
Before:
...
"s:additionalType": "https://schema.org/SellAction"
...
After:
...
"s:additionalType": "s:SellAction"
...
Specifically
The $comment keyword is strictly intended for adding comments to the JSON schema source. Its value must always be a string. Unlike the annotations title, description and examples, JSON schema implementations arenβt allowed to attach any meaning or behavior to it whatsoever, and may even strip them at any time. Therefore, they are useful for leaving notes to future editors of a JSON schema, (which is quite likely your future self), but should not be used to communicate to users of the schema.
"eligibleRegion": {
"$comment": "Do use ISO 3166-1 alpha-3 three-letter country codes http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3",
"examples": [
"mlt",
"gbr"
],
"items": {
"type": "string"
},
"s:additionalType": "http://schema.org/Text",
"s:sameAs": "http://schema.org/eligibleRegion",
"type": "array"
}
"totalPriceUnit": {
"$comment": "totalPrice / unitPriceSpecification.referenceQuantity",
"type": "number"
}
Both of these $comments
are instructions to users so should not be $comments
according to spec'. Transfer to description annotations.
From:
"brand": {
"properties": {
"name": {
"s:additionalType": "s:Text",
"type": "string"
},
"url": {
"$ref": "#url"
}
},
"s:additionalType": "s:Brand",
"s:sameAs": "s:brand",
"type": "object"
}
To:
"brand": {
"$ref": "#organization",
"s:sameAs": "s:brand"
}
name - simply what product is it (e.g. gloves)
description (e.g. size)
BUY [apple.com](http://apple.com/) - MacBook - Pro - 2019
[ ] 1/5 old, used lot, ok
[ ] 2/5 n/a, used, fine/good
[ ] 3/5 n/a, used some, great
[ ] 4/5 n/a, used little, excellent
[ ] 5/5 new, unused, mint/perfect
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.