how we can mock apis through wiremock in springboo...
# help
e
how we can mock apis through wiremock in springboot but not for writting test cases, i just want to create request and response in springboot then i want to call this apis from my local machine?
l
You can run wiremock standalone (jar or docker) which might be what you are looking for. Docs for that can be found here - https://wiremock.org/docs/standalone/ I also setup an example repo with wiremock running in docker here - https://github.com/leeturner/wiremock-standalone-docker-example
e
actually i want to run my wiremock in aws lambda service, for that i need to add its dependency in pom.xml, which seems not possible doing with standalone jar, i am using standalone jar only but because of this issue, i want to switch to springboot.
@Lee Turner
l
OK, I am not sure I understand what you are looking for. You want to run wiremock in aws lambda and connect to it from a springboot service ?
e
i want to run my wiremock in aws lamdba, how can i run standalone jar there?
l
Ah, sorry, I don’t have any experience running wiremock in lambda. According to this page it would seem running in headless mode might be the way to go - https://wiremock.org/docs/running-without-http-server/
e
do u have any doc for how we can mock apis through wiremock in springboot but not for writting test cases, i just want to create request and response in springboot then i want to call this apis from my local machine?
l
I don’t know of any documentation. I guess you could access the wiremock admin endpoints to load the stub mappings from a spring boot service. You can find details of the admin interface here - https://wiremock.org/docs/standalone/admin-api-reference/