Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: aggregated provider states #734

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Nov 14, 2024

Provide an endpoint to retrieve provider states to aid discoverability.

Initial work performed in https://github.com/pact-foundation/pact_broker/tree/feat/aggregated-provider-states by @bethesque

Allowed methods: GET

Path: /pacts/provider/{provider}/provider-states

This resource returns a aggregated de-duplicated list of all provider states for a given provider.

Provider states are collected from the latest pact on the main branch for any dependant consumers.

Example response

{
    "providerStates": [
        {
            "name": "an error occurs retrieving an alligator"
        },
        {
            "name": "there is an alligator named Mary"
        },
        {
            "name": "there is not an alligator named Mary"
        }
    ]
}

@YOU54F YOU54F changed the title Feat/aggregated provider states 2 feat: aggregated provider states Nov 14, 2024
@YOU54F YOU54F force-pushed the feat/aggregated-provider-states-2 branch from 2e7e257 to 96f1328 Compare November 14, 2024 23:40
@YOU54F YOU54F marked this pull request as ready for review November 15, 2024 17:17
@mefellows mefellows added the smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear label Jan 29, 2025
@YOU54F YOU54F force-pushed the feat/aggregated-provider-states-2 branch from c0ddd9b to 8b6bfe7 Compare February 13, 2025 09:40
# Provider States - Aggregated view by provider

Allowed methods: `GET`

Path: `/pacts/provider/{provider}/provider-states`

This resource returns a aggregated de-duplicated list of all provider states for a given provider.

Provider states are collected from the latest pact on the main branch for any dependant consumers.

Example response

```json
{
    "providerStates": [
        {
            "name": "an error occurs retrieving an alligator"
        },
        {
            "name": "there is an alligator named Mary"
        },
        {
            "name": "there is not an alligator named Mary"
        }
    ]
}
```
@YOU54F YOU54F force-pushed the feat/aggregated-provider-states-2 branch from 8b6bfe7 to a607703 Compare February 13, 2025 09:44
@pahnin pahnin merged commit 108d11a into master Feb 13, 2025
9 checks passed
@pahnin pahnin deleted the feat/aggregated-provider-states-2 branch February 13, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants