Skip to content

feat(annotations): add dependency-free JSON:API role metadata for domain mapping - #24

Merged
kazemek merged 1 commit into
mainfrom
feat/phase-1-2-annotations
Jul 30, 2026
Merged

kazemek merged 1 commit into
mainfrom
feat/phase-1-2-annotations

Conversation

@kazemek

@kazemek kazemek commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Ship jsonapi-java-annotations so domain types can declare resource/id/attribute/relationship roles without Jackson or core, and guard the boundary with ArchUnit as the project-wide coupling check.

Summary by CodeRabbit

  • New Features

    • Added JSON:API annotations for resources, identifiers, attributes, and relationships.
    • Added support for optional attribute and relationship name overrides.
    • Added a dedicated annotations module with usage documentation and examples.
  • Documentation

    • Updated project status, structure, conformance guidance, and architectural documentation.
    • Marked the domain-mapping annotations milestone as complete.
  • Tests

    • Added coverage for annotation metadata, usage on records and POJOs, inheritance behavior, and architectural dependency rules.

…ain mapping

Ship jsonapi-java-annotations so domain types can declare resource/id/attribute/relationship roles without Jackson or core, and guard the boundary with ArchUnit as the project-wide coupling check.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e99c7b9-401c-4fec-84a1-091d201b3303

📥 Commits

Reviewing files that changed from the base of the PR and between efd56d8 and 82c104c.

📒 Files selected for processing (22)
  • .agentWork/milestones/README.md
  • .agentWork/milestones/phase-1-2-annotations.md
  • AGENTS.md
  • README.md
  • docs/adr/010-architectural-tests.md
  • docs/conformance.md
  • jsonapi-java-annotations/README.md
  • jsonapi-java-annotations/build.gradle.kts
  • jsonapi-java-annotations/src/main/java/io/github/kazemek/jsonapi/annotation/JsonApiAttribute.java
  • jsonapi-java-annotations/src/main/java/io/github/kazemek/jsonapi/annotation/JsonApiId.java
  • jsonapi-java-annotations/src/main/java/io/github/kazemek/jsonapi/annotation/JsonApiRelationship.java
  • jsonapi-java-annotations/src/main/java/io/github/kazemek/jsonapi/annotation/JsonApiResource.java
  • jsonapi-java-annotations/src/main/java/io/github/kazemek/jsonapi/annotation/package-info.java
  • jsonapi-java-annotations/src/test/groovy/io/github/kazemek/jsonapi/annotation/AnnotationMetaContractSpec.groovy
  • jsonapi-java-annotations/src/test/groovy/io/github/kazemek/jsonapi/annotation/AnnotationUsageFixtureSpec.groovy
  • jsonapi-java-annotations/src/test/groovy/io/github/kazemek/jsonapi/annotation/architecture/AnnotationDependencyRulesSpec.groovy
  • jsonapi-java-annotations/src/test/java/io/github/kazemek/jsonapi/annotation/fixtures/AnnotatedArticleRecord.java
  • jsonapi-java-annotations/src/test/java/io/github/kazemek/jsonapi/annotation/fixtures/AnnotatedPersonPojo.java
  • jsonapi-java-annotations/src/test/java/io/github/kazemek/jsonapi/annotation/fixtures/ResourceBase.java
  • jsonapi-java-annotations/src/test/java/io/github/kazemek/jsonapi/annotation/fixtures/ResourceChild.java
  • jsonapi-java-core/README.md
  • settings.gradle.kts

📝 Walkthrough

Walkthrough

Adds the jsonapi-java-annotations module with four runtime JSON:API annotations, reflection and ArchUnit tests, Gradle integration, and documentation updates marking Phase 1.2 complete.

Changes

JSON:API annotations module

Layer / File(s) Summary
Annotation metadata contracts
jsonapi-java-annotations/src/main/java/...
Adds JsonApiResource, JsonApiId, JsonApiAttribute, and JsonApiRelationship with runtime retention, documented targets, naming elements, and package-level @NullMarked.
Module wiring and dependency rules
settings.gradle.kts, jsonapi-java-annotations/build.gradle.kts, docs/adr/010-architectural-tests.md, AGENTS.md, jsonapi-java-core/README.md, jsonapi-java-annotations/src/test/.../architecture/*
Registers and builds the module with ArchUnit test support, while documenting and testing per-module dependency allowlists.
Reflection contracts and usage validation
jsonapi-java-annotations/src/test/java/.../fixtures/*, jsonapi-java-annotations/src/test/groovy/.../*Spec.groovy
Tests annotation metadata, record and POJO usage, naming overrides, property targets, and non-inheritance of JsonApiResource.
Documentation and milestone completion
.agentWork/milestones/*, README.md, docs/conformance.md, jsonapi-java-annotations/README.md
Documents module scope and non-goals, records Phase 1.2 support, and marks its acceptance criteria complete.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the new dependency-free annotations module for JSON:API role metadata and domain mapping.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/phase-1-2-annotations

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@kazemek

kazemek commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kazemek
kazemek merged commit f96e24d into main Jul 30, 2026
3 checks passed
@kazemek
kazemek deleted the feat/phase-1-2-annotations branch July 30, 2026 19:26
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.

1 participant