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

[NIFI-2899] Updated swagger-maven-plugin to 3.0.1 #1135

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@simplesteph
Contributor

simplesteph commented Oct 13, 2016

Incorporates the fix from kongchen/swagger-maven-plugin#141
Ensures the new swagger.json is spec 2.0 compliant, see swagger-api/swagger-codegen#3976

NIFI-2899 Updated swagger-maven-plugin to 3.0.1
Incorporates the fix from kongchen/swagger-maven-plugin#141 
Ensures the new swagger.json is spec 2.0 compliant, see swagger-api/swagger-codegen#3976
@alopresto

This comment has been minimized.

Show comment
Hide comment
@alopresto

alopresto Oct 13, 2016

Contributor

Reviewing...

Contributor

alopresto commented Oct 13, 2016

Reviewing...

@alopresto

This comment has been minimized.

Show comment
Hide comment
@alopresto

alopresto Oct 14, 2016

Contributor

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 $
Contributor

alopresto commented Oct 14, 2016

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 $

@asfgit asfgit closed this in 33ba1a8 Oct 14, 2016

@simplesteph

This comment has been minimized.

Show comment
Hide comment
@simplesteph

simplesteph Oct 14, 2016

Contributor

good stuff. Quick question, what do you think of NiFi automating the build and release of API clients in various language, vs me just maintaining it in my own repos?

Contributor

simplesteph commented Oct 14, 2016

good stuff. Quick question, what do you think of NiFi automating the build and release of API clients in various language, vs me just maintaining it in my own repos?

@alopresto

This comment has been minimized.

Show comment
Hide comment
@alopresto

alopresto Oct 14, 2016

Contributor

I don't think that's something we should do at this time. The NiFi build is already long enough (10 - 20 minutes on commodity hardware depending on multithreading, tests, and contrib-check) and I don't think many people need this functionality, much less in multiple languages, and I don't know how we would determine the default languages -- maybe just Java to start as that's what the codebase is written in?

If you want to submit a PR for a custom profile that builds the API clients, I wouldn't object to that as long as it was disabled by default. Not sure what others' feelings are.

Contributor

alopresto commented Oct 14, 2016

I don't think that's something we should do at this time. The NiFi build is already long enough (10 - 20 minutes on commodity hardware depending on multithreading, tests, and contrib-check) and I don't think many people need this functionality, much less in multiple languages, and I don't know how we would determine the default languages -- maybe just Java to start as that's what the codebase is written in?

If you want to submit a PR for a custom profile that builds the API clients, I wouldn't object to that as long as it was disabled by default. Not sure what others' feelings are.

@simplesteph

This comment has been minimized.

Show comment
Hide comment
@simplesteph

simplesteph Oct 14, 2016

Contributor

No worries, I’ll build it on my own in my separate repos, see if people
have any usage for it, and based on adoption thinking of merging this into
the base.
What I really like though is that the documentation generated for the API
is stellar.

On 14 October 2016 at 11:26:08 AM, Andy LoPresto (notifications@github.com)
wrote:

I don't think that's something we should do at this time. The NiFi build is
already long enough (10 - 20 minutes on commodity hardware depending on
multithreading, tests, and contrib-check) and I don't think many people
need this functionality, much less in multiple languages, and I don't know
how we would determine the default languages -- maybe just Java to start as
that's what the codebase is written in?

If you want to submit a PR for a custom profile that builds the API
clients, I wouldn't object to that as long as it was disabled by default.
Not sure what others' feelings are.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1135 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AT4rabcK5wAo8dv5KKU__y0sHge8-dKGks5qzswfgaJpZM4KWfwS
.

Contributor

simplesteph commented Oct 14, 2016

No worries, I’ll build it on my own in my separate repos, see if people
have any usage for it, and based on adoption thinking of merging this into
the base.
What I really like though is that the documentation generated for the API
is stellar.

On 14 October 2016 at 11:26:08 AM, Andy LoPresto (notifications@github.com)
wrote:

I don't think that's something we should do at this time. The NiFi build is
already long enough (10 - 20 minutes on commodity hardware depending on
multithreading, tests, and contrib-check) and I don't think many people
need this functionality, much less in multiple languages, and I don't know
how we would determine the default languages -- maybe just Java to start as
that's what the codebase is written in?

If you want to submit a PR for a custom profile that builds the API
clients, I wouldn't object to that as long as it was disabled by default.
Not sure what others' feelings are.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1135 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AT4rabcK5wAo8dv5KKU__y0sHge8-dKGks5qzswfgaJpZM4KWfwS
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment