-
Notifications
You must be signed in to change notification settings - Fork 91
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 moqu and wiremock module #826
base: main
Are you sure you want to change the base?
Conversation
This is interesting but i don't see any Doc updates explaining what this exactly does? |
Hi @melloware, yeah I need to add documentation ;/ I will try to do it on this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome
cfe368a
to
e09257d
Compare
Could you add your review too? @ricardozanini @hbelmiro @rmanibus @fjtirado There are some things to do yet, but we can do in another step.
|
cc: @chberger |
Do we have an issue explaining the motivations of this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems a huge amount of work, thank you!
I won't micro review it, I'd rather wait for community's feedback and traction. My only concern is about this addition to this ecosystem, a comprehensive documentation and README updates to differentiate between the modules. Can we work on these?
Why can't we have just the three sets of projects:
moqu
-- core
-- deployment
-- runtime
I don't the need to split the extension into yet another parent POM.
This is related to this discussion #575 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some leftovers that requires cleaning before merging.
private static ObjectMapper objectMapper; | ||
|
||
public static ObjectMapper getInstance() { | ||
if (objectMapper == null) { | ||
objectMapper = new ObjectMapper(); | ||
} | ||
return objectMapper; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static ObjectMapper objectMapper; | |
public static ObjectMapper getInstance() { | |
if (objectMapper == null) { | |
objectMapper = new ObjectMapper(); | |
} | |
return objectMapper; | |
} | |
private static final ObjectMapper objectMapper = new ObjectMapper(); | |
public static ObjectMapper getInstance() { | |
return objectMapper; | |
} |
* @param name the name of the HTTP header (e.g., "Accept", "Content-Type"). | ||
* @param value the set of values associated with the header, allowing multiple values (e.g., "application/json", "text/html"). | ||
*/ | ||
public record Header(String name, Set<String> value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public record Header(String name, Set<String> value) { | |
public record Header(String name, List<String> value) { |
Although duplicating string values for a header seems weird, it can actually make sense in some scenarios. Also, header values are an ordered collection, List should be used rather than Set
* @param accept the "Accept" header, which specifies the expected response format. | ||
* @param parameters the list of parameters to be included in the request. | ||
*/ | ||
public record Request(String url, String httpMethod, String exampleName, Header accept, List<Parameter> parameters) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public record Request(String url, String httpMethod, String exampleName, Header accept, List<Parameter> parameters) { | |
public record Request(String url, String httpMethod, String exampleName, Header accept, Collection<Parameter> parameters) { |
Here is the other way around, Paremeters cannot be duplicated in an http request
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
|
||
public class Testing { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is a left over, I guess you want to delete it
Why
This pull request aims to add a new module where we get a OpenAPI Specification and transform it to a Wiremock (this pull request, we can have more after) stubs.
This was created from this Discussion: #575
DevUI
Screen.Recording.2024-11-20.at.13.18.08.mov