For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvote
Accepted
16 1 1 3

Issue with swagger-codegen generated models

Issue:

Java domain classes generated using swagger-codegen don't extend their base classes.

Solution:

http://swagger.io/specification/ - please see "Composition and Inheritance (Polymorphism)" part.

Here's an example of required changes to thomson-reuters-world-check-one-api.v1.yaml file in order to fix NewCase model - which extends UpdateCase model - generation (please note that NewCase isn't the only model with the issue):

  #
  # Definitions for Case domain
  # ===========================
  #


  UpdateCase:
    type: object
    discriminator: updateCaseType # <---- new
    description: |
      Defines Case data that can be sent when updating a Case.
  
  # ... omitting some code here

  # ...
  # UpdateCase definition continued:

  required:
    - name
    - updateCaseType # <---- new
    - providerTypes
  properties:
  
  ...

P.S.: I'm not a Swagger expert, so there might be a reason why you have missing discriminator property, but changes above helped me to generate correct java classes.

world-checkworld-check-oneapiscreeningswagger
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
3.1k 16 7 7

Hi @ruslann,

Thank you for contributing to the World-Check One Developer's Portal Q&A !!

Your feedback and experience is very helpful to all who read the Q&A forum.

I've submitted a ticket to our development team and will post any response if necessary or confirm the change to the YAML

Thanks again,

Brian

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea