openapi-generator/bin/configs/swift5-urlsessionLibrary.yaml
Ayman Bagabas 9bce71656c
Swift5 namespace changes (#9624)
* [swift5] Rename the API class to {{projectName}}

Instead of {{projectName}}API. This removes some unnecessary naming
complexity.

* [swift5] Define models and Configuration classes under namespace

When swiftUseApiNamespace is set, API classes get defined under the
projectName namespace. This does the same for models and the
Configuration class. Plus adding a deprecation warning when using the
un-namespaced variants.

* [swift5] Use CodingKeys in model decoder

Fixes: 0f5e7d1e3cb9 ("Swift5 models improvements (#9205)")

* [swift5] Add swiftUseApiNamespace to urlsessionLibrary config

* Update samples

* Try to reduce model changes

Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2021-06-02 00:45:01 +08:00

15 lines
552 B
YAML

generatorName: swift5
outputDir: samples/client/petstore/swift5/urlsessionLibrary
library: urlsession
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift5
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
useSPMFileStructure: true
useClasses: true
swiftUseApiNamespace: true