Comments (6)
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.
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.
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.
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.
I am closing this issue till we hold the call
from data-models.
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)
- Request for inclusion of common fields in common schema HOT 3
- Broken example links HOT 1
- Date related issues HOT 1
- Details needed on x-ngsi HOT 6
- Edit configuration files HOT 2
- Few corrections in ngsi-ld_generator_keyvalues_v0.93.py HOT 1
- Need info for certain example formats. HOT 1
- Rationale for including pieces of the NGSI-LD core context in data models HOT 2
- Question : unit of measure HOT 1
- Which @context to use as reference? HOT 1
- How to automatically generate the model.yaml and swagger.yaml HOT 3
- Install of PYSMARTDATAMODEL fails using poetry HOT 3
- Functionality unclear with regards to properties and attributes in pysmartdatamodels HOT 3
- Subschema's are not deterministic HOT 4
- SAREF terms have outdated URIs HOT 1
- Full context update? HOT 1
- Error in "location" when generating a random example HOT 5
- Missing dependency `ruamel.yaml` HOT 2
- Converting JSON-LD Smart Data Models to RDF/Turtle File Ontology HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-models.