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

[REQ] New generator to produce Wiremock Mappings files from input API Spec #19948

Open
scevallos opened this issue Oct 22, 2024 · 0 comments
Open

Comments

@scevallos
Copy link
Contributor

scevallos commented Oct 22, 2024

Is your feature request related to a problem? Please describe.

When using Wiremock to stub dependencies, we often have to do the repetitive task of declaring stub endpoints, values, etc. This makes sense when those stubs will be used in a specific test or scenario that requires explicit expectations to be setup.

In some scenarios, we simply want to run a service locally and point to wiremock stubs, without the need to declare specific values, as long as the dependency's API specification is still met.

Describe the solution you'd like

it would be nice to be able to add a new generator to the OpenAPI generator that allows a user to specify a dependency's API specification and generate a set of mapping configuration files. These files can be passed into Wiremock so that stub servers can be setup that match the API spec provided and dummy responses can be generated that comply with the schema specified in the spec.

Describe alternatives you've considered

The Wiremock Cloud offering appears to provide this functionality, but it's not free and requires it be done via their cloud service.

It would be nice to provide this functionality locally so that generation can happen without the need to be connected to the internet.

This project already has kotlin-wiremock and java-wiremock generators which generate code that is used to setup the wiremock stubs; this feature would be an extension of that capability, which would allow users to setup the stubs via config files instead of programmatically.

I've considered using these generators, but would prefer a language agnostic solution. Since the config files are written in JSON, this would make such a generator more generically useful.

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

1 participant