You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Kevin Doran (JIRA)" <ji...@apache.org> on 2019/04/01 21:45:00 UTC

[jira] [Created] (NIFIREG-248) Inconsistency between Swagger Link Model and actual response

Kevin Doran created NIFIREG-248:
-----------------------------------

             Summary: Inconsistency between Swagger Link Model and actual response 
                 Key: NIFIREG-248
                 URL: https://issues.apache.org/jira/browse/NIFIREG-248
             Project: NiFi Registry
          Issue Type: Bug
    Affects Versions: 0.3.0, 0.2.0, 0.1.0
            Reporter: Kevin Doran


If using a swagger-codgen client with strict DTO json deserialization (fail on unknown fields), the following types of exceptions occur when retrieving any DTO that has a {{Link}} type field:

{code}
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "href" (class com.example.swagger.client.model.Link), not marked as ignorable (7 known properties: "params", "title", "rel", "type", "uri", "uriBuilder", "rels"])
 at [Source: [\{"createdTimestamp":1553517081543,"identifier":"8d27c763-26ce-4f0b-bc5d-56382bd17e15","link":{"href":"buckets/8d27c763-26ce-4f0b-bc5d-56382bd17e15","params":({"rel":"self"}},"name":"test_bucket","permissions":\{"canDelete":true,"canRead":true,"canWrite":true}}]; line: 1, column: 104] (through reference chain: java.util.ArrayList[0]->com.example.swagger.client.model.Bucket["link"]->com.example.swagger.client.model.Link["href"])
{code}

The swagger client DTO's were generated based on the swagger.json definition from the build output.

Currently the work is permitting non existing properties for Jackson.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)