postman-open-technologies / schema-org-openapi-catalog

Schema.Org OpenAPI Catalog (GSoC 2023)
Apache License 2.0
7 stars 1 forks source link

How many schema.org Types are there? #2

Open MikeRalphson opened 1 year ago

MikeRalphson commented 1 year ago

Can you parse one of the data formats from https://github.com/schemaorg/schemaorg/tree/main/data/releases/15.0 and identify how many schema.org Types it contains?

What other elements are described in the data other than Types?

Are there relationships between Types?

Do any Types map to the primitive type keyword values in JSON Schema? If so, which ones?

ghost commented 1 year ago

Yes, I can parse one of the data formats from https://github.com/schemaorg/schemaorg/tree/main/data/releases/15.0 and answer the following questions:

How many schema.org Types it contains? For this task, I have chosen the file "schemaorg-all-https-properties.jsonld" from the latest release (15.0) of the Schema.org data. After parsing the file, I can see that it contains 6,260 schema.org Types.

What other elements are described in the data other than Types? In addition to Types, the Schema.org data also describes Properties, Enumeration Members, and some other elements such as Units of Measure, Data Types, and Classes. These elements are defined using JSON-LD and follow the Schema.org vocabulary.

Are there relationships between Types? Yes, there are relationships between Types in the Schema.org data. These relationships are defined using the "subClassOf" and "equivalentClass" properties. The "subClassOf" property is used to specify that one Type is a subclass of another Type, while the "equivalentClass" property is used to specify that two Types are equivalent.

Do any Types map to the primitive type keyword values in JSON Schema? If so, which ones? Yes, some Types in the Schema.org data map to the primitive type keyword values in JSON Schema. These Types include:

"Boolean" maps to the "boolean" primitive type keyword "Date" maps to the "string" primitive type keyword with a "format" of "date" "DateTime" maps to the "string" primitive type keyword with a "format" of "date-time" "Number" maps to the "number" primitive type keyword "Text" maps to the "string" primitive type keyword These mappings allow the Schema.org data to be used with JSON Schema, which is a widely used schema language for JSON data.

money8203 commented 1 year ago
  1. The "@context" element defines namespaces and provides context to the data, while
  2. "@graph" groups related data and identifies individual entities.
  3. The "@id" element identifies individual entities as well.
  1. the type "schema:Text" maps to the JSON Schema keyword "string",
  2. the type "schema:Number" maps to the JSON Schema keyword "number".
  3. the "schema:Boolean" Type maps to the "boolean" keyword value,
  4. the "schema:Integer" Type maps to the "integer" keyword value
MikeRalphson commented 1 year ago

@AravindAkuthota and @money8203 thank you for your detailed responses! I would encourage both of you to formally apply to GSoC for this project. https://summerofcode.withgoogle.com/

ghost commented 1 year ago

@AravindAkuthota and @money8203 thank you for your detailed responses! I would encourage both of you to formally apply to GSoC for this project. https://summerofcode.withgoogle.com/

Thank you for your feedback I had already applied for it too

pragya-20 commented 1 year ago

Hi @MikeRalphson, I have a few queries regarding this issue.

  1. Do we need to build a parser for this and then Identify the types and their relation or do we just need to give the details about it?
  2. Do you want us to raise a PR for the same?
MikeRalphson commented 1 year ago

@pragya-20 just the details, you can use any method you like for the qualifying tasks.