Replies: 1 comment 4 replies
-
|
I'm totally down to do something like this, just trying to think through the best design. Since we're using pydantic we can easily export the models to a json schema / openapi. Talking to chatgpt, I think it'd be easy enough to layer on some metadata to my api classes/methods and then introspect that and generate openapi specs for the endpoints. With both of those it'd be easy enough to export a spec for the whole thing, but I'm not sure what that gives you on the typescript side. Can you use swagger to generate a typescript client and models? I'm not sure about having a separate library for the models - I'm not opposed but I'm not sure how useful it'd be on its own, since the endpoints are just as/more important than the models. Thinking through this more, there is a translation layer than I'm not sure how we'd handle. Things like creating the Workout model are kind of gross and couldn't be put into a spec. Thoughts on that part? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How open would the community here be to something like the following:
Using Claude, I've cross-created this codebase and am validating it in my underlying implementation but curious if others have appetite for this or whether I just keep this internal to my codebase.
My thought (and Claude agreed with me FWIW :) ) is that perhaps as CR's are pushed into this
otf-apilibrary, I could monitor for the changes and agentic-ly ingest them to the ts library (and model where necessary). I would run tests and if they pass auto-ingest and commit; otherwise it would require a manual review.Longer-term we could have otf-api-model be the shared source of truth but I'm just looking to make my app stack a bit cleaner to manage and having typescript front-and-center is a big part of that.
Beta Was this translation helpful? Give feedback.
All reactions