Skip to content

Augment Get-IshPublicationOutputContent with protocol OpenApiWithOpenIdConnect implementation #269

Description

@ddemeyer

Summary...
Get-IshPublicationOutputContent (see #126) currently only implements WcfSoapWithWsTrust/WcfSoapWithOpenIdConnect calling Baseline25.ExpandBaseline and Baseline25.CompleteBaselineByCandidateAndMode. Modernize the cmdlet by adding an OpenApiWithOpenIdConnect implementation next to it, following the switch (IshSession.Protocol) sample in AddIshFolder.cs.

The existing cmdlet and its IshObjectGroup parameter set, including -AutoCompleteMode, -Language and -Resolution, remain exactly the same, so this is backward compatible. It is only an internal change to enable an extra backend. The output objects (IshDocumentObj via IshObjects/IshMetadataField) remain the same; users of the ISHRemote library should not see a difference and get no breaking change.

Actions...

Phase 3 - REST parity for plain expand (no -AutoCompleteMode)

  • Adapt GetIshPublicationOutputContent.cs to branch on IshSession.Protocol and call the OpenAPI equivalent of Baseline25.ExpandBaseline (POST /v3/Baselines/{Id}/Report/Expand in OpenApiISH30.json) when Protocol == OpenApiWithOpenIdConnect
  • Map IshFields/IshRequestedMetadataField silent metadata fetch (publication output + output format) to their OpenAPI equivalents (OpenApiISH30Client.GetPublicationOutputByLanguageCardIdAsync or similar, and the output format metadata call)
  • Convert the OpenAPI (json) baseline report response into the same allLngRefs/reportitem walking logic used today for the SOAP xml report
  • Reuse the existing OpenAPI DocumentObj25-equivalent batch hydrate call (see Augment Get-IshDocumentObj with protocol OpenApiWithOpenIdConnect implementation #229) for the final IshDocumentObj retrieval, or add the OpenAPI variant if Augment Get-IshDocumentObj with protocol OpenApiWithOpenIdConnect implementation #229 is not yet merged

Phase 4 - REST parity for -AutoCompleteMode

Once both phases have a working OpenAPI call, human approved:

  • Extend GetIshPublicationOutputContent.Tests.ps1 with comparison tests, dynamically switching $ishSession.Protocol between WcfSoapWithOpenIdConnect and OpenApiWithOpenIdConnect and back, to exercise both the SOAP and REST/OpenAPI backend with a shallow result compare

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions