Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-292 234b99b3c -> 0da9716cb


NIFI-292:
- Adding additional comments about a few endponts.
- Removing required flag because it is not handled correctly in swagger.
- Comments.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/0da9716c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/0da9716c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/0da9716c

Branch: refs/heads/NIFI-292
Commit: 0da9716cb1fa379e4572e2f9afb77bf81e862f10
Parents: 234b99b
Author: Matt Gilman <[email protected]>
Authored: Fri May 1 10:47:51 2015 -0400
Committer: Matt Gilman <[email protected]>
Committed: Fri May 1 10:47:51 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/web/api/ControllerResource.java     | 8 ++++++++
 .../java/org/apache/nifi/web/api/ProcessGroupResource.java   | 6 +++++-
 .../java/org/apache/nifi/web/api/ProvenanceResource.java     | 8 ++++++++
 .../nifi-web-api/src/main/resources/templates/example.hbs    | 2 +-
 .../nifi-web-api/src/main/resources/templates/index.html.hbs | 4 ++++
 .../nifi-web-api/src/main/resources/templates/operation.hbs  | 8 --------
 6 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
index 82d66f9..1fc293b 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
@@ -452,6 +452,14 @@ public class ControllerResource extends 
ApplicationResource {
     @PreAuthorize("hasAnyRole('ROLE_MONITOR', 'ROLE_DFM', 'ROLE_ADMIN')")
     @ApiOperation(
             value = "Gets the current revision of this NiFi",
+            notes = "NiFi employs an optimistic locking strategy where the 
client must include a revision in their request when "
+                    + "performing an update. If the specified revision does 
not match the current base revision a 409 status code "
+                    + "is returned. The revision is comprised of a clientId 
and a version number. The version is a simple integer "
+                    + "value that is incremented with each change. Including 
the most recent version tells NiFi that your working "
+                    + "with the most recent flow. In addition to the version 
the client who is performing the updates is recorded. "
+                    + "This allows the same client to submit multiple requests 
without having to wait for the previously ones to "
+                    + "return. Invoking this endpoint will return the current 
base revision. It is also available when retrieving "
+                    + "a process group and in the response of all mutable 
requests.",
             response = Entity.class,
             authorizations = {
                 @Authorization(value = "Read Only", type = "ROLE_MONITOR"),

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
index 5f5a437..e178714 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
@@ -282,6 +282,9 @@ public class ProcessGroupResource extends 
ApplicationResource {
     @PreAuthorize("hasAnyRole('ROLE_MONITOR', 'ROLE_DFM', 'ROLE_ADMIN')")
     @ApiOperation(
             value = "Gets a process group",
+            notes = "Gets a process group and includes all components 
contained in this group. The verbose and recursive flags can be used to adjust "
+                    + "the default behavior. This endpoint is starting point 
for obtaining the current flow and consequently includes the current "
+                    + "flow revision.",
             response = ProcessGroupEntity.class,
             authorizations = {
                 @Authorization(value = "Read Only", type = "ROLE_MONITOR"),
@@ -306,7 +309,8 @@ public class ProcessGroupResource extends 
ApplicationResource {
             @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) 
ClientIdParameter clientId,
             @ApiParam(
                     value = "Whether the response should contain all 
encapsulated components or just the immediate children.",
-                    required = false
+                    required = false,
+                    allowableValues = "true, false"
             )
             @QueryParam("recursive") @DefaultValue(RECURSIVE) Boolean 
recursive,
             @ApiParam(

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java
index e60e930..afa404d 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java
@@ -572,6 +572,10 @@ public class ProvenanceResource extends 
ApplicationResource {
     @PreAuthorize("hasRole('ROLE_PROVENANCE')")
     @ApiOperation(
             value = "Submits a provenance query",
+            notes = "Provenance queries may be long running so this endpoint 
submits a request. The response will include the "
+                    + "current state of the query. If the request is not 
completed the URI in the response can be used at a "
+                    + "later time to get the updated state of the query. Once 
the query has completed the provenance request "
+                    + "should be deleted by the client who originally 
submitted it.",
             response = ProvenanceEntity.class,
             authorizations = {
                 @Authorization(value = "Provenance", type = "ROLE_PROVENANCE")
@@ -1019,6 +1023,10 @@ public class ProvenanceResource extends 
ApplicationResource {
     @PreAuthorize("hasRole('ROLE_PROVENANCE')")
     @ApiOperation(
             value = "Submits a lineage query",
+            notes = "Lineage queries may be long running so this endpoint 
submits a request. The response will include the "
+                    + "current state of the query. If the request is not 
completed the URI in the response can be used at a "
+                    + "later time to get the updated state of the query. Once 
the query has completed the lineage request "
+                    + "should be deleted by the client who originally 
submitted it.",
             response = LineageEntity.class,
             authorizations = {
                 @Authorization(value = "Provenance", type = "ROLE_PROVENANCE")

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/example.hbs
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/example.hbs
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/example.hbs
index a84281e..26a4283 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/example.hbs
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/example.hbs
@@ -11,7 +11,7 @@
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
---}}
+--}}{{!-- formatting here matters... in whitespace: pre. this is not 
comprehensive but sufficent for our examples --}}
 {{#each properties}}    {{#ifeq type "string"}}"{{@key}}": 
"value"{{/ifeq}}{{#ifeq type "boolean"}}"{{@key}}": true{{/ifeq}}{{#ifeq type 
"integer"}}"{{@key}}": 0{{/ifeq}}{{#ifeq type "number"}}"{{@key}}": 
0.0{{/ifeq}}{{#if $ref}}"{{@key}}": <span class="nested collapsed"><span 
class="nested-id hidden">{{basename $ref}}</span><span 
class="nested-example"><span 
class="open-object">&#123;&#8230;&#125;</span></span></span>{{/if}}{{#ifeq type 
"array"}}"{{@key}}": [{{#if items.$ref}}<span class="nested collapsed"><span 
class="nested-id hidden">{{basename items.$ref}}</span><span 
class="nested-example"><span 
class="open-object">&#123;&#8230;&#125;</span></span></span>{{else}}"value"{{/if}}]{{/ifeq}}{{#ifeq
 type "object"}}"{{@key}}": <span class="open-object">&#123;
         "name": {{#if additionalProperties.$ref}}<span class="nested 
collapsed"><span class="nested-id hidden">{{basename 
additionalProperties.$ref}}</span><span class="nested-example"><span 
class="open-object">&#123;&#8230;&#125;</span></span></span>{{else}}{{#ifeq 
additionalProperties.type "integer"}}0{{else}}"value"{{/ifeq}}{{/if}}
     &#125;</span>{{/ifeq}}<span class="comma">,</span>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
index c3775cc..9973c10 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
@@ -27,6 +27,10 @@
         <style>
             @import 
"https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";
 
+            html {
+                overflow-y: scroll;
+            }
+            
             html, html a {
                 -webkit-font-smoothing: antialiased;
                 text-shadow: 1px 1px 1px rgba(0,0,0,0.004);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0da9716c/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/operation.hbs
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/operation.hbs
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/operation.hbs
index 8c626bb..5fb25e7 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/operation.hbs
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/operation.hbs
@@ -30,7 +30,6 @@
             <tr>
                 <th>Name</th>
                 <th>Location</th>
-                <th>Required</th>
                 <th>Type</th>
                 <th>Description</th>
             </tr>
@@ -41,13 +40,6 @@
         <tr>
             <td>{{#ifeq in "body"}}{{else}}{{name}}{{/ifeq}}</td>
             <td>{{in}}</td>
-            <td>
-                {{#ifeq in "body"}}
-                    yes
-                {{else}}
-                    {{#if required}}yes{{else}}no{{/if}}
-                {{/ifeq}}
-            </td>
             {{#ifeq in "body"}}
                 <td>
                 {{#ifeq schema.type "array"}}Array[<a class="type-link" 
href="javascript:void(0);">{{basename schema.items.$ref}}</a>]{{/ifeq}}

Reply via email to