Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !3783

Add nullable support to Swift4

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed William Cheng requested to merge swift_nullable_support into master Aug 28, 2019
  • Overview 0
  • Commits 6
  • Pipelines 0
  • Changes 433+

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Add nullable (or x-nullable in OAS2) support to swift4

This will replace the unwrapRequired option.

Tests passed locally:

2019-08-28 18:24:13.135 xcodebuild[39128:3957771] [MT] IDETestOperationsObserverDebug: (2DC50469-4B44-406B-9B42-2EE085D7192E) Finished requesting crash reports. Continuing with testing.
All tests
Test Suite SwaggerClientTests.xctest started
PetAPITests
    ✓ test1CreatePet (0.697 seconds)
    ✓ test2GetPet (0.505 seconds)
    ✓ test3DeletePet (0.497 seconds)
StoreAPITests
    ✓ test1PlaceOrder (0.723 seconds)
    ✓ test2GetOrder (0.479 seconds)
    ✓ test3DeleteOrder (0.483 seconds)
UserAPITests
    ✓ testLogin (0.450 seconds)
    ✓ testLogout (0.530 seconds)


Executed 8 tests, with 0 failures (0 unexpected) in 4.362 (4.366) seconds
2019-08-28 18:27:13.958 xcodebuild[39128:3957771] [MT] IDETestOperationsObserverDebug: 205.584 elapsed -- Testing started completed.
2019-08-28 18:27:13.958 xcodebuild[39128:3957771] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2019-08-28 18:27:13.958 xcodebuild[39128:3957771] [MT] IDETestOperationsObserverDebug: 205.584 sec, +205.584 sec -- end
▸ Test Succeeded
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:55 min
[INFO] Finished at: 2019-08-28T18:27:20+08:00
[INFO] ------------------------------------------------------------------------

cc @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: swift_nullable_support