-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[rust-server] Restore support for nullable #936
[rust-server] Restore support for nullable #936
Conversation
Accounts for changes in #930. Adds a nullable field to the sample to reduce the risk of this regressing again in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good to me, thanks @bjgill!
Might it be worth adding in a required nullable object to the test as well, to make sure the interaction between Option
and swagger:Nullable
happens correctly?
Good point - thanks. I've added the test you suggested. This is a relatively minor change to a feature that's been reviewed by its original contributor. I'll give it a couple of days in case any other members of the technical committee (or others) wish to review, and will then merge. |
Nice catch. My analysis of swagger parser is that a construct like Is this construct something that was used with Swagger-Codegen v2 (using swagger-parser version 1)? I did a quick search and rust seems to be the only templates that uses |
Yes - this was something that was previously used in swagger-codegen. I hadn't noticed that it stopped working after the migration. |
I think we've now had long enough for anyone else who wanted to review this, given that this is a simple bug fix. Merging. |
* Restore support for nullable in rust-server Accounts for changes in OpenAPITools#930. Adds a nullable field to the sample to reduce the risk of this regressing again in future. * Add test for required nullable field
Accounts for changes in #930. Adds a nullable field to the sample to reduce the risk of this regressing again in future.
PR checklist
./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\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
Accounts for changes in #930. Adds a nullable field to the sample to reduce the risk of this regressing in future.
This PR basically renames
x-nullable
toisNullable
in the mustache template.