You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2017/03/14 02:34:41 UTC

[jira] [Commented] (AMBARI-20436) Create a prototype of ambari-server swagger integration

    [ https://issues.apache.org/jira/browse/AMBARI-20436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923445#comment-15923445 ] 

Hadoop QA commented on AMBARI-20436:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12858607/AMBARI-20436.patch
  against trunk revision .

    {color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/11015//console

This message is automatically generated.

> Create a prototype of ambari-server swagger integration
> -------------------------------------------------------
>
>                 Key: AMBARI-20436
>                 URL: https://issues.apache.org/jira/browse/AMBARI-20436
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server, ambari-web
>    Affects Versions: 3.0.0
>            Reporter: Jaimin Jetly
>            Assignee: Jaimin Jetly
>             Fix For: 3.0.0
>
>         Attachments: AMBARI-20436.patch
>
>
> As part of this task, following changes are done:
> # A separate branch is created for this work: ambari-rest-api-explorer
> # Users, Groups and Views API are integrated with swagger and exposed from ambari rest api explorer ui (swagger ui) on a deployed cluster at path: http://c6404.ambari.apache.org:8080/api-docs
> # swagger-maven-plugin is used to generate swagger.json file on compile time. This file is published in web resources directory. Note that this file is generated build time and will be available on deployed ambari-server host at web resources location but it is not yet decided to be committed and maintained in Ambari source code
> # swagger2markup-maven-plugin is used to generate asciidoc from swagger.json file (that can be shown as markdown in github). More information about this format an be found at http://asciidoc.org/ and http://asciidoctor.org/. This generates files in docs/api/asciidoc/** location at build time. This directory is currently intended to be committed and maintained in ambari source code
> # swagger-ui (version: v2.1.1-M2) compiled code with the different css skin (adopted from [link|https://github.com/jensoleg/swagger-ui]) is committed to ambari-web/api-docs directory with certain modification to make it work with ambari api. Further ui polishing will be done in subsequent tasks. Also there is a strong possibility to maintain the fork code of swagger-ui and compile (minify and concanate) it during ambari compile time rather than directly using swagger-ui dist files. Doing so will help when customization done over swagger-ui will increase
> # swagger-annotation expects application to define schema of request body and response for each endpoint to be encapsulated in a class. While Ambari follows this pattern for some of the endpoint, there are many others which does not do so. For The ones which do not does so, new request and response classes were defined. Going forward at the completion of this epic, either each resource type or each resource provider should be coupled with a resource response class and a resource request class. As part of this patch, each resourceprovider worked upon introduces a new method "getResponse". At completion of this epic ResourceProvider interface should also declare methods like "getResponse" and "getRequest" that returns response schema and request schema instances for the resource API endpoints
> #  Currently it seems that swagger has a limitation in supporting  "subresource locator methods". This issue is been reported to swagger community and is being tracked at [link|https://github.com/swagger-api/swagger-core/issues/2136] . As a result of which currently as a temporary workaround, all subresources are converted to root resources. Also all root resources on similar path are moved under same subpackages.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)