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

ASF GitHub Bot commented on NIFI-2899:
--------------------------------------

Github user alopresto commented on the issue:

    https://github.com/apache/nifi/pull/1135
  
    I ran a full build of NiFi and everything was fine. I then used 
`swagger-codegen` to build a Java client. Looks like it was successful (see 
below). 
    
    +1, merging. 
    
    ```
    hw12203:/Users/alopresto/Workspace/scratch (master) alopresto
    🔓 2s @ 17:10:34 $ mkcd pr1135
    hw12203:/Users/alopresto/Workspace/scratch/pr1135 (master) alopresto
    🔓 13s @ 17:10:48 $ swagger-codegen generate -i 
/Users/alopresto/Workspace/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
 -l java
    [main] INFO io.swagger.parser.Swagger20Parser - reading from 
/Users/alopresto/Workspace/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
    [main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No 
.swagger-codegen-ignore file found.
    [main] INFO io.swagger.codegen.DefaultGenerator - Model Set not imported 
due to import mapping
    [main] INFO io.swagger.codegen.AbstractGenerator - writing file 
/Users/alopresto/Workspace/scratch/pr1135/./src/main/java/io/swagger/client/model/AboutDTO.java
    
    ...496 lines...
    
    [main] INFO io.swagger.codegen.AbstractGenerator - writing file 
/Users/alopresto/Workspace/scratch/pr1135/./LICENSE
    hw12203:/Users/alopresto/Workspace/scratch/pr1135 (master) alopresto
    🔓 215s @ 17:14:24 $ ll
    total 208
    drwxr-xr-x   18 alopresto  staff   612B Oct 13 17:14 ./
    drwxr-xr-x   52 alopresto  staff   1.7K Oct 13 17:10 ../
    -rw-r--r--    1 alopresto  staff   291B Oct 13 17:14 .gitignore
    -rw-r--r--    1 alopresto  staff   1.0K Oct 13 17:14 .swagger-codegen-ignore
    -rw-r--r--    1 alopresto  staff   904B Oct 13 17:14 .travis.yml
    -rw-r--r--    1 alopresto  staff    11K Oct 13 17:14 LICENSE
    -rw-r--r--    1 alopresto  staff    38K Oct 13 17:14 README.md
    -rw-r--r--    1 alopresto  staff   2.7K Oct 13 17:14 build.gradle
    -rw-r--r--    1 alopresto  staff   782B Oct 13 17:14 build.sbt
    drwxr-xr-x  223 alopresto  staff   7.4K Oct 13 17:14 docs/
    -rw-r--r--    1 alopresto  staff   1.6K Oct 13 17:14 git_push.sh
    drwxr-xr-x    3 alopresto  staff   102B Oct 13 17:14 gradle/
    -rw-r--r--    1 alopresto  staff    50B Oct 13 17:14 gradle.properties
    -rw-r--r--    1 alopresto  staff   4.9K Oct 13 17:14 gradlew
    -rw-r--r--    1 alopresto  staff   2.3K Oct 13 17:14 gradlew.bat
    -rw-r--r--    1 alopresto  staff   4.6K Oct 13 17:14 pom.xml
    -rw-r--r--    1 alopresto  staff    40B Oct 13 17:14 settings.gradle
    drwxr-xr-x    4 alopresto  staff   136B Oct 13 17:14 src/
    hw12203:/Users/alopresto/Workspace/scratch/pr1135 (master) alopresto
    🔓 6s @ 17:14:31 $ tl src
    src
    ├── [ 136]  main/
    │   ├── [ 130]  AndroidManifest.xml
    │   └── [ 102]  java/
    │       └── [ 102]  io/
    │           └── [ 102]  swagger/
    │               └── [ 510]  client/
    │                   ├── [2.8K]  ApiCallback.java
    │                   ├── [ 45K]  ApiClient.java
    │                   ├── [3.5K]  ApiException.java
    │                   ├── [2.4K]  ApiResponse.java
    │                   ├── [2.1K]  Configuration.java
    │                   ├── [7.2K]  JSON.java
    │                   ├── [2.1K]  Pair.java
    │                   ├── [3.1K]  ProgressRequestBody.java
    │                   ├── [3.1K]  ProgressResponseBody.java
    │                   ├── [2.6K]  StringUtil.java
    │                   ├── [ 918]  api/
    │                   │   ├── [ 33K]  AccessApi.java
    │                   │   ├── [ 19K]  ConnectionsApi.java
    │                   │   ├── [ 47K]  ControllerApi.java
    │                   │   ├── [ 46K]  ControllerservicesApi.java
    │                   │   ├── [ 13K]  CountersApi.java
    │                   │   ├── [ 45K]  DatatransferApi.java
    │                   │   ├── [182K]  FlowApi.java
    │                   │   ├── [ 48K]  FlowfilequeuesApi.java
    │                   │   ├── [ 18K]  FunnelApi.java
    │                   │   ├── [ 18K]  InputportsApi.java
    │                   │   ├── [ 18K]  LabelsApi.java
    │                   │   ├── [ 18K]  OutputportsApi.java
    │                   │   ├── [ 31K]  PoliciesApi.java
    │                   │   ├── [133K]  ProcessgroupsApi.java
    │                   │   ├── [ 35K]  ProcessorsApi.java
    │                   │   ├── [ 40K]  ProvenanceApi.java
    │                   │   ├── [ 23K]  ProvenanceeventsApi.java
    │                   │   ├── [ 32K]  RemoteprocessgroupsApi.java
    │                   │   ├── [ 34K]  ReportingtasksApi.java
    │                   │   ├── [6.7K]  ResourcesApi.java
    │                   │   ├── [ 11K]  SitetositeApi.java
    │                   │   ├── [ 17K]  SnippetsApi.java
    │                   │   ├── [7.9K]  SystemdiagnosticsApi.java
    │                   │   ├── [ 12K]  TemplatesApi.java
    │                   │   └── [ 60K]  TenantsApi.java
    │                   ├── [ 238]  auth/
    │                   │   ├── [2.7K]  ApiKeyAuth.java
    │                   │   ├── [1.7K]  Authentication.java
    │                   │   ├── [2.2K]  HttpBasicAuth.java
    │                   │   ├── [1.9K]  OAuth.java
    │                   │   └── [1.4K]  OAuthFlow.java
    │                   └── [6.6K]  model/
    │                       ├── [5.2K]  AboutDTO.java
    ...195 lines...
    │                       └── [3.8K]  UsersEntity.java
    └── [ 102]  test/
        └── [ 102]  java/
            └── [ 102]  io/
                └── [ 102]  swagger/
                    └── [ 102]  client/
                        └── [ 918]  api/
                            ├── [4.9K]  AccessApiTest.java
                            ├── [2.8K]  ConnectionsApiTest.java
                            ├── [5.1K]  ControllerApiTest.java
                            ├── [5.1K]  ControllerservicesApiTest.java
                            ├── [2.6K]  CountersApiTest.java
                            ├── [4.8K]  DatatransferApiTest.java
                            ├── [ 17K]  FlowApiTest.java
                            ├── [5.1K]  FlowfilequeuesApiTest.java
                            ├── [2.7K]  FunnelApiTest.java
                            ├── [2.7K]  InputportsApiTest.java
                            ├── [2.7K]  LabelsApiTest.java
                            ├── [2.7K]  OutputportsApiTest.java
                            ├── [4.3K]  PoliciesApiTest.java
                            ├── [ 12K]  ProcessgroupsApiTest.java
                            ├── [4.0K]  ProcessorsApiTest.java
                            ├── [5.0K]  ProvenanceApiTest.java
                            ├── [3.3K]  ProvenanceeventsApiTest.java
                            ├── [4.1K]  RemoteprocessgroupsApiTest.java
                            ├── [4.0K]  ReportingtasksApiTest.java
                            ├── [2.0K]  ResourcesApiTest.java
                            ├── [2.4K]  SitetositeApiTest.java
                            ├── [2.8K]  SnippetsApiTest.java
                            ├── [2.1K]  SystemdiagnosticsApiTest.java
                            ├── [2.3K]  TemplatesApiTest.java
                            └── [6.4K]  TenantsApiTest.java
    
    14 directories, 262 files
    hw12203:/Users/alopresto/Workspace/scratch/pr1135 (master) alopresto
    🔓 14s @ 17:14:46 $
    ```


> Update swagger-maven-plugin to 3.0.1 to have a spec-compliant swagger.json
> --------------------------------------------------------------------------
>
>                 Key: NIFI-2899
>                 URL: https://issues.apache.org/jira/browse/NIFI-2899
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Documentation & Website
>    Affects Versions: 1.0.0
>            Reporter: Stephane Maarek
>
> I tried using swagger-codegen with the generated swagger.json but it gave me 
> errors.
> I opened a bug report on their project at 
> https://github.com/swagger-api/swagger-codegen/issues/3976, and after 
> investigation, our current swagger-maven-plugin produces a swagger.json file 
> with "type" : "ref" in it. This is non compliant with the specs, and a fix 
> was introduced in https://github.com/kongchen/swagger-maven-plugin/issues/141 
> Therefore, we need to upgrade the swagger-maven-plugin from 3.0-M1 to 3.0.1. 
> I tested it and it works now with the swagger-codegen plugin. Happy to submit 
> a PR, let me know your thoughts



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to