Skip to content

[Swift4] Add throw to reserved words #6952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nascob
Copy link
Contributor

@nascob nascob commented Nov 14, 2017

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 and ./bin/security/{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\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Adding throw in the list of Swift 4 reserved words. This is to address #6919
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

I have simply added the word to the hash-set and regenerated the Petstore samples.
I haven't added any changes to the Swift4 tests - currently they seem to only test a single word as a pass condition. Should there be some integration tests that iterate through the set values to see if all reserved words are escaped properly?
Lastly - it's my first time contributing to the project - please let me know if I've skipped a step in the PR process - I'll do my best to fix it.

@nascob
Copy link
Contributor Author

nascob commented Nov 14, 2017

Technical Committee:
@jgavris @ehyche @Edubits @jaz-ah

@wing328
Copy link
Contributor

wing328 commented Nov 14, 2017

Should there be some integration tests that iterate through the set values to see if all reserved words are escaped properly?

We don't at the moment but of course we welcome more tests to cover different edge cases.

@wing328 wing328 changed the title [Swift4] Aadd throw to reserved words [Swift4] Add throw to reserved words Nov 14, 2017
unset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this is unset...

@wing328 wing328 merged commit 970de01 into swagger-api:master Nov 15, 2017
@wing328
Copy link
Contributor

wing328 commented Nov 15, 2017

@atanasbozhkov if you've time, I wonder if you can do the same to Swift3Codegen.java.

@nascob
Copy link
Contributor Author

nascob commented Nov 15, 2017

@wing328 - yes I actually thought about that today. I'll look at the integration tests as well - any suggestions where they should go?

@wing328
Copy link
Contributor

wing328 commented Nov 15, 2017

wing328 added a commit that referenced this pull request Nov 16, 2017
wing328 added a commit that referenced this pull request Nov 16, 2017
* Revert "[csharp] clean boolean additional properties 6784 (#6899)"

This reverts commit 2c9f98c.

* Revert "[Swift4] Add throw to reserved words (#6952)"

This reverts commit 970de01.

* Revert "add a docker build tag for pushing docker image instead of just latest (#6837)"

This reverts commit 4e482ee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants