[Feature Request]: Create a Lexicon Generator
@MasterJ93 is already working on this.
Since Jul 26, 2024.
Assessment
This issue has not been assessed yet.
Description
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:
- Create and validate the lexicon in a JSON format.
- Take all of the AT Protocol-provided and Bluesky-provided lexicons and convert them into validated Swift models and methods.
- Give proper syntax and clean code for each model and method, which would also conform to the ATProtoKit API Design Guidelines and the Swift API Design Guidelines.
There will be some limitations:
- Some lexicons in Bluesky and AT Protocol are built into some places and will be treated differently. For example, all of the lexicons related to creating and managing sessions must be in
ATProtocolConfiguration, andcom.atproto.repo.uploadBlobis required to be inAPIClientService. - The first version may not implement any lexicons that have the
subscriptionvalue, 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.
- Dominant language
- Swift
- Stars
- 226
- Forks
- 40
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MasterJ93/ATProtoKit
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MasterJ93/ATProtoKit#354 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MasterJ93/ATProtoKit#352 ·
-
[Feature Enhancement]: Add `sort` parameter to `getQuotes`Possibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MasterJ93/ATProtoKit#346 · 1 comment ·
-
[Feature Request]: Add `app.bsky.actor.contentVisibilityDeclaration` record supportPossibly taken A pull request linked to this issue is open or already merged. Opennew feature
Difficulty 3/5 1-2 days Newbie friendliness 68/100
MasterJ93/ATProtoKit#350 · 4 comments ·
-
[Feature Enhancement]: Support scoped mutes (`onlyReposts` / `onlyQuoteposts`) in `muteActor`Possibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
MasterJ93/ATProtoKit#348 · 1 comment ·
All issues in MasterJ93/ATProtoKit
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue help wanted testing
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area:cli documentation good first issue priority:low
Difficulty 1/5 Under an hour Newbie friendliness 94/100
isaaclins/freesnitch#430 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day