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

Generate types code between TS and C# #21

Closed
tjcouch-sil opened this issue Feb 8, 2023 · 2 comments
Closed

Generate types code between TS and C# #21

tjcouch-sil opened this issue Feb 8, 2023 · 2 comments
Assignees

Comments

@tjcouch-sil
Copy link
Member

tjcouch-sil commented Feb 8, 2023

Figure out a good way to generate type code for different data types that are carried across the PAPI interface and used in C# and in JS

@irahopkinson
Copy link
Contributor

irahopkinson commented Feb 26, 2023

I looked back at what we had done in SF to refresh my memory. SF used to have a code generator which was removed here. This is the commit before it was removed. Jason Naylor wrote this as a C# console app using NjsonSchema code generator. It took quite a while to write. It generated .generated.ts model and config files from C# source model objects. It was removed because you often had to update its config when you ran it after an SF model change. This could be more complicated and harder to understand how to do than simply changing the model in both .ts and .cs. The model doesn't change that often and when it does the changes aren't that big. It was easier to just change the models directly, than maintain a code generator.

@irahopkinson irahopkinson self-assigned this Feb 28, 2023
@irahopkinson
Copy link
Contributor

We will leave this for now until there is a real felt need.

irahopkinson added a commit that referenced this issue Jul 2, 2024
6618a9acc refactor: adjusted file structure for extension descriptions (#22)
91edebb69 refactor: adjusted file structure for extension descriptions
7ecd681de update `@sillsdev/scripture` (#21)
b1bcc265b feat: added displayData.json file for localization (#20)
a06d5926f docs: updated README regarding displayData
e617913f4 feat: added displayData.json file for localization
d73ba0094 Bump braces from 3.0.2 to 3.0.3 (#19)
2e4d5bfa2 Added find and replace description to manual add extension explanation (#18)
0b85f2d44 Added find and replace description to manual add extension explanation

git-subtree-dir: extensions
git-subtree-split: 6618a9acc4f26e17ac1398d0f8191f468111068e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants