[Feature Request]: Create a Lexicon Generator #31
Labels
draft
This issue is simply a draft and should not be considered until it's complete
new feature
New feature or request
Summary
Create a solution for not only creating lexicons, but also converting them into Swift models and methods.
Pain points
At this time, all lexicon models and methods need to be written by hand. This can cause issues with missing out features, duplicating code, making mistakes, and sloppy implementations. Creating a lexicon generator would solve all of these problems.
The idea is to create an app and CLI tool that will do the following:
There will be some limitations:
ATProtocolConfiguration
, andcom.atproto.repo.uploadBlob
is required to be inAPIClientService
.subscription
value, due to their special nature and still-highly-moldable structure of the models and methods.The app and CLI tool will simply allow you to insert the lexicon JSON files, as well as an optional configuration file of adding extra information (such as comments). The app will specifically show common errors among any JSON errors when creating or viewing a lexicon file (not available in version 1.0).
Considered Alternatives
N/A
Is this a breaking change?
No
Library Examples
The repo
swift-atproto
has a good understanding of what could be done in terms of the lexicon generator. However, using it as-is isn't ideal: a better one would need to be made that better fits with the design goals of ATProtoKit.Additional Context
This will most likely be in another repository, so progress will be followed over there instead of here. When it's completed its goals, this issue will close.
The text was updated successfully, but these errors were encountered: