It creates an open catalog of OpenAPI definitions for each of the Schema.org Types. Providing a robust set of starting OpenAPI templates for teaching or developing new APIs using a design-first approach.
It helps save developer's work when it comes to starting new APIs, but also help ensure APIs are developed using common standards and are as interoperable as possible.
NOTE: This project has been a part of Google Summer of Code (GSoC) 2023.
This project unfolds in two key steps:
- Generate JSON Schema: Begin by transforming the JSON-LD version of Schema.org types into JSON schemas.
- Convert to OpenAPI Definitions: Subsequently, convert the generated JSON schemas into comprehensive OpenAPI definitions.
Progress so far includes the successful creation of JSON schemas for all **[Schema.org](https://schema.org/)** types, with the exception of referring other [schema.org](http://schema.org) types, which is still being worked on.
All the schema.org types get derived from some or the other schema.org type (except Thing) and their properties also refer to other schema.org types for which these keywords included: “super” and “schemaType” respectively to represent but this will be converted into references soon.
Mentors: @MikeRalphson, @sourabhbagrecha, @saialekhya-001 and @kulnor
Project Repo: postman-open-technologies/schema-org-openapi-catalog
Skills: Familiarity with the OpenAPI specification, JSON Schema, and Schema.org Types.
This project can be used in 2 ways:
-
Convert All Schema.org Types: To convert all Schema.org types from the latest version, simply execute the following command in your terminal:
node schemaGenerator All
-
Convert a Specific Schema Type: If you're interested in converting a specific Schema.org type, such as "Book," follow these steps:
-
Upload the complete JSON-LD file for the targeted Schema.org type (e.g., Book) to the "InputFiles" directory.
-
Run the following command:
node schemaGenerator <schema.org type name>
-
After the code execution completes successfully, you'll find the generated JSON schema files in the designated output folders:
- For all types: "OutputFiles" directory
- For a specific type: "SingularOutputFiles" directory
- Referencing:
- Properties refer to other schema.org type and their properties
- schema.org types get derived from other schema.org types
- OpenAPI Conversion: Converting the JSON schemas into OpenAPI definitions.
- schema.org : Release - 22.0 (View release)
- JSON Schema: Draft 2020-12 (View release)