Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Conversation

@pjhartzell
Copy link
Contributor

@pjhartzell pjhartzell commented Feb 4, 2025

Summary:

This PR follows the proposal for asynchronous opportunity search in this PR branch on the stapi-spec repo by @jkeifer to:

  • Make synchronous opportunity search (wait for the http response containing opportunities) optional on each product. A product supports synchronous opportunity search only if it has an opportunity search callable as an attribute.
  • Make asynchronous opportunity search (you'll need to check back in a different http request to see if opportunities have been generated yet) optional at the root router level. Support is determined by the presence of certain callables as attributes on the root router and advertising an asynchronous opportunities conformance class. If the root router supports asynchronous opportunity search, all products must support it. If asynchronous opportunity search is supported, POST requests to the /products/{productId}/opportunities endpoint will default to asynchronous opportunity search unless synchronous search is also supported by the product and a Prefer header in the POST request is set to wait.

Note:

  • This PR does not add support for updating or accessing asynchronous opportunity search statuses on asynchronous opportunity search records via the API, i.e., it does not add the /searches/opportunities/{searchRecordId}/statuses endpoint for POST and GET requests. Implementations are responsible for modifying statuses. Note that you can always view the current status contained within an asynchronous opportunity search record via the API with a GET to the /searches/opportunities/{searchRecordId} endpoint.

Related Issue(s):

Proposed Changes:

  1. Makes opportunity searching optional
  2. Adds optional asynchronous opportunity searching

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@pjhartzell pjhartzell force-pushed the pjh/asynchronous-opportunity-search branch from fd17110 to 37bda4b Compare February 4, 2025 23:55
@pjhartzell pjhartzell requested a review from philvarner February 7, 2025 02:40
@pjhartzell pjhartzell marked this pull request as ready for review February 7, 2025 02:41
@pjhartzell pjhartzell merged commit 78ac040 into stapi-spec:main Feb 10, 2025
3 checks passed
@pjhartzell pjhartzell deleted the pjh/asynchronous-opportunity-search branch February 10, 2025 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants