Skip to content

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

Merged
kentbull merged 11 commits into
WebOfTrust:mainfrom
cardano-foundation:chore/fixCredentialAPispec
May 27, 2026
Merged

fix: openapi spec field ordering, ACDCs and other misc bugs#428
kentbull merged 11 commits into
WebOfTrust:mainfrom
cardano-foundation:chore/fixCredentialAPispec

Conversation

@iFergal

@iFergal iFergal commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

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

codecov Bot commented Mar 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.74%. Comparing base (2566d4c) to head (93f6fb2).
⚠️ 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.73%   87.74%           
=======================================
  Files          26       26           
  Lines        5823     5816    -7     
=======================================
- Hits         5109     5103    -6     
+ Misses        714      713    -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
@kentbull kentbull removed the request for review from lenkan May 26, 2026 22:23
@kentbull kentbull merged commit e50e7ef into WebOfTrust:main May 27, 2026
6 checks passed
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