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

Spike: can we use JSON Schema instead of LDL? #699

Closed
bajtos opened this issue Nov 3, 2017 · 3 comments
Closed

Spike: can we use JSON Schema instead of LDL? #699

bajtos opened this issue Nov 3, 2017 · 3 comments
Labels

Comments

@bajtos
Copy link
Member

bajtos commented Nov 3, 2017

We would like to move away from our own DSL for defining models and preferably use an industry standard like JSON Schema instead.

In order to do so, we need to find if JSON Schema provides enough parity with other schemas like:

  • Protocol Buffers for gRPC transport
  • SQL for persisting our models
  • anything else?
@dhmlau
Copy link
Member

dhmlau commented Apr 10, 2018

non-DP3 because we will still be using the legacy juggler.

@bajtos
Copy link
Member Author

bajtos commented Jul 2, 2018

Cross-posting @raymondfeng's #118 (comment) as it may be relevant:

However, @raymondfeng, our architect, has a different opinion. IIRC, he is proposing a slightly different implementation, where LoopBack internally uses some custom format, and then allows 3rd party plugins to provide converters from from different DSLs into this internal LoopBack format. In other words, JSON Schema would become only one of the supported ways how to define models. @raymondfeng could you please confirm whether I described your ideas correctly?

There are JSON-schema like languages to define models:

  • Swagger 2.0 definitions
  • OpenAPI 3.0 schemas
  • JSON Schema
  • GraphQL schema
  • LoopBack 3.x DSL

The JSON-schema itself can only be used define the typing perspective of models. LoopBack often requires additional metadata, such as mapping to database schemas and JSON serialization on the wire.

@bajtos
Copy link
Member Author

bajtos commented Jul 30, 2018

Closing as rejected based on my comment above.

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

No branches or pull requests

2 participants