Skip to content

Add config option to not create crud folders. #70

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

Merged
merged 2 commits into from
May 11, 2022

Conversation

bramr94
Copy link

@bramr94 bramr94 commented May 10, 2022

This pull requests adds a crud_folders option to the api-postman.php config. This allows the user to select whether they want the crud folders (index, store, show, update and destroy) in there postman collection or not.

@tomirons
Copy link
Collaborator

@bramr94 can you explain to me when a user would want to exclude these?

@bramr94
Copy link
Author

bramr94 commented May 11, 2022

@tomirons I personally think it is unnecessary to have a bunch of folders with only one request in it. For me it is clear enough that a post request calls the store function and a put request calls the update function.

It just looks cleaner, the current way collections are generated:

Screenshot 2022-05-11 at 08 49 06

Versus the collection without crud folders:

Screenshot 2022-05-11 at 08 49 14

But it is all up to preference I guess, that is why I added a config option so people can decide for themselves.

@andreaselia
Copy link
Owner

Ah, I see. I'm happy with that, thanks for your contribution @bramr94.

@tomirons are you also happy?

@tomirons
Copy link
Collaborator

@bramr94 thank you for the explanation. I like this idea as well, nice work!

@tomirons tomirons merged commit 1f7dc84 into andreaselia:master May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants