Giter VIP home page Giter VIP logo

Comments (6)

a39172 avatar a39172 commented on August 16, 2024

I add another situation where I had to manually and unnecessarily set the "EntityIdentifierType" when I could use the same definition from the common-schema:

Client:
      type: object
      allOf:
        - $ref: "https://smart-data-models.github.io/dataModel.Organization/Organization/model.yaml#/Organization"
        - $ref: "https://raw.githubusercontent.com/smart-data-models/data-models/master/schema.org.yaml#/ContactPoint"
      properties:
        provider:
          description: "Relationship. Organization from which the system was acquired."
          anyOf:
            - description: "Property. Identifier format of any NGSI entity"
              maxLength: 256
              minLength: 1
              pattern: ^[\w\-\.\{\}\$\+\*\[\]`|~^@!,:\\]+$
              type: string
            - description: "Property. Identifier format of any NGSI entity"
              format: uri
              type: string
          x-ngsi:
            model: https://schema.org/URL
            type: Relationship
      # Required properties in addition to those already defined required in the referenced schemas.
      required:
        - "name"
        - "address"
        - "location"
        - "taxID"
        - "email"
        - "provider"

from data-models.

albertoabellagarcia avatar albertoabellagarcia commented on August 16, 2024

Why do you need this specific file this way? common-schema.json is just a file with shared attributes used in many data models. We would be glad to help you. Are you aware that in every data model you have an open API compatible spec, like this example.

from data-models.

a39172 avatar a39172 commented on August 16, 2024

I gave two examples above:

  • One where I need to extend the model that represents an "Organization" with the properties assigned to the "ContactPoint" (email, phone, etc.). Right now, I am using the schema.org.yaml file to get the "ContactPoint".
  • Another one where I need a property (representing a relationship) that points to an entity - "EntityIdentifierType". Right now, I am repeatedly and unnecessarily (I think) defining this property when I could refer to the definition present in the common-schema.

I think the examples I gave above (in my two comments) represent well my problem. Notice that I am not creating new models (I haven't had the need for that yet), but rather using existing models (extending or changing them) to represent the scenario I am modeling.

Looking at the examples in the first two comments, then what would be the best alternative (to use an eventual common-schema.yaml)?

Thank you for your attention Alberto.

from data-models.

albertoabellagarcia avatar albertoabellagarcia commented on August 16, 2024

OK, what I understand is that you are extending the models and need the yaml conversion of the common-schema.json into yaml.
This would be no big deal.
To be sure, please, could you schedule a call with us? You can book it in this service. https://calendly.com/smartdatamodels
Best

from data-models.

albertoabellagarcia avatar albertoabellagarcia commented on August 16, 2024

I am closing this issue till we hold the call

from data-models.

a39172 avatar a39172 commented on August 16, 2024

That's exactly it. I think there is no need to schedule a meeting, given that the examples I provided above are clear (I think), and that Albert understood the need.

from data-models.

Related Issues (20)

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.