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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
# 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 2e7e257 to 96f1328 Compare November 14, 2024 23:40
@YOU54F YOU54F marked this pull request as ready for review November 15, 2024 17:17
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