Forum Discussion

nik's avatar
nik
New Contributor
6 years ago

https://editor.swagger.io/

Hello.

I have got a problem with the handling model in response to Swift4/Kotlin.

The code (Swift4/Kotlin) from the swagger contract was generated on https://editor.swagger.io/

and actually, I don't know how I can return the corrent model that was described in the contract:

responses:
        '409':
          description: "the data is in conflict with the possible data values"
          schema:
              $ref: '#/definitions/jobconflict'

because I've got  ErrorResponse object on Swift and just JSON string on Kotlin. 

Yes, I can create an object from that manually, but my question is: How it could be resolved with swagger contact automatically as any response did and provided in swagger contract as the common way: https://swagger.io/docs/specification/describing-responses/