swagger-api/swagger-codegen

[Swift4] Interoperability with Objective C

Offen

#6.763 geöffnet am 20.10.2017

 (16 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Client: SwiftEnhancement: Compatibilityhelp wanted

Repository-Metriken

Stars
 (12.701 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Description

We're looking to use Swagger codegen with SWG v3.0 to generate the model and api files. However, we need to use these with existing Objective C project eg. Need the model obejcts returned in the response to be stored in local model to be used with ObjC View controllers.

Swagger-codegen version

verion 2.2.3

Swagger declaration file content or url

any file will do. Nothing specific

Command line used for generation

plain generate commanf for -l swift4

Steps to reproduce

generate any SWG v3.0 file into swift classes

Related issues/PRs
Suggest a fix/enhancement

Along with declaring Codeable, which you already do, the model objects need to be subclassed from NSObject, have @objcMembers annotation etc.

Contributor Guide