Requirements? #5
Replies: 4 comments 1 reply
-
@jamesrusso Hey! Alright, sounds good! First of, you can contribute as much as you want! It would be good to create a small discussion post or perhaps an issue beforehand to avoid any possible duplicate or unnecessary work if you pick/choose something you want to implement! SchemasIt would be helpful if you could provide some example schemas you are actually using (in the best case sorted from simple to complex). a) Would be great if you could create failing tests for the schemas, similar to what is existing inside PRsDo you want to look over PRs and possibly have me asking questions? I might merge some directly, but will probably wait for your feedback for other PRs. |
Beta Was this translation helpful? Give feedback.
-
@jamesrusso Let me know how the current 1.0.0 release works for you 🤞 Please close this of if everything is fine. |
Beta Was this translation helpful? Give feedback.
-
So, I am back to looking at this after some time away from this project. So, I was able to export my schema as multiple files (one file per type), but I am looking to keep those relationships on the typescript side. Here is an example:
This references two other schemas ./policyholder.json and ./person.json. I'd like to generate the entire schema and have a Person typebox and a PolicyHolder typebox and not just reference their fields in the EligiblityRequest typebox, not recreate all the fields. So, not this:
|
Beta Was this translation helpful? Give feedback.
-
So, thinking more about this I guess I really don't need the full relationships represented in Typebox. The exploded types will work fine on the TS side and still provide type safety. I do miss the ENUMS (vs literals). Some of my methods update status of objects where the status is an ENUM. I'm having to change these to strings and while the type safety is still the same, I think that having it use a TS enum would have some benefits. |
Beta Was this translation helpful? Give feedback.
-
Good Evening,
I'd be happy to share with you my initial through for this project, which is likely common to many others. Often times, we are writing application in various languages (python + typescript) and we are sending data across the wire between these two systems and we would to have the same models on both ends for type checking, etc.
Right now I'm using pydantic on the python side and typebox on the typescript side. It works great, but I need to make sure these models are kept in sync.
The ideal situation would be to generate a JSON Schema as source of truth and then be able to generate the typebox models. Right now, I've written the pydantic models, exported those models to a schema ready to go. I don't think we need to cover all the formats out of the gate. Right now, my only requirements are dates and uuid formats.
Happy to continue the discussion here or elsewhere and happy to jump in and help contribute. Tell me what you need.
Beta Was this translation helpful? Give feedback.
All reactions