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

AMBARI-23201 Integrate ViewService with Swagger #701

Merged
merged 8 commits into from Mar 29, 2018

Conversation

g-boros
Copy link
Contributor

@g-boros g-boros commented Mar 19, 2018

What changes were proposed in this pull request?

Add swagger documentation to View API endpoints

How was this patch tested?

Generate swagger docs by

test -Drat.skip -Dcheckstyle.skip -DskipTests -Dgenerate.swagger.resources

then manually checking Swagger output at ambari-server/docs/api/generated/index.html

checkstyle using:

clean checkstyle:checkstyle -pl ambari-server

API endpoint calls at api/v1/alert_targets have also been tested manually

please review @Jetly-Jaimin @adoroszlai @benyoka

Gabor Boros added 6 commits March 13, 2018 18:05
ViewService and ViewVersionService

Change-Id: I47ed9ed0b0a34bd8983515ea84f27ab5062d2515
Change-Id: I0ac606f654369f0528e18f301f8a57a7711b8497
Change-Id: I72f9cb032dbd0c49d4e48cf4042d71d89514e4fc
…vice

Change-Id: I1518f9cd61649377ba996fcd0392f901339aecfb
Change-Id: I3aaf78d827476c17ab38a7156c88263b34ca6f46
Change-Id: I9cb3df78f9f56d569d0f8f2a34cfa4da9c113ae6
@asfgit
Copy link

asfgit commented Mar 19, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1236/
Test PASSed.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Naming of property constants is not consistent. In some classes qualified properties (.../...) have plain names (eg. VIEW_NAME = VIEW_INSTANCE_INFO + PropertyHelper.EXTERNAL_PATH_SEP + VIEW_NAME_PROPERTY_ID), while in others they have complex names (eg. VIEW_VERSION_INFO_VIEW_NAME_PROPERTY_ID = VIEW_VERSION_INFO + PropertyHelper.EXTERNAL_PATH_SEP + VIEW_NAME_PROPERTY_ID). I'm fine with either type, but would be nice if we could keep/make them consistent.



/**
* The key property ids for a view resource.
*/
private static Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID)
.build();
.put(Resource.Type.View, VIEW_NAME )
Copy link
Contributor

Choose a reason for hiding this comment

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

Odd whitespace

Gabor Boros added 2 commits March 19, 2018 18:18
Change-Id: I8409da0214d88609550cf1d3bc302c2f389837c8
…stent across all affected files

Change-Id: Ief645a3bb8267499164756efb94bf2018d05cc8d
@g-boros
Copy link
Contributor Author

g-boros commented Mar 20, 2018

fixed property constant naming in 3516b29

All plain names are called like XX_PROPERTY_ID if value is "XX", like:

public static final String ICON_PATH_PROPERTY_ID = "icon_path";

Qualified properties use short name, like:

public static final String ICON_PATH = VIEW_INSTANCE_INFO + PropertyHelper.EXTERNAL_PATH_SEP + ICON_PATH_PROPERTY_ID;

@adoroszlai, @benyoka please have a look for review, thanks

@asfgit
Copy link

asfgit commented Mar 21, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1278/
Test FAILed.
Test FAILured.

@benyoka benyoka merged commit 4727a74 into apache:trunk Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants