-
Notifications
You must be signed in to change notification settings - Fork 102
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
Web Api interface generation #586
Web Api interface generation #586
Conversation
…plugin into entity-web-api-generation
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.
Hi @bohdan-harniuk, thank you for your contribution. Could you please rename all the visible text occurrences of Api
to API
, since API is an acronym and should be correctly used. Below you may see couple of places, but would be good to change it on every place that is visible to the user.
Also, can we exclude these API generators for Test/
or probably *Test.php
files, in order to not overload the context menu? I don't see any use case, when we have to create an API for any kind of tests.
Thank you.
<internalFileTemplate name="Magento Web Api XML"/> | ||
<internalFileTemplate name="Web Api Interface"/> |
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.
<internalFileTemplate name="Magento Web Api XML"/> | |
<internalFileTemplate name="Web Api Interface"/> | |
<internalFileTemplate name="Magento Web API XML"/> | |
<internalFileTemplate name="Web API Interface"/> |
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.
Done.
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<text value="Api For Class"/> |
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.
<text value="Api For Class"/> | |
<text value="API For Class"/> |
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.
Done.
Thank you, @eduard13, for the great findings! I've fixed them. |
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.
Thank you for your contribution 👍
Description (*)
This PR adds the generation of a Web API interface for a service.
What was done:
Service to add Web Api interface:
Open the context menu on it and choose Web API interface generation action:
Choose methods to include in the interface, change default name and description:
Results:
Questions or comments
To get generated Doc Annotations beautiful, go to the
Preferences... > Editor > Code Style > PHP > PHPDoc > Blank lines around parameters
and activate this configuration.Contribution checklist (*)