Thanks,

FYI, I've started to host my own swagger-codegen generated Java Client on
my github: https://github.com/simplesteph/nifi-api-client-java  . Check out
the docs!
If you want to start playing and get a feel for it:


public static void main(String[] args) {

    ApiClient apiClient = new ApiClient();
    apiClient.setBasePath("http://localhost:8080/nifi-api";);

    FlowApi flowApiInstance = new FlowApi(apiClient);
    try {

        String result = flowApiInstance.generateClientId();
        System.out.println(result);
    } catch (ApiException e) {
        e.printStackTrace();
    }
}

Cheers,
Stephane

On Fri, Oct 14, 2016 at 11:27 AM Andy LoPresto <alopre...@apache.org> wrote:

> Stéphane asked a question on the PR but as it was already closed, I wanted
> to reproduce it here for visibility and to see if other community members
> had something to add:
>
> Stéphane:
>
> 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?
>
> My reply:
>
> 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.
>
> Andy LoPresto
> alopre...@apache.org
> *alopresto.apa...@gmail.com <alopresto.apa...@gmail.com>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Oct 13, 2016, at 5:13 PM, Matt Gilman <matt.c.gil...@gmail.com> wrote:
>
> Thanks for submitting the PR Stephane! I see that Andy has already stated
> that he's reviewing. Thanks Andy!
>
> On Thu, Oct 13, 2016 at 7:42 PM, Stéphane Maarek <
> stephane.maa...@gmail.com> wrote:
>
> Investigated some more, open a JIRA issue, closed it via
> https://github.com/apache/nifi/pull/1135
>
> On Fri, Oct 14, 2016 at 9:47 AM Stéphane Maarek <stephane.maa...@gmail.com>
> wrote:
>
> Hi,
>
> Thanks it helps ! Good to know there is already a java client I could use.
> Nonetheless I think it would be extremely nice to use the swagger codegen
> project to generate additionally sdks, I don't mind creating a github
> project of my own to maintain these.
>
> I gave it a go and it gave me a bunch of errors, see
> https://github.com/swagger-api/swagger-codegen/issues/3976
>
> I went to https://editor.swagger.io/ , uploaded the swagger.json file and
> apparently the swagger.json specs for many (if not all) delete calls are
> having wrong specs, see below. Do you think that's worth opening a JIRA?
>
>
> Swagger Error
> Not a valid parameter definition
> Jump to line 344
> Details
>  Object
> code: "ONE_OF_MISSING"
>  params: Array [0]
> message: "Not a valid parameter definition"
>  path: Array [5]
> 0: "paths"
> 1: "/connections/{id}"
> 2: "delete"
> 3: "parameters"
> 4: "0"
> schemaId: "http://swagger.io/v2/schema.json#";
>  inner: Array [2]
>  0: Object
> code: "ONE_OF_MISSING"
>  params: Array [0]
> message: "Data does not match any schemas from 'oneOf'"
>  path: Array [5]
>  inner: Array [2]
>  0: Object
> code: "OBJECT_MISSING_REQUIRED_PROPERTY"
>  params: Array [1]
> 0: "schema"
> message: "Missing required property: schema"
>  path: Array [0]
>  1: Object
> code: "ONE_OF_MISSING"
>  params: Array [0]
> message: "Data does not match any schemas from 'oneOf'"
>  path: Array [0]
>  inner: Array [4]
>  0: Object
> code: "ENUM_MISMATCH"
>  params: Array [1]
> message: "No enum match for: ref"
>  path: Array [1]
>  1: Object
> code: "ENUM_MISMATCH"
>  params: Array [1]
> message: "No enum match for: ref"
>  path: Array [1]
>  2: Object
> code: "ENUM_MISMATCH"
>  params: Array [1]
> message: "No enum match for: ref"
>  path: Array [1]
>  3: Object
> code: "ENUM_MISMATCH"
>  params: Array [1]
> 0: "ref"
> message: "No enum match for: ref"
>  path: Array [1]
> 0: "type"
>  1: Object
> code: "OBJECT_MISSING_REQUIRED_PROPERTY"
>  params
>
>

Reply via email to