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

Entity web api generation #607

Merged

Conversation

bohdan-harniuk
Copy link
Collaborator

@bohdan-harniuk bohdan-harniuk commented Jun 23, 2021

Description (*)
What was done:

  1. added search results interface/implementation/preference if checked generation with web API
  2. added test cases for generation search results interface/implementation/preference
  3. added menu sort order by default
  4. fixed few bugs to get fully working CRUD for the generated entity through REST API

Screenshot 2021-06-22 at 15 23 43

Screenshot 2021-06-21 at 22 39 30

Screenshot 2021-06-21 at 22 39 40

Screenshot 2021-06-21 at 22 39 49

Screenshot 2021-06-22 at 15 59 48

Screenshot 2021-06-22 at 16 01 32

Screenshot 2021-06-22 at 16 01 58

Screenshot 2021-06-22 at 16 02 24

Screenshot 2021-06-22 at 16 03 20

Screenshot 2021-06-22 at 16 03 59

Screenshot 2021-06-22 at 16 05 13

Screenshot 2021-06-22 at 16 06 04

Screenshot 2021-06-22 at 16 06 33

Screenshot 2021-06-22 at 16 08 21

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@bohdan-harniuk bohdan-harniuk force-pushed the entity-web-api-generation branch from 3f89410 to f636b1e Compare June 23, 2021 09:55
Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, could you please check my minor suggestion below?
Thank you.

@@ -19,7 +19,7 @@
public static final String WEB_API_METHOD_NAME = "execute";
private static final String DIRECTORY = "Command";
private static final String WEB_API_INTERFACE_NAME_PATTERN = "Delete%entityName%ByIdInterface";
private static final String WEB_API_URL_PATTERN = "%entityName%/delete-by-id";
private static final String WEB_API_URL_PATTERN = "%entityName%/delete-by-id/:entityId";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it simpler like /V1/employee/:entityId, since we specify the DELETE method, there is no reason have additional info in route.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll fix that in a moment!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eduard13, I have done that:
Screenshot 2021-06-24 at 16 54 20

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great 👍

@eduard13 eduard13 merged commit 608a819 into magento:4.0.0-develop Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants