Skip to content

enable v5 api#26

Merged
wistefan merged 20 commits into
mainfrom
ticket-39/work
May 26, 2026
Merged

enable v5 api#26
wistefan merged 20 commits into
mainfrom
ticket-39/work

Conversation

@wistefan
Copy link
Copy Markdown
Collaborator

@wistefan wistefan commented May 13, 2026

Implemented the EBSI Trusted Issuers Registry v5 API alongside the existing v4 implementation. The v5 API introduces a resource-oriented design with attributes and revisions as sub-resources, cursor-based string pagination (max 50), and new credential metadata fields.

Key changes:

  • New OpenAPI v5 spec (api/trusted-issuers-registry-v5.yaml) with Maven code generation configured
  • Backward-compatible DB migration adding issuer_type, tao, root_tao nullable columns to credential table
  • TIRv5Mapper and TrustedIssuerRegistryV5Controller implementing all 6 endpoints
  • Fixed v4 TIRMapper to return stored issuerType/tao/rootTao values instead of hardcoding UNDEFINED
  • 47 new v5 tests covering all endpoints with parameterized validation
  • All 147 tests pass (68 TIL + 17 TIR v4 + 47 TIR v5 + 15 filter), zero regressions

general-agent-1 and others added 16 commits May 13, 2026 06:07
Adds CLAUDE.md with codebase context for AI agents and
IMPLEMENTATION_PLAN.md with 5-step plan to implement the EBSI Trusted
Issuers Registry v5 API alongside the existing v4 implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-39/plan into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/1
Reviewed-by: wistefan <wistefan@dev-env.local>
Create the OpenAPI 3.0.3 specification for the EBSI Trusted Issuers
Registry v5 API with all 6 endpoints (list/get issuers, list/get
attributes, list/get revisions) and add a tir-v5 execution block to
the Maven OpenAPI Generator plugin configuration.

Key design decisions:
- OpenAPI 3.0.3 for compatibility with micronaut-openapi-codegen 4.5.0
- page[after] as string (not integer like v4) for flexible cursors
- Max page size 50 (vs 100 in v4) per EBSI v5 spec
- getIssuerV5 returns Object to support both IssuerLatest and
  IssuerDeprecated response formats based on version query param
- Generated packages: org.fiware.iam.tir.v5.{api,model}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused IssuerLatest and IssuerDeprecated schemas from OpenAPI spec
- Use inline type: object with descriptive documentation for polymorphic
  getIssuerV5 response instead of unreferenced schema definitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and configure Maven code generation' (#2) from ticket-39/step-1 into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/2
Reviewed-by: wistefan <wistefan@dev-env.local>
Add Liquibase migration (changelog-v0_0_5.xml) with three new nullable
columns on the credential table: issuer_type (default 'Undefined'), tao,
and root_tao. Update the Credential JPA entity with corresponding
@nullable fields. These fields support TIR v5 attribute responses while
remaining backward-compatible with v4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…chema changes and update entity classes' (#3) from ticket-39/step-2 into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/3
Reviewed-by: wistefan <wistefan@dev-env.local>
Implement TIRv5Mapper (MapStruct) with Base64 body encoding, SHA-256
hex-encoded attribute IDs, and issuerType/tao/rootTao field mapping.

Implement TrustedIssuerRegistryV5Controller with:
- GET /v5/issuers (paginated list, max page size 50)
- GET /v5/issuers/{did} (latest: link-based, deprecated: inline attrs)
- GET /v5/issuers/{did}/attributes (paginated, in-memory)
- GET /v5/issuers/{did}/attributes/{attributeId} (by SHA-256 hex hash)
- GET /v5/issuers/{did}/attributes/{attributeId}/revisions (single rev)
- GET /v5/issuers/{did}/attributes/{attributeId}/revisions/{revisionId}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ontroller for all endpoints' (#4) from ticket-39/step-3 into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/4
Reviewed-by: wistefan <wistefan@dev-env.local>
Implements Tirv5ApiTestSpec with 47 tests covering all 6 v5 endpoints:
- List issuers: pagination, empty list, invalid page sizes
- Get issuer: latest/deprecated versions, hasAttributes flag, DID validation
- List attributes: SHA-256 IDs, pagination, empty credentials
- Get attribute: details, hash verification, non-existent cases
- List/get revisions: single revision behavior, 404 cases
- Cross-endpoint: attribute ID consistency, full navigation chain,
  v4/v5 shared visibility, distinct attribute IDs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…r endpoints' (#5) from ticket-39/step-4 into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/5
Reviewed-by: wistefan <wistefan@dev-env.local>
The v4 TIRMapper was hardcoding issuerType to UNDEFINED instead of using
the stored value from the Credential entity. Refactored the mapping chain
to go directly from Credential to IssuerAttributeVO, preserving the
issuerType, tao, and rootTao fields. Also removed an unused ArrayList
import from the v5 controller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…backward compatibility' (#6) from ticket-39/step-5 into ticket-39/work

Reviewed-on: http://localhost:3001/general-agent-1/trusted-issuers-list/pulls/6
Reviewed-by: wistefan <wistefan@dev-env.local>
@wistefan wistefan added the minor Should be applied for new functionality or bigger updates. label May 13, 2026
@wistefan wistefan requested a review from Mortega5 May 13, 2026 10:47
Comment thread src/main/resources/db/migration/v0/changelog-v0_0_5.xml
@wistefan wistefan merged commit 3d133f7 into main May 26, 2026
8 checks passed
@wistefan wistefan deleted the ticket-39/work branch May 26, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Should be applied for new functionality or bigger updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants