Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Add JSON schema support for validation and relationships decoration #54

Open
mnugter opened this issue Jun 1, 2019 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@mnugter
Copy link
Collaborator

mnugter commented Jun 1, 2019

  1. Define a superset for JSON schema which adds cardinality support in #ref tags.
  2. Create a factory method to create the relationship decorator from a JSON schema
  3. Add Resource decorator for validating data when setting the data property.

Create this as a separate package. The package should introduce a helper method that accepts a JSON schema and initializes the relationship and validator decorators on the Resource.

@mnugter mnugter added this to the 1.2 milestone Jun 1, 2019
@mnugter mnugter removed this from the 1.2 milestone Jul 18, 2019
@mnugter mnugter added the enhancement New feature or request label Jul 18, 2019
@mnugter
Copy link
Collaborator Author

mnugter commented Jul 31, 2019

As a JSON schema is a description of a single resource adding support via the repository seems logical.

Relationships:

  • Somehow add the ability to register a JSON schema on repository level (use a decorator that adds this feature)
  • Then add a Resource decorator to read the relationships from JSON schema you can get via the repository manager

Validation:

  • Find a good validation library and add a decorator that validates the data on setting the data property.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant