Skip to content

refactor types, produce json schema from types#34

Merged
zsimjee merged 4 commits intomainfrom
schemas
Jun 7, 2023
Merged

refactor types, produce json schema from types#34
zsimjee merged 4 commits intomainfrom
schemas

Conversation

@CalebCourier
Copy link
Contributor

@CalebCourier CalebCourier commented Jun 6, 2023

Pull Request Type

  • Feature
  • Bug Fix

Link to Notion Task or Github Issue

https://www.notion.so/tinystacks/Widget-Create-Update-Improvements-a54c945ccf634d9b9b06cec0fb382487

Summary of Feature

  1. Refactors types to isolate widget configuration properties from unrelated dependency types.
  2. Use typescript-json-schema to generate json schema from typescript types.

Other details

Since we are often union-ing types to extend our ops-model concepts like Widget and Provider, the default json schemas produced from these use schema composition rather than merging. We can force it to merge down the schemas using a special flag, but even if we do this with our own types we need to be cognizant of being able to handle any valid JSON schema in any tools/code where we consume them.

@CalebCourier CalebCourier marked this pull request as ready for review June 6, 2023 17:25
@CalebCourier CalebCourier requested a review from a team June 6, 2023 17:25
@zsimjee zsimjee merged commit 570f3a6 into main Jun 7, 2023
@zsimjee zsimjee deleted the schemas branch June 7, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants