Skip to content

feat(contract): add shared REST and Pixel metadata - #3219

Open
neelneelneel wants to merge 2 commits into
devfrom
feat-cleanup-api
Open

neelneelneel wants to merge 2 commits into
devfrom
feat-cleanup-api

Conversation

@neelneelneel

Copy link
Copy Markdown
Contributor

Description

Make backend declarations the source of truth for REST and Pixel descriptions, inputs, outputs, and SDK inclusion policies.

Changes Made

  • Add shared annotations and immutable contract types under prerna.contract.
  • Support inline response fields, records, collections, maps, enums, unions, recursive references, and generic root types.
  • Preserve optionality, nullability, wire names, HTTP statuses, and Pixel invocation conventions.
  • Add ignore, internal, and deprecation policies with diagnostics for incomplete or contradictory metadata.
  • Introduce AbstractReactor2, which derives input keys, required flags, descriptions, and Help/MCP schemas from class annotations.
  • Convert StopPixelExecutionReactor to the new base while preserving its execution logic.
  • Add focused tests and a backend contract development guide.

How to Test

  1. With JDK 21, run mvn -Dlicense.skip=true compile.
  2. Run mvn -Dtest=ContractReaderUnitTests,AbstractReactor2UnitTests test.
  3. Verify coverage for deterministic reads, policy handling, complex wire types, REST bindings, and derived reactor metadata.
  4. Confirm cancellation requires an id and retains its string output contract.

Notes

  • Production compilation and all 25 focused tests passed.
  • Standard Maven test compilation encountered an existing missing AskStringModelEngineResponse.fromJson method. The development guide documents the isolated compilation workflow used to run the focused tests.
  • Existing reactors can continue using AbstractReactor.
  • The contract model is language-neutral; SDK generation is implemented separately in semoss-ui.

Add contract annotations, immutable wire types, and deterministic readers.
Introduce AbstractReactor2 to derive input keys and metadata from annotations.
Convert StopPixelExecutionReactor as the first example and document usage.
@neelneelneel
neelneelneel requested a review from a team as a code owner October 27, 2026 23:10
@snyk-io

snyk-io Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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