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

Create a "dotnet new" project template for mockaco files #64

Open
natenho opened this issue Jan 31, 2021 · 3 comments
Open

Create a "dotnet new" project template for mockaco files #64

natenho opened this issue Jan 31, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@natenho
Copy link
Owner

natenho commented Jan 31, 2021

Is your feature request related to a problem? Please describe.
It would be useful to provide a command line that help creating a new mock file, specially when using as a dotnet tool, but it can also be useful in other cases.

Describe the solution you'd like

$ dotnet new mockaco-template
method: GET
route: /somepath/hello

Successfully created get_somepath_hello.json.

It could also have some other templates like:

$ dotnet new mockaco-callback-template
method: GET
route: /somepath/trigger
callback url: /response/callback
callback method: POST

Successfully created get_somepath_trigger.json.

Describe alternatives you've considered

$ mockaco new hello --method GET --route /somepath/hello
@natenho natenho added the enhancement New feature or request label Jan 31, 2021
@tkrafael
Copy link

@natenho you can create a mockaco template, publish to nuget.org and use dotnet new mockaco-template

@natenho
Copy link
Owner Author

natenho commented Feb 27, 2021

@tkrafael The dotnet tool already exists, you can install it by running dotnet tool install -g mockaco, and it allows to run a full mockaco environment in the specified folder. Refer to #56 for more details! 😃

https://www.nuget.org/packages/Mockaco/

It uses a random port by default, but you can pass any .net core compatible arguments, like the examples bellow:

mockaco --urls "http://localhost:5000"

This issue was created to include a "new" command to allow fast mock creation in a given folder.

@natenho
Copy link
Owner Author

natenho commented Jun 10, 2021

@tkrafael I've just read your suggestion again and now I see!!

You were referring to project templates https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates

That's actually an awesome idea. I'll change the issue to do that. Thank you!

@natenho natenho changed the title Add "new mock" command line option to create a new mock file Create a dotnet new mockaco-file project template Jun 10, 2021
@natenho natenho changed the title Create a dotnet new mockaco-file project template Create a "dotnet new" project template for mockaco files Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants