yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
627 stars 147 forks source link

Difference between generating a File and UploadFile #149

Closed cerupcat closed 5 years ago

cerupcat commented 5 years ago

My spec looks like:

              "schema": {
                "type": "object",
                "properties": {
                  "Version": {
                    "type": "string"
                  },
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }

and a File object is used. How do we use an UploadFile object instead?

yonaskolb commented 5 years ago

You can change use UploadFile by editing the template and configuring typeAliases

typeAliases:
    File: UploadFile
cerupcat commented 5 years ago

Great. That's simple enough. :) Thanks!