otomi-core
otomi-core copied to clipboard
Single data model across core, api, console
WHY
Currently there are two data models defined in:
- otomi-core/values-schema.yaml
- otomi-api/openapi/**
They are slightly different and that force us to maintain logic to transform one model to another.
Maintaining two schemas proved to be cumbersome because it slows down development and causes a lot of runtime errors, where users cannot save data due to incompatibility with model defined in the values-schema.yaml
file.
The objective of this user story is to maintain a single JSON schema.
User Story
AS Adeveloper I WANT TO to manage data model (JSON schema(s)) in one project SOI do not need to update models in every project
Acceptance criteria
GIVEN JSON schema definiiton(s) in otomi-core WHEN I change it THENdevelopers can use the new schema version in otomi-api and otomi-console
Functional requirements
- [ ] values migrations supported
- [ ] validation in otomi-api for each endpoint based to schema chunk
- [ ] validation in otomi-core for each endpoint based to schema
- [ ] schema should be versioned
Non-functional requirements:
- [ ] the development process across many project should be smooth. Ideally sharing schemas should not require heave release process during the development.
Definition of done
- [ ] A document that presents at least two proposals with impact analysis. (risk|effort|dev process analysis)