Skip to content

refactor(GrlcSpec): delegate to QueryTemplate (nanopub-java 1.89.0)#109

Merged
tkuhn merged 1 commit into
mainfrom
refactor/grlcspec-use-querytemplate
May 24, 2026
Merged

refactor(GrlcSpec): delegate to QueryTemplate (nanopub-java 1.89.0)#109
tkuhn merged 1 commit into
mainfrom
refactor/grlcspec-use-querytemplate

Conversation

@tkuhn
Copy link
Copy Markdown
Contributor

@tkuhn tkuhn commented May 24, 2026

Summary

  • Bump org.nanopub:nanopub to 1.89.0 (replacing the temporary Jitpack snapshot pin) so we can pick up the new QueryTemplate API.
  • Refactor GrlcSpec to wrap QueryTemplate: assertion walking, SPARQL parsing, placeholder extraction and query expansion all move upstream. GrlcSpec keeps only the Nanopub-Query-specific concerns — request-URL parsing, the nanopub fetch cache, the _nanopub_trig parameter, api-version=latest resolution, canonical endpoint rewriting to NANOPUB_QUERY_URL/repo/, and the legacy getSpec() YAML rendering for /grlc-spec/.
  • Remove the local vocabulary/KPXL_GRLC class; kpxl_grlc:endpoint and kpxl_grlc:sparql are now owned by QueryTemplate.

Net effect: ~190 lines removed for ~100 added, no behavioral change intended. Static placeholder helpers on GrlcSpec still exist and forward to QueryTemplate so callers like OpenApiSpecPage keep compiling.

Test plan

  • mvn verify passes.
  • Smoke-check a grlc API request (/api/RA…/{name}.rq) returns the expected expanded SPARQL.
  • /grlc-spec/ page still renders the expected YAML (title/description/contact/licence/queries for the index, and #+ summary / #+ endpoint for an individual query).
  • _nanopub_trig inline-nanopub parameter still works.
  • api-version=latest still resolves to the latest version via the meta repo.

🤖 Generated with Claude Code

…nanopub-java 1.89.0

Bumps nanopub-java to 1.89.0 (which ships QueryTemplate) and reworks
GrlcSpec to wrap it. Statement-walking over the assertion, SPARQL
parsing, placeholder extraction and query expansion now live upstream;
GrlcSpec keeps only the request-URL parsing, nanopub fetch cache,
_nanopub_trig handling, api-version=latest resolution, canonical
endpoint rewriting to NANOPUB_QUERY_URL/repo/, and the legacy
getSpec() YAML rendering. The local KPXL_GRLC vocabulary class is
removed; those IRIs are owned by QueryTemplate now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tkuhn tkuhn merged commit 4493eb0 into main May 24, 2026
8 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.14.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant