Giter VIP home page Giter VIP logo

buy-sell's Introduction

buy-sell's People

Contributors

ldexterldesign avatar

Watchers

 avatar  avatar

buy-sell's Issues

Enhance for unknown values (e.g. undefined, null, n/a, none, ?)

{
    "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"
    }
}

Implement feedback

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

Transfer $comment to description (annotation)

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.

Update brand to organization type

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"
                    }

enhance product

name - simply what product is it (e.g. gloves)
description (e.g. size)

Add https://schema.org/Rating

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.