docs(solution-architect): ISSUE-84 fix -- correct fictional NewSolutionElementRequestBody/initialStatus docstrings - #338
Merged
Conversation
…onElementRequestBody/initialStatus docstrings create_solution_blueprint/create_solution_component (async+sync, 4 docstrings total) documented a NewSolutionElementRequestBody body class with an initialStatus field as the way to set Draft status at creation. That class and field appear in zero .http ground-truth files anywhere in this repo -- never a real Egeria API surface, not merely unmodeled -- so following the documented shape either hard-failed client-side validation (create_solution_blueprint, class literal mismatch) or silently dropped the field and created the element ACTIVE regardless of intent (create_solution_component, NewElementRequestBody's extra='ignore'). Also found and fixed while walking these: create_solution_blueprint's first example body carried leftover userDefinedStatus/lifecycleStatus fields with a missing comma, invalid JSON even as a copy-paste example. Fix: all four docstrings now document contentStatus inside properties instead -- confirmed against Egeria-api-solution-architect.http's own updateSolutionBlueprintStatus example, and content_status is already a real field on ReferenceableProperties, the base class both SolutionBlueprintProperties and SolutionComponentProperties derive from. No model change needed; NewElementRequestBody.properties is a bare dict so contentStatus already passes through untouched. Verified locally: the old shape still fails validation as expected, the corrected shape validates cleanly with contentStatus preserved through to serialized JSON. Not live-verified against a real Egeria server (no access from this environment) -- reported by dwolfson-1b/trellis via ISSUE-84, who has live access to confirm contentStatus=DRAFT actually takes effect server-side at creation time. Full detail in PYEGERIA_ISSUES.md ISSUE-84. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #337 (closed — that one was opened from
dwolfson:main, which drags in unrelated fork history and conflicted withPYEGERIA_ISSUES.mdedits already merged upstream via #335/#336). Same fix, now on a clean branch off currentupstream/main.SolutionArchitect.create_solution_blueprint/create_solution_component(async + sync, 4 docstrings total) documented aNewSolutionElementRequestBodybody class with a top-levelinitialStatusfield as the way to set Draft status at creation. Confirmed that class and field appear in zero.httpground-truth files anywhere in this repo — never a real Egeria API surface, not merely an unmodeled one.Following the documented shape either:
create_solution_blueprint—classliteral mismatch, raisingPyegeriaInvalidParameterExceptionthat reads exactly like a server-side rejection), orcreate_solution_component— its example already used the realNewElementRequestBodyclass, soPyegeriaModel'sextra='ignore'swallowedinitialStatuswith no error at all).Also found and fixed while walking these:
create_solution_blueprint's first ("no lifecycle") example body carried leftoveruserDefinedStatus/lifecycleStatusfields with a missing comma — invalid JSON even as a copy-paste example.Fix: all four docstrings now document
contentStatusinsidepropertiesinstead — confirmed againstEgeria-api-solution-architect.http's ownupdateSolutionBlueprintStatusexample, andcontent_statusis already a real field onReferenceableProperties, the base class bothSolutionBlueprintPropertiesandSolutionComponentPropertiesderive from. No model change needed —NewElementRequestBody.propertiesis a baredict, socontentStatusalready passes through untouched to the outgoing JSON.Found via a live consumer report — trellis/Resource Explorer's
BlueprintMaterializer(docs/blueprint-materialization-plan.mdPhase A), tracked asegeria-pythonISSUE-84 inPYEGERIA_ISSUES.md.Testing
Verified locally (no live Egeria server access from this environment): the original repro's
TypeAdapter(NewElementRequestBody).validate_python(...)call with the old shape still fails as expected; the corrected shape ({"class": "NewElementRequestBody", "properties": {..., "contentStatus": "DRAFT"}}) validates cleanly withcontentStatuspreserved through to the serialized JSON. Fulltests/micro-tests/suite passes clean (exit 0), no regressions.Not live-verified against a real Egeria server — the original reporter (trellis/Resource Explorer) has live access and is best placed to confirm
contentStatus: "DRAFT"at creation actually takes effect server-side before switchingBlueprintMaterializeroff its current ACTIVE-only workaround.🤖 Generated with Claude Code