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

Add support for collections injection for fromProviderState #73

Open
eranberg opened this issue Aug 21, 2024 · 4 comments
Open

Add support for collections injection for fromProviderState #73

eranberg opened this issue Aug 21, 2024 · 4 comments
Labels
smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog

Comments

@eranberg
Copy link

I am trying to use fromProviderState for gRPC/protobuf to inject data into the request at verification time.
This works great if you are injecting a singular value like String but doesn't work when trying to inject a collection (such as a List of Strings)

This however does work for the REST stack see usage of valueFromProviderState

I'm using a SpringBoot + JUnit5 + PactJVM + Pact protobuf plugin 0.5.1

From Ron:

That will only work for JSON, because JSON is not a well-structured format, and the provider state handler returns JSON so the values can be blindly injected. With Protobufs, that can't blindly work, the values have to transformed to match the Protobuf messages.

Is there a way to enhance the existing fromProviderState implementation to allow injection of collections? (maybe have something like collectionFromProviderState?)

@mefellows mefellows added the smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog label Oct 4, 2024
@mefellows
Copy link
Contributor

Bringing this issue into our sprint review for discussion.

Copy link

github-actions bot commented Oct 4, 2024

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-2576). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

@mefellows
Copy link
Contributor

Just a note that we weren't able to review this in the next sprint. We will review this again in approximately 2 weeks.

@mefellows
Copy link
Contributor

Work has begun on this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog
Projects
None yet
Development

No branches or pull requests

2 participants