We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

nik's avatar
nik
New Contributor
7 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/

2 Replies

  • If you're running into issues with the generated code, please file a ticket at https://github.com/swagger-api/swagger-codegen.

    • nik's avatar
      nik
      New Contributor

      I've created the new ticket: https://github.com/swagger-api/swagger-codegen/issues/9661

      Thank you