-
Notifications
You must be signed in to change notification settings - Fork 42
auto generate credential types from KERIA OpenAPI spec #337
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
base: main
Are you sure you want to change the base?
auto generate credential types from KERIA OpenAPI spec #337
Conversation
Sotatek-Patrick-Vu
commented
Jul 18, 2025
- In KERIA's credentialing.py endpoints: we started programmatically generating the OpenAPI docs from dataclasses so they are more likely to be maintained and get the added type hints.
- In this PR, we automatically generated credential types from KERIA OpenAPI spec
- This is a first pass - some complex types need more work to be more specific, such as JSON schemas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice addition!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #337 +/- ##
=======================================
Coverage 97.53% 97.53%
=======================================
Files 1 1
Lines 324 324
Branches 24 24
=======================================
Hits 316 316
Misses 8 8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a suggestion on how to avoid the child processes and string matching in the type generation script. Please take a look.
Also, I think we should add linting to "scripts" directory. It's as easy as:
npm i --save-dev globals
Then add
{
files: ['scripts/**/*.js'],
languageOptions: {
globals: globals['node'],
},
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I added a suggestion for the eslint rules. The new changes allows for node.js globals to be used in the library, which we should not allow to ensure that the library can be used in a browser environment.
0d669f7
to
79b336f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not sure whether you want to merge WebOfTrust/keria#373 first, then update the types here?
Thanks @lenkan! I think it's probably best to merge KERIA first yeah, so we can leave this here. Ideally we should do dev tags and update the KERIA in the compose too, though there are a few more PRs to come so maybe it's enough to do it at the very end of all of the PRs. |
@Sotatek-Patrick-Vu and @iFergal now that the KERIA PR has been merged let's get this one ready. I want to approve it as soon as possible and get a new release out. |