Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vorto Repository REST API endpoint to request JSON-Schema for Vorto Models #1085

Open
aedelmann opened this issue Sep 25, 2018 · 5 comments
Open

Comments

@aedelmann
Copy link
Contributor

Vorto Repository exposes an REST API for the /models/{id}/content endpoint that accepts the following media types:

  • application/schema-instance+json

  • application/schema+json
    The output creates a JSON schema representation for the request model content.

  • Works for Datatype,FB and Information Model

  • Includes model references, properties, operations and events (status,configuration,events) in one JsonSchema file

Technical Hint:
Use the Eclipse Ditto generator as a basis as help on the JsonSchema generation
Ditto needs to be able to access models from Vorto in DRAFT mode to simplify development

@zubairhamed
Copy link

Will the schema be a ditto-expected schema or a schema in vorto to json serialization?

@aedelmann
Copy link
Contributor Author

Hi @zubairhamed
The json-schema output is not related to Ditto nor does it contain Ditto structures. It is basically a JSON-Schema representation of the Vorto DSL.

@thjaeckle
Copy link
Contributor

Nevertheless Ditto is going to understand that json-schema ..

@e-grigorov
Copy link
Contributor

I guess that this JSON schema can be generated by a Vorto generator. This generator can be called through the generator controller. Is there a real need to do this with /models/{id}/content?

@aedelmann
Copy link
Contributor Author

Hi @e-grigorov
You are absolutely right. This generator exists and can be internally invoked by the Repository to return the json-schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants