[
https://issues.apache.org/jira/browse/NIFI-4328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189772#comment-16189772
]
ASF GitHub Bot commented on NIFI-4328:
--------------------------------------
GitHub user mcgilman opened a pull request:
https://github.com/apache/nifi/pull/2191
NIFI-4328: Upgrade Swagger
NIFI-4328:
- Upgrading swagger and the corresponding maven plugin to address issues
discovered in recursive domain models.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mcgilman/nifi NIFI-4328
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/2191.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2191
----
commit 697c382d9bd4a3aaa05bc28b64a5e74592101c61
Author: Matt Gilman <[email protected]>
Date: 2017-09-28T15:02:27Z
NIFI-4328:
- Upgrading swagger and the corresponding maven plugin to address issues
discovered in recursive domain models.
----
> Invalid swagger.json generated from
> ControllerServiceReferencingComponentDTO#referencingCompoents
> -------------------------------------------------------------------------------------------------
>
> Key: NIFI-4328
> URL: https://issues.apache.org/jira/browse/NIFI-4328
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Michael Werle
> Assignee: Matt Gilman
>
> The referencingComponents field in
> {{nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerServiceReferencingComponentDTO.java}}
> field generates the following lines in swagger.json:
> {code:javascript}
> "ControllerServiceReferencingComponentDTO" : {
> "properties" : {
> //... (omitted for brevity)
> "referencingComponents" : {
> "description" : "If the referencing component represents a
> controller service, these are the components that reference it.",
> "$ref" : "#/definitions/Set"
> }
> }
> }
> {code}
> Which causes this invalid object definition:
> {code:javascript}
> "Set" : {
> "properties" : {
> "empty" : {
> "type" : "boolean",
> "default" : false
> }
> }
> }
> {code}
> It is not clear how to fix the annotation, but the generated swagger.json
> should be:
> {code:javascript}
> "ControllerServiceReferencingComponentDTO" : {
> "properties" : {
> //... (omitted for brevity)
> "referencingComponents" : {
> "type" : "array",
> "description" : "If the referencing component represents a
> controller service, these are the components that reference it.",
> "uniqueItems" : true,
> "items" : {
> "$ref" :
> "#/definitions/ControllerServiceReferencingComponentEntity"
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)