Skip to content

fix: openapi spec field ordering, ACDCs and other misc bugs#428

Open
iFergal wants to merge 10 commits intoWebOfTrust:mainfrom
cardano-foundation:chore/fixCredentialAPispec
Open

fix: openapi spec field ordering, ACDCs and other misc bugs#428
iFergal wants to merge 10 commits intoWebOfTrust:mainfrom
cardano-foundation:chore/fixCredentialAPispec

Conversation

@iFergal
Copy link
Copy Markdown
Collaborator

@iFergal iFergal commented Mar 27, 2026

The conversion from fielddom to dataclass of ACDC was missing overrides for edges and rules which are always expanded when returned from the API. When compacted variants come in, can be updated to a union with a string but this is more straight forward right now.

ancatc is actually always a list of size 1.

Also fixed field orderings that were lost when fields were optional, or inserted via alts from fielddom conversion. Now top-level ACDC fields keep their order in the OpenAPI spec.

--

Edit: Also realised:

  • Registry state was incorrect. Easier to create a new dataclass than use RegStateRecord from keripy as that isn't as specific on enums etc.
  • Member ends format was wrong (nested another level further)

@iFergal iFergal self-assigned this Mar 27, 2026
@iFergal iFergal requested review from kentbull and lenkan March 27, 2026 17:24
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.74%. Comparing base (9e24615) to head (cb40152).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/keria/utils/openapi.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #428   +/-   ##
=======================================
  Coverage   87.74%   87.74%           
=======================================
  Files          26       26           
  Lines        5808     5801    -7     
=======================================
- Hits         5096     5090    -6     
+ Misses        712      711    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kentbull
Copy link
Copy Markdown
Collaborator

Please rebase.

@iFergal iFergal changed the title fix: correctly generate openapi def for credentials (maintain field orderings and uncompact edges) fix: openapi spec field ordering, ACDCs and other misc bugs Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants