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

Facilitate fully dynamic response generation by default in "prism proxy" scenario #2529

Open
pasindufernando1 opened this issue May 9, 2024 · 2 comments

Comments

@pasindufernando1
Copy link

Description

Currently, Prism Proxy lacks support for enabling dynamic mode by default, which necessitates the manual addition of the "Prefer: dynamic=true" header to each request. This approach poses challenges, particularly when integrating the Faker library for API property simulation, and detracts from user experience. Without the header addition the only response that can be generated is something like
image

Proposal

I suggest enhancing Prism Proxy to allow users to run it in default dynamic mode, eliminating the need for manual header assignment. This would significantly improve usability and streamline the integration process.

Proposed Solution

Introduce a command syntax enabling dynamic mode by default:

prism proxy -d <api_def.yaml> http://localhost:8080

Expected Behavior

With dynamic mode enabled by default, users can seamlessly integrate Prism Proxy into their workflows without the overhead of manually configuring headers for each request.

Impact

This enhancement will enhance user experience, particularly for scenarios involving Faker library integration, by simplifying the process and reducing manual effort.

@brendarearden
Copy link
Contributor

This does look like something we should add as a command line option for proxy mode!

Potential Solution:
Move dynamic and json-schema-faker-fillProperties from the mock commands into the shared options. Any tests needed for dynamic mode in proxy, along with documentation updates for new cli command usages.

Copy link

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-536) has been created.

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

No branches or pull requests

2 participants