Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.89 KB

File metadata and controls

62 lines (45 loc) · 2.89 KB

Expected knowledge graph — shelf-api-java

Hand-counted ground truth for evaluating Lineage's ingestion of this repo. Not ingested as documentation itself (only Confluence pages are ingested as doc entities) — this is a reference file for whoever is comparing Lineage's actual output against what's really in the code.

Types (25 top-level Java types)

Package Types
controller AuthController, BookController
service AuthService, BookService, EnrichmentClient (interface), EnrichmentResult (record), OpenLibraryEnrichmentClient
repository UserRepository, BookRepository (both interfaces)
model BaseEntity (abstract, @MappedSuperclass), User (@Entity), Book (@Entity)
security JwtUtil, JwtAuthFilter
config WebConfig, PasswordEncoderConfig
exception ApiException, GlobalExceptionHandler
dto SignupRequest, LoginRequest, AuthResponse, UserResponse, BookRequest, BookResponse (all records)
(root) ShelfApiApplication

EXTENDS (in-repo, both ends resolvable)

  • User extends BaseEntity
  • Book extends BaseEntity
  • UserRepository extends JpaRepository / BookRepository extends JpaRepository — target is a framework interface, not a repo node; expect these to show as a modifier/annotation on the repository, not a resolvable in-repo EXTENDS edge.
  • JwtAuthFilter extends OncePerRequestFilter — same caveat, external target.

IMPLEMENTS (in-repo, both ends resolvable)

  • OpenLibraryEnrichmentClient implements EnrichmentClient

Data entities (local DB — H2, via JPA)

User (username, passwordHash) and Book (title, author, coverUrl, description, owner) — both @Entity, both extend BaseEntity. This is the "local DB integration" piece of the test project.

CALLS (method-level, expected within this repo)

  • AuthController → AuthService
  • BookController → BookService
  • AuthService → UserRepository, AuthService → JwtUtil
  • BookService → BookRepository, BookService → UserRepository, BookService → EnrichmentClient
  • JwtAuthFilter → JwtUtil

TESTED_BY

  • BookServiceTestBookService (3 test methods: enrichment succeeds, enrichment fails but book still saves, listBooks scopes to the caller)

Cross-repo (expect as _inferred_edges, not a structural CALLS — no shared import graph)

  • OpenLibraryEnrichmentClientshelf-enrichment-python's POST /api/enrich (matched by URL/route naming, not static analysis)
  • shelf-frontend's authClient/bookClient → this repo's /api/auth/signup, /api/auth/login, GET /api/books, POST /api/books (4 inferred call sites)

Auth / cross-service trust

shelf.jwt.secret (env SHELF_JWT_SECRET) must match shelf-enrichment-python's value exactly — this service issues the token, that one validates it, neither calls the other to check a session.